disruption_modes: Retrieve a translation from description mode number to...

View source: R/disruptions.R

disruption_modesR Documentation

Retrieve a translation from description mode number to description mode name

Description

Disruption mode types (eg. "metro_train", "metro_tram", "school_bus", "taxi") have corresponding integer IDs. This function retrieves a named vector in which the values are the disruption mode descriptions, and the names of the vector are the description mode numbers. Note that disruption mode names are in snake case, that is, all lower case with underscores between words.

Usage

disruption_modes(user_id = determine_user_id(), api_key = determine_api_key())

Arguments

user_id

Integer or character. A user ID or devid provided by Public Transport Victoria. Refer to ?ptvapi for more details.

api_key

Character. An API key, with dashes, provided by Public Transport Victoria. Refer to ?ptvapi for more details.

Value

A named vector in which the values are the disruption mode descriptions, and the names of the vector are the description mode numbers.

Examples

## Not run: disruption_modes()


ptvapi documentation built on Aug. 15, 2022, 5:09 p.m.