Perform 1 to 10 GET requests at once.
Usage
get_batch(
parent,
child,
ids,
token = NULL,
query = NULL,
on.error = c("stop", "warn", "message"),
retry.times = 1,
handle = NULL,
verbose = FALSE
)Arguments
- parent
Parent resource, e.g.
"board".- child
Child resource, eg.
"card".- ids
A vector of resource IDs, with maximum length of 10.
- token
An object of class
"Trello_API_token", a path orNULL.If a
Token, it is passed as is.If
NULLand a cache file called".httr-oauth"exists, the newest token is read from it. If the file is not found, an error is thrown.If a character vector of length 1, it will be used as an alternative path to the cache file.
- query
Named list of key-value pairs, appended to each component of the batch request. See
httr::GET()for details. NOTE: If you require different query with each batch component, build the list of URLs yourself usingget_resource(), as per Trello API reference.- on.error
Whether to
"stop","warn"or"message"on API error.- retry.times
How many times to re-try when a request fails. Defaults to 1.
- handle
The handle to use with this request, see
httr::RETRY().- verbose
Set to
TRUEfor verbose output.
Examples
demo_board <- "https://trello.com/b/wVWPK9I4/r-client-for-the-trello-api"
if (FALSE) {
# Download custom field values for 10 cards.
cards <- get_board_cards(demo_board, limit = 10)
values <- get_batch(
parent = "card",
child = "customFieldItems",
ids = cards$id
)
values
}