animal_types: Returns data on an animal type, or types available from the...

Description Usage Arguments Value Examples

View source: R/method_docs.R

Description

Returns data on an animal type, or types available from the Petfinder API. This data includes the available type's coat names and colors, gender and other specific information relevant to the specified type(s). The animal type must be of 'dog', 'cat', 'rabbit', 'small-furry', 'horse', 'bird', 'scales-fins-other', 'barnyard'.

Usage

1
animal_types(types = NULL)

Arguments

types

Specifies the animal type or types to return. Can be a character vector representing a single animal type, or a vector or list of animal types if more than one type is desired. If not specified, all animal types are returned.

Value

List of returned JSON data for each specified animal type from the Petfinder API.

Examples

1
2
3
4
5
6
7
## Not run: 
pf <- Petfinder(key=key, secret=secret) # Initialize Petfinder class
cat <- pf$animal_types(types='cat')
cat_dog <- pf$animal_types(types=c('cat', 'dog'))
all_types <- pf$animal_types()

## End(Not run)

aschleg/PetfindeR documentation built on July 12, 2020, 4:30 a.m.