breeds: Returns breed names of specified animal type, or types.

Description Usage Arguments Value Examples

View source: R/method_docs.R

Description

Returns breed names of specified animal type, or types.

Usage

1
breeds(types, return_df = TRUE)

Arguments

types

Specifies the animal type or types. 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 available breeds for each animal type is returned. The animal type must be of 'dog', 'cat', 'rabbit', 'small-furry', 'horse', 'bird', 'scales-fins-other', 'barnyard'.

return_df

If TRUE, the result set will be coerced into a pandas data.frame with two columns, breed and name.

Value

List of returned JSON data of available breeds for each specified animal type from the Petfinder API. If the parameter return_df is TRUE, a data.frame is returned instead.

Examples

1
2
3
4
5
6
7
8
## Not run: 
pf <- Petfinder(key=key, secret=secret) # Initialize Petfinder class
cat_breeds <- pf$breeds('cat')
cat_dog_breeds <- pf$breeds(c('cat', 'dog'))
all_breeds <- pf$breeds()
all_breeds_df <- pf$breeds(return_df=TRUE)

## End(Not run)

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