rwars (version 1.0.0)

get_all_planets: Retrieve Data about Every DB Entry in a Class

Description

these functions retrieve the data associated with every entry in a particular class of object, where that class may be planet, species, vehicle, so on and so forth.

Usage

get_all_planets(query_continue = NULL, parse_result = FALSE, ...)
get_all_species(query_continue = NULL, parse_result = FALSE, ...)
get_all_films(query_continue = NULL, parse_result = FALSE, ...)
get_all_vehicles(query_continue = NULL, parse_result = FALSE, ...)
get_all_starships(query_continue = NULL, parse_result = FALSE, ...)
get_all_people(query_continue = NULL, parse_result = FALSE, ...)

Arguments

query_continue
whether this is a continuation of a previous query. Set to NULL by default; the alternative is to provide this argument with the "next" URL from a returned object - see the examples.
parse_result
whether to parse and simplify the result of the query. Set to FALSE by default.
...
further arguments to pass to httr's GET function.

See Also

retrieving individual entries with entries

Examples

Run this code
#Retrieve all planets, parsing
planets <- get_all_planets(parse_result = TRUE)

#It's only returned some of the results! Use query_continue to get
#the rest.
second_set_of_planets <- get_all_planets(getElement(planets,"next"), parse_result = TRUE)

Run the code above in your browser using DataLab