Reading Buses APIV2.1.0
A C#, .net Standard Library for the Reading Buses Open Data API (http://rtl2.ods-live.co.uk/cms/apiservice), available to use in your C# console, WPF, UWP or Win Form Applications.
ReadingBusesAPI.BusStops.BusStop Class Reference

Stores information about a single bus stop. Related to the "List Of Bus Stops" API. More...

Public Member Functions

BusStop (string actoCode)
Used to create a snub/ fake object for passing to function calls, if all you need to pass is an acto-code to the function. More...
async Task< LiveRecord[]> GetLiveData ()
Gets live data from a bus stop. More...
BusService[] GetServices (Company busOperator)
Finds the 'BusService' object for all of the bus services which visit this stop. More...
Point GetPoint ()
Gets the geographical position of the bus stop. More...
Task< BusTimeTable[]> GetTimeTable (DateTime date)
Gets time table data at this specific bus stop. More...
Task< BusTimeTable[]> GetTimeTable (DateTime date, BusService service)
Gets time table data at this specific bus stop. More...
Task< ArchivedBusTimeTable[]> GetArchivedTimeTable (DateTime date)
Gets the archived real bus departure and arrival times along with their time table history at this specific bus stop. More...
Task< ArchivedBusTimeTable[]> GetArchivedTimeTable (DateTime date, BusService service)
Gets the archived real bus departure and arrival times along with their time table history at this specific bus stop. More...

Package Functions

BusStop ()
The default constructor used for parsing data automatically. More...

Properties

string ActoCode [get, set]
The unique identifier for a bus stop. More...
string CommonName [get, set]
The public, easy to understand stop name. More...
string Latitude [get, set]
The latitude of the bus stop More...
string Longitude [get, set]
The longitude of the bus stop More...
string Bearing [get, set]
The bearing of the bus stop More...
string ServicesString [get, set]
string GroupName [get, set]
The Brand/Group of buses that most frequently visit this stop. Such as Purple, for the Purple 17s. More...

Detailed Description

Stores information about a single bus stop. Related to the "List Of Bus Stops" API.

Constructor & Destructor Documentation

BusStop() [1/2]

ReadingBusesAPI.BusStops.BusStop.BusStop ( )
package

The default constructor used for parsing data automatically.

BusStop() [2/2]

ReadingBusesAPI.BusStops.BusStop.BusStop ( string actoCode )

Used to create a snub/ fake object for passing to function calls, if all you need to pass is an acto-code to the function.

Parameters
actoCode ID of the bus stop.

Unless you are doing something very strange, you probably should not need to use this, it is more for testing purposes.

Member Function Documentation

GetArchivedTimeTable() [1/2]

Task<ArchivedBusTimeTable[]> ReadingBusesAPI.BusStops.BusStop.GetArchivedTimeTable ( DateTime date )

Gets the archived real bus departure and arrival times along with their time table history at this specific bus stop.

Parameters
date The date you want time table data for. This should be a date in the past.
Returns

GetArchivedTimeTable() [2/2]

Task<ArchivedBusTimeTable[]> ReadingBusesAPI.BusStops.BusStop.GetArchivedTimeTable ( DateTime date,
BusService service
)

Gets the archived real bus departure and arrival times along with their time table history at this specific bus stop.

Parameters
date The date you want time table data for. This should be a date in the past.
service (optional) the service you want time table data for specifically. If null, you get time table data for all services at this stop.
Returns

GetLiveData()

async Task<LiveRecord[]> ReadingBusesAPI.BusStops.BusStop.GetLiveData ( )

Gets live data from a bus stop.

Returns
Returns a list of Live Records, which are individual buses due to arrive at the bus stop.

GetPoint()

Point ReadingBusesAPI.BusStops.BusStop.GetPoint ( )

Gets the geographical position of the bus stop.

Returns
A Point Object for the position of the bus stop.

GetServices()

BusService [] ReadingBusesAPI.BusStops.BusStop.GetServices ( Company busOperator )

Finds the 'BusService' object for all of the bus services which visit this stop.

Parameters
busOperator
Returns
A list of BusService Objects for services which visit this bus stop.

GetTimeTable() [1/2]

Task<BusTimeTable[]> ReadingBusesAPI.BusStops.BusStop.GetTimeTable ( DateTime date )

Gets time table data at this specific bus stop.

Parameters
date The date you want time table data for.
Returns
An array of time table records for a particular bus stop.
Exceptions
ReadingBusesApiExceptionMalformedQuery If you have not provided any date.
ReadingBusesApiExceptionBadQuery Thrown if the API responds with an error message.
ReadingBusesApiExceptionCritical Thrown if the API fails, but provides no reason.

GetTimeTable() [2/2]

Task<BusTimeTable[]> ReadingBusesAPI.BusStops.BusStop.GetTimeTable ( DateTime date,
BusService service
)

Gets time table data at this specific bus stop.

Parameters
date The date you want time table data for.
service (optional) the service you want time table data for specifically. If null, you get time table data for all services at this stop.
Returns
An array of time table records for a particular bus stop.
Exceptions
ReadingBusesApiExceptionMalformedQuery If you have not provided any date.
ReadingBusesApiExceptionBadQuery Thrown if the API responds with an error message.
ReadingBusesApiExceptionCritical Thrown if the API fails, but provides no reason.

Property Documentation

ActoCode

string ReadingBusesAPI.BusStops.BusStop.ActoCode
get set

The unique identifier for a bus stop.

Bearing

string ReadingBusesAPI.BusStops.BusStop.Bearing
get set

The bearing of the bus stop

CommonName

string ReadingBusesAPI.BusStops.BusStop.CommonName
get set

The public, easy to understand stop name.

GroupName

string ReadingBusesAPI.BusStops.BusStop.GroupName
get set

The Brand/Group of buses that most frequently visit this stop. Such as Purple, for the Purple 17s.

Latitude

string ReadingBusesAPI.BusStops.BusStop.Latitude
get set

The latitude of the bus stop

Longitude

string ReadingBusesAPI.BusStops.BusStop.Longitude
get set

The longitude of the bus stop

ServicesString

string ReadingBusesAPI.BusStops.BusStop.ServicesString
get set

The services that travel to this stop, separated by '/'

See BusStop.GetServices(Operators) to get a list of Service Objects.


The documentation for this class was generated from the following file: