Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Included in this page are a few examples showing a couple of different usages of the API. These examples require the freely available LINQPad program version 4.47.03 or above in order to view or execute the sample script. In addition, for the API you're communicating with, you will require a valid API user account. Such an account can be obtained from the owner of site. For instance, RSPCA QLD would authorise user accounts for the Australian http://adoptapet.com.au/ website.


Table 1 Example

/api/v{version}/animalStatuses/{id}

Category

Description

Download Link

Authentication

An example of authenticating and executing a authenticated call using the header method.

ApiExample_AuthenticationUsingHeaderMethod.linq

AuthenticationA more advanced example of authenticating and executing a authenticated call using the header method.ApiExample_AuthenticationUsingHeaderMethodAdvanced.linq

Authentication

An example of authenticating and executing a authenticated call using the cookie method.

ApiExample_AuthenticationUsingCookieMethod.linq

AnimalsAn example of getting a single animal available for adoption per Australian state.ApiExample_SingleAdoptionAnimalPerAustralianStateSample.linq

Get by ID

GET

AnimalsAn example the lists ten animal available for adoption for a state located in the US.ApiExample_TenAdoptionAnimalsForAUsStateSample.linq