View Source API Reference mbta_sdk v0.1.0
Modules
API calls for all endpoints tagged Alert.
API calls for all endpoints tagged Facility.
API calls for all endpoints tagged Line.
API calls for all endpoints tagged LiveFacility.
API calls for all endpoints tagged Prediction.
API calls for all endpoints tagged Route.
API calls for all endpoints tagged RoutePattern.
API calls for all endpoints tagged Schedule.
API calls for all endpoints tagged Service.
API calls for all endpoints tagged Shape.
API calls for all endpoints tagged Stop.
API calls for all endpoints tagged Trip.
API calls for all endpoints tagged Vehicle.
Helper functions for deserializing responses into models
Start and End dates for active alert
A JSON-API document with a single AlertResource resource
An effect (enumerated in */attributes/effect and human-readable in */attributes/service_effect) on a provided service (facility, route, route type, stop and/or trip in /*/attributes/informed_entity) described by a banner (*/attributes/banner), short header (*/attributes/short_header), header */attributes/header, description (*/attributes/description), image (*/attributes/image), and image alternative text (*/attributes/image_alternative_text) that is active for one or more periods(*/attributes/active_period) caused by a cause (*/attribute/cause) that somewhere in its lifecycle (enumerated in */attributes/lifecycle and human-readable in */attributes/timeframe). See GTFS Realtime FeedMessage FeedEntity Alert ## Descriptions There are 7 descriptive attributes. | JSON pointer | Usage | |---------------------------------------------|---------------------------------------------------------------------------------| | */attributes/banner | Display as alert across application/website | | */attributes/short_header | When */attributes/header is too long to display | | */attributes/header | Used before showing and prepended to */attributes/description | | */attributes/description | Used when user asks to expand alert. | | */attributes/image | URL to descriptive image. | | */attributes/image_alternative_text | Text that describes image linked in url | ## Effect | JSON pointer | | |-----------------------------------------------|----------------| | */attributes/effect | Enumerated | | */attributes/service_effect | Human-readable | ## Timeline There are 3 timeline related attributes | JSON pointer | Description | |----------------------------------------------|------------------------------------------------------------------------------------------| | */attributes/active_period | Exact Date/Time ranges alert is active | | */attributes/lifecycle | Enumerated, machine-readable description of */attributes/active_period | | */attributes/timeframe | Human-readable description of */attributes/active_period |
A page of AlertResource results
A JSON-API error document when the server cannot or will not process the request due to something that is perceived to be a client error.
A JSON-API error when a bad request is received
A JSON-API error source
A page of FacilityResource results
A JSON-API document with a single FacilityResource resource
Name/value pair for additional facility information
Amenities at a station stop (*/relationships/stop) such as elevators, escalators, parking lots, and bike storage. An MBTA extension. This spec is not yet finalized. ## Accessibility Riders with limited mobility can search any facility, either ELEVATOR or ESCALATOR, while riders that need wheelchair access can search for ELEVATOR only. The lack of an ELEVATOR MAY NOT make a stop wheelchair inaccessible. Riders should check /stops/{id} /data/attributes/wheelchair_boarding is 1 to guarantee a path is available from the station entrance to the stop or 0 if it MAY be accessible. Completely avoid 2 as that is guaranteed to be INACCESSIBLE.
A JSON-API error document when the API key is invalid
A JSON-API error when an invalid API key is received
An entity affected by an alert. At least one of the fields other than activities will be non-null. The affected entity is the intersection of these fields, not the union: if stop and route both have values, the alert does not affect the entire route. See GTFS Realtime FeedMessage FeedEntity Alert EntitySelector. activities - The activities affected. direction_id - The direction of the affected trip. See GTFS trips.txt direction_id. facility - The facility affected. route - The route affected. See GTFS routes.txt route_id route_type - The type of route affected. If present alone, indicates the entire mode of transit is affected. See GTFS routes.txt route_type stop - The stop affected. See GTFS stops.txt stop_id * trip - The trip affected. See GTFS trips.txt trip_id
A JSON-API document with a single LineResource resource
Line represents a combination of routes
A page of LineResource results
A page of LiveFacilityResource results
A JSON-API document with a single LiveFacilityResource resource
Live data about a given facility.
A JSON-API error document when a request uses an invalid 'accept' header
A JSON-API error when a request uses an invalid 'accept' header
A JSON-API error document when a resource is not found
A JSON-API error when a resource is not found
A JSON-API error source
An expected or predicted level of occupancy for a given trip.
The predicted arrival time (/*/attributes/arrival_time) and departure time (*/attributes/departure_time) to/from a stop (*/relationships/stop/data/id) at a given sequence (*/attriutes/stop_sequence) along a trip (*/relationships/trip/data/id) going a direction (*/attributes/direction_id) along a route (*/relationships/route/data/id). See GTFS Realtime FeedMesage FeedEntity TripUpdate TripDescriptor See GTFS Realtime FeedMesage FeedEntity TripUpdate StopTimeUpdate
A page of PredictionResource results
A JSON-API document with a single RouteResource resource
A JSON-API document with a single RoutePatternResource resource
Information about the different variations of service that may be run within a single route_id, including when and how often they are operated. See GTFS `route_patterns.txt for the base specification.
A page of RoutePatternResource results
Path a vehicle travels during service. See GTFS `routes.txt for the base specification.
A page of RouteResource results
A schedule is the arrival drop off (*/attributes/drop_off_type) time (*/attributes/arrival_time) and departure pick up (*/attributes/pickup_type) time (*/attributes/departure_time) to/from a stop (*/relationships/stop/data/id) at a given sequence (*/attributes/stop_sequence) along a trip (*/relationships/trip/data/id) going in a direction (*/attributes/direction_id) on a route (*/relationships/route/data/id) when the trip is following a service (*/relationships/service/data/id) to determine when it is active. See GTFS stop_times.txt for base specification.
A page of ScheduleResource results
A JSON-API document with a single ServiceResource resource
Service represents a set of dates on which trips run.
A page of ServiceResource results
A JSON-API document with a single ShapeResource resource
Sequence of geographic points representing a path vehicles will travel on a trip. See GTFS shapes.txt.
A page of ShapeResource results
A JSON-API document with a single StopResource resource
Physical location where transit can pick-up or drop-off passengers. See https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#stopstxt for more details and https://github.com/mbta/gtfs-documentation/blob/master/reference/gtfs.md#stopstxt for specific extensions.
A page of StopResource results
A JSON-API error document when rate limited
A JSON-API error when rate limited
A JSON-API document with a single TripResource resource
Representation of the journey of a particular vehicle through a given set of stops. See GTFS trips.txt
A page of TripResource results
A JSON-API document with a single VehicleResource resource
Current state of a vehicle on a trip.
A page of VehicleResource results
Helper functions for building Tesla requests