Get data using GET API.
tfnswapi_get(
api,
params = NULL,
key = tfnswapi_get_api_key(),
descriptor = transit_realtime.FeedMessage
)
tfnswapi_get_response(path, params = NULL, key = tfnswapi_get_api_key())
Character. API name (e.g. 'carpark' for https://opendata.transport.nsw.gov.au/node/6223/exploreapi#!/carpark/GetCarPark).
a named list. Any parameters that the API accepts can be specified here.
Character (optional). An API key can be provided, else if emptied it will look for any previously registered API key.
This field is only used if the response is of type
application/x-google-protobuf
. You must select one of transit_realtime
variables.
By default this is transit_realtime.FeedMessage
.
Character.
a response with parsed content.
if (FALSE) {
# See what facilities are available
tfnswapi_get("carpark")
tfnswapi_get("carpark", params = list(facility = 2))
}