Hi this is Tom with Coherent Logic and
today we're going to take a look at the
CMR API specifically for the US Treasury
Direct.gov
web services so let's jump right in and
make a call to the US TreasuryDirect.gov
website. Here's what this call looks
like: in this case we have our URL at the
top that would be here and then I've
written out how this breaks down in code.
So in the URL we have ta_WS.
and that equates to a .taWS method;
securities has the 'securities' method;
auction has at that 'auction' method. All
parameters are set via 'with' methods so
in this case we have withTypeAsTIPS
and then we have withDays(720)
 and then finally we execute doGetAsSecuritiesDataSet.
So the equivalent
code looks like this: we import two
classes: first of all one is a package
object and the second is CMR; we
instantiate CMR and then we use cmr to
build up the query as we've discussed a
moment ago and then finally we will show
the DataSet so let's go ahead and
execute this.
And there you have it. So that concludes
this example for working with the US
TreasuryDirect.gov web services. If you
have any thoughts or suggestions or
questions please leave them in a comment
section and I appreciate a thumbs up if
you enjoyed this video -- thanks again.
