get_locations {frostr} | R Documentation |
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.
Usage
get_locations(client_id,
names = NULL,
geometry = NULL,
fields = NULL,
return_response = FALSE)
Arguments
client_id |
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 |
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
.
Examples
## Not run:
frost_client_id <- "<YOUR FROST CLIENT ID>"
# Get all location names
locations_df <- get_locations(client_id = frost_client_id)
## End(Not run)