gtfs_realtime: GTFS real time

Description Usage Arguments Value Examples

Description

Parses the raw response from a GTFS real-time feed

Usage

1
2
3
4
5
gtfs_realtime(response, content = c("FeedMessage", "Alert", "EntitySelector",
  "FeedEntity", "FeedHeader", "VehiclePosition", "TimeRange",
  "TranslateedString", "TripDescriptor", "TripUpdate",
  "TripUpdate.StopTimeEvent", "TripUpdate.StopTimeUpdate", "VehicleDescriptor",
  "Vehicle"))

Arguments

response

binary response body

content

String specifying which section of the response to return

Value

FeedMessage RProtoBuf object containing the feed message

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## South-East Queensland
url <- "https://gtfsrt.api.translink.com.au/Feed/SEQ"

response <- httr::GET(url,
httr::accept_json(),
httr::add_headers('Authorization' = ''))

feed <- gtfs_realtime(response, content = "FeedMessage")


## End(Not run)

SymbolixAU/gtfsway documentation built on May 9, 2019, 3:29 p.m.