- TfLUnified/api
The TfLUnified/api module acts as an abstracton layer for accessing the various TfL APIs
- ColorObj :
Object
an object containing various colour codes
- MetaMode :
Object
a response object for detailing TfL transport Meta Modes
- MetaSeverity :
Object
a response object for detailing TfL severity codes
- DateRanges :
Object
an object containing a start and end date for date range serches
The TfLUnified/api module acts as an abstracton layer for accessing the various TfL APIs
- TfLUnified/api
- .Color ⇐
TfLUnified
- ~getLineColor(lineId) ⇒
ColorObj
- ~getLineCMYKColor(lineId) ⇒
Objct
- ~getLineRGBColor(lineId) ⇒
Object
- ~getLineHexColor(lineId) ⇒
String
- ~getLineColor(lineId) ⇒
- .Line ⇐
TfLUnified
- ~listValidModes() ⇒
Array.<MetaMode>
- ~listSeverityCodes() ⇒
Array.<MetaSeverity>
- ~listDisruptionCategories() ⇒
Array.<String>
- ~listServiceTypes() ⇒
Array.<String>
- ~getRoutesById(ids, [options]) ⇒
Array.<Object>
- ~getRoutesByMode(modes, [options]) ⇒
Array.<Object>
- ~getRoutesByServiceType(types, [options]) ⇒
Array.<Object>
- ~getLineStatusById(ids, [options]) ⇒
Array.<Object>
- ~getLineStatusByMode(modes, [options]) ⇒
Array.<Object>
- ~listValidModes() ⇒
- .TfLUnified
- .Color ⇐
TfLUnified/api.Color ⇐ TfLUnified
Kind: static class of TfLUnified/api
Extends: TfLUnified
See: http://content.tfl.gov.uk/tfl-colour-standards-issue04.pdf
- .Color ⇐
TfLUnified
- ~getLineColor(lineId) ⇒
ColorObj
- ~getLineCMYKColor(lineId) ⇒
Objct
- ~getLineRGBColor(lineId) ⇒
Object
- ~getLineHexColor(lineId) ⇒
String
- ~getLineColor(lineId) ⇒
Color~getLineColor(lineId) ⇒ ColorObj
gets the color of a line from its associated ID
Kind: inner method of Color
Returns: ColorObj
- an object containing various colour codes in different formats
See: http://content.tfl.gov.uk/tfl-colour-standards-issue04.pdf
Param | Type | Description |
---|---|---|
lineId | LineId | String |
a stirng containing the line id e.g. bakerloo, circle, ect |
gets the cmyk color of a line from its associated ID
Kind: inner method of Color
Returns: Objct
- an object containing the cmyk colour values for this line
See: http://content.tfl.gov.uk/tfl-colour-standards-issue04.pdf
Param | Type | Description |
---|---|---|
lineId | LineId | String |
a stirng containing the line id e.g. bakerloo, circle, ect |
gets the rgb color of a line from its associated ID
Kind: inner method of Color
Returns: Object
- a rgb colour code for this line
See: http://content.tfl.gov.uk/tfl-colour-standards-issue04.pdf
Param | Type | Description |
---|---|---|
lineId | LineId | String |
a stirng containing the line id e.g. bakerloo, circle, ect |
gets the hex color of a line from its associated ID
Kind: inner method of Color
Returns: String
- a hex colour code for this line
See: http://content.tfl.gov.uk/tfl-colour-standards-issue04.pdf
Param | Type | Description |
---|---|---|
lineId | LineId | String |
a stirng containing the line id e.g. bakerloo, circle, ect |
TfLUnified/api.Line ⇐ TfLUnified
Kind: static class of TfLUnified/api
Extends: TfLUnified
See: https://api.tfl.gov.uk
- .Line ⇐
TfLUnified
- ~listValidModes() ⇒
Array.<MetaMode>
- ~listSeverityCodes() ⇒
Array.<MetaSeverity>
- ~listDisruptionCategories() ⇒
Array.<String>
- ~listServiceTypes() ⇒
Array.<String>
- ~getRoutesById(ids, [options]) ⇒
Array.<Object>
- ~getRoutesByMode(modes, [options]) ⇒
Array.<Object>
- ~getRoutesByServiceType(types, [options]) ⇒
Array.<Object>
- ~getLineStatusById(ids, [options]) ⇒
Array.<Object>
- ~getLineStatusByMode(modes, [options]) ⇒
Array.<Object>
- ~listValidModes() ⇒
Line~listValidModes() ⇒ Array.<MetaMode>
Lists all of the valid line transportation modes [GET]
Kind: inner method of Line
Returns: Array.<MetaMode>
- an array of objects contianing the transportation modes
See: https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_MetaModes
Line~listSeverityCodes() ⇒ Array.<MetaSeverity>
Lists all of the valid line severity codes [GET]
Kind: inner method of Line
Returns: Array.<MetaSeverity>
- an array of objects contianing the severity code
See: https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_MetaSeverity
Lists all of the valid line disruption categories [GET]
Kind: inner method of Line
Returns: Array.<String>
- an array of strings contianing the disruption categories
See: https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_MetaDisruptionCategories
Lists all of the valid line service types [GET]
Kind: inner method of Line
Returns: Array.<String>
- an array of strings contianing the service types
See: https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_MetaServiceTypes
Gets information about the Routes supplied by ids [GET]
Kind: inner method of Line
Returns: Array.<Object>
- an array of specified line information
See
- https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_Get
- https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_LineRoutesByIds
- https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_RouteSequence
Param | Type | Description |
---|---|---|
ids | Array.<String> | String |
An array of line ids e.g. circle, northern, ect |
[options] | Object |
optional parameters to be added to the request |
[options.serviceTypes] | Array.<String> | String |
An array or string of line service types e.g. regular, night, ect |
[options.direction] | String |
a direction in which to sequence the stations can be either: inbound, outbound, all |
[options.excludeCrowd] | Boolean |
should crowd line disruptions be exlcuded from the request |
Gets information about the Routes supplied by modes [GET]
Kind: inner method of Line
Returns: Array.<Object>
- an array of specified line information
See
- https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_GetByMode
- {module:TfLUnified/api.Line~listValidModes}
Param | Type | Description |
---|---|---|
modes | Array.<String> | String |
An array of line modes e.g. tube, bus, ect |
[options] | Object |
optional parameters to be added to the request |
[options.serviceTypes] | Array.<String> | String |
An array or string of line service types e.g. regular, night, ect |
Gets information about the Routes supplied by modes [GET]
Kind: inner method of Line
Returns: Array.<Object>
- an array of specified line information
See
- https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_Route
- {module:TfLUnified/api.Line~listServiceTypes}
Param | Type | Description |
---|---|---|
types | Array.<String> | String |
An array of line service types e.g. regular, night, ect |
[options] | Object |
optional parameters to be added to the request |
Gets line status information using a lines id [GET]
Kind: inner method of Line
Returns: Array.<Object>
- an array of specified line information
See: https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_Status
Param | Type | Description |
---|---|---|
ids | Array.<String> | String |
An array or a single string of line ids e.g. circle, northern, ect |
[options] | Object |
optional parameters to be added to the request |
[options.detail] | Boolean |
include details of any disruptions |
[options.dateRange] | DateRanges |
an object containing date ranges for getting line status for |
Gets line status information using a lines mode [GET]
Kind: inner method of Line
Returns: Array.<Object>
- an array of specified line information
See
- https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_StatusByMode
- {module:TfLUnified/api.Line~listValidModes}
Param | Type | Description |
---|---|---|
modes | Array.<String> | String |
An array or a single string of line modes e.g. tube, bus, ect |
[options] | Object |
optional parameters to be added to the request |
Kind: static class of TfLUnified/api
Param | Type |
---|---|
options | Object |
an object containing various colour codes
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
cmyk | Object |
a cymk colour value |
cmyk.c | Number |
the cyan numerical amount |
cmyk.m | Number |
the majenta numerical amount |
cmyk.y | Number |
the yellow numerical amount |
cmyk.k | Number |
the key numerical amount |
rgb | RGB |
the rgb colour code as an { r: ) object |
hex | String |
the hex colour code |
a response object for detailing TfL transport Meta Modes
Kind: global typedef
Properties
Name | Type |
---|---|
isTflService | Boolean |
isFarePaying | Boolean |
isScheduledService | Boolean |
modeName | String |
a response object for detailing TfL severity codes
Kind: global typedef
Properties
Name | Type |
---|---|
modeName | String |
severityLevel | Number |
description | String |
an object containing a start and end date for date range serches
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
startDate | Moment | Date | String |
a moment, native js date or ISO 8601 TZ time string |
endDate | Moment | Date | String |
a moment, native js date or ISO 8601 TZ time string |