get_smarter_breeds: Get SMARTER Breeds

View source: R/breeds.R

get_smarter_breedsR Documentation

Get SMARTER Breeds

Description

Fetch SMARTER REST API breeds endpoint and returns results in a dataframe.

Usage

get_smarter_breeds(query = list())

Arguments

query

a list of query arguments

Value

Returns a dataframe with selected breeds

Passing additional parameters

Breeds endpoint supports additional parameters when making queries. Additional parameters need to be passed as list using the query parameter. For example, to get all the "Sheep" breeds you need to provide list(species="Sheep") as query parameter. Endpoint supports query by breed code and name. In addition, you can search using a pattern through the search parameter. See Swagger Breeds endpoint for more information about the breeds endpoint

Examples

selected_breed <- get_smarter_breeds(query = list(code = "TEX"))

selected_breeds <- get_smarter_breeds(query = list(search = "mer"))
## Not run: 
all_breeds <- get_smarter_breeds()
sheep_breeds <- get_smarter_breeds(query = list(species = "Sheep"))

## End(Not run)

cnr-ibba/r-smarter-api documentation built on July 2, 2024, 12:24 p.m.