Description Usage Arguments Value Examples
Returns adoptable animal data from Petfinder based on specified criteria.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
animal_id |
Integer or vector or list of integers representing animal IDs obtained from Petfinder. When animal_id is specified, the other function parameters are overridden. If animal_id is not specified, a search of animals on Petfinder matching given criteria is performed. |
animal_type |
Character vector representing desired animal type to search. Must be one of 'dog', 'cat', 'rabbit', 'small-furry', 'horse', 'bird', 'scales-fins-other', or 'barnyard'. |
breed |
Character vector or vector or list of character strings of desired animal type breed to search. Available animal breeds in the Petfinder database can be found using the :code:'breeds()' method. |
size |
Character vector or vector or list of character strings of desired animal sizes to return. The specified size(s) must be one of 'small', 'medium', 'large', or 'xlarge'. |
gender |
Character vector or vector or list of strings representing animal genders to return. Must be of 'male', 'female', or 'unknown'. |
age |
Character or vector or list of strings specifying animal age(s) to return from search. Must be of 'baby', 'young', 'adult', 'senior'. |
color |
String representing specified animal 'color' to search. Colors for each available animal type in the Petfinder database can be found using the animal_types() method. |
coat |
Desired coat(s) to return. Must be of 'short', 'medium', 'long', 'wire', 'hairless', or 'curly'. |
status |
Animal status to filter search results. Must be one of 'adoptable', 'adopted', or 'found'. |
name |
Searches for animal names matching or partially matching name. |
organization_id |
Returns animals associated with given :code:'organization_id'. Can be a vector or a vector or list of character strings representing multiple organizations. |
location |
Returns results by specified location. Must be in the format 'city, state' for city-level results, 'latitude, longitude' for lat-long results, or 'postal code'. |
distance |
Returns results within the distance of the specified location. If not given, defaults to 100 miles. Maximum distance range is 500 miles. |
sort |
Sorts by specified attribute. Leading dashes represents a reverse-order sort. Must be one of 'recent', '-recent', 'distance', or '-distance'. |
pages |
Specifies which page of results to return. Defaults to the first page of results. If set to NULL, all results will be returned. |
results_per_page |
Number of results to return per page. Defaults to 20 results and cannot exceed 100 results per page. |
return_df |
If TRUE, a data.frame will be returned. Does not currently do anything. |
List of JSON data of resulting animals.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.