petfinder-com / petfinder-js-sdk

Petfinder.com API client for JavaScript/TypeScript
https://www.petfinder.com/developers/
BSD 3-Clause "New" or "Revised" License
59 stars 18 forks source link

Can you include this api call? #6

Closed catbai closed 5 years ago

catbai commented 5 years ago

Can you augment the api to include calls to 'types'? GET https://api.petfinder.com/v2/types'

mloberg commented 5 years ago

You should be able to get animal types by using the following:

var pf = new petfinder.Client({apiKey: 'my-api-key', secret: 'my-api-secret'});

pf.animalData.types()
    .then(function (response) {
        // Do something with `response.data.types`
    })
catbai commented 5 years ago

Thank you!