get_locations: Get metadata for the location names defined in the Frost API
Description
get_locations() retrieves metadata about location names
defined for use in the Frost API. The function requires an
input for client_id. The other function arguments are optional, and
default to NULL, which means that the response from the API is not
filtered on these parameters.
A string. The client ID to use to send requests to the
Frost API.
names
A character vector. The location names that you want
metadata for.
geometry
A string. Get Frost API location names defined by a
specified geometry. Geometries are specified as either "nearest(POINT(...))"
or "POLYGON(...)" using well-known text representation for geometry (WKT).
fields
A character vector. Fields to include in the response (i.e.
output). If this parameter is specified, then only these fields are
returned in the response. If not specified, then all fields will be
returned in the response.
return_response
A logical. If set to TRUE, then the function
returns the response from the GET request. If set to FALSE (default),
then the function returns a tibble (data frame) of the content in the
response.
Value
The function returns either a data frame with metadata about
location names, or the response of the GET request, depending on the
boolean value set for return_response.
# NOT RUN {frost_client_id <- "<YOUR FROST CLIENT ID>"# Get all location nameslocations_df <- get_locations(client_id = frost_client_id)
# }# NOT RUN {# }