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.TimeTable.ArchivedBusTimeTable Class Reference

Represents and retrieves information about a actual single time table record, which means information on one bus at one location. Related to the "Tracking History" API. More...

Inheritance diagram for ReadingBusesAPI.TimeTable.ArchivedBusTimeTable:
ReadingBusesAPI.TimeTable.TimeTableRecord

Public Member Functions

double ArrivalLateness ()
How late the bus was to arrive at a bus stop. More...
double DepartureLateness ()
How late the bus was to departure at a bus stop. More...
- Public Member Functions inherited from ReadingBusesAPI.TimeTable.TimeTableRecord
BusService GetService ()
Gets the related 'BusService' object relating to the time table record. More...

Package Functions

ArchivedBusTimeTable ()
Default constructor to prevent creating an object directly outside the API. More...
- Package Functions inherited from ReadingBusesAPI.TimeTable.TimeTableRecord
TimeTableRecord ()
Default constructor, to block creating objects directly. More...

Static Package Functions

static async Task< ArchivedBusTimeTable[]> GetTimeTable (BusService service, DateTime date, BusStop location, string vehicle)
Gets the actual arrival and departure times of a bus, by service, date, location and/or vehicle ID. More...
static async Task< IGrouping< string, ArchivedBusTimeTable >[]> GetGroupedTimeTable (BusService service, DateTime date, BusStop location, string vehicle)
Gets the time table for a service and groups it by a journey code instead of one continuous array of time table entries. More...

Properties

DateTime? ActArrivalTime [get, set]
The actual arrival time for the bus. More...
DateTime? ActDepartureTime [get, set]
The actual departure time for the bus. More...
- Properties inherited from ReadingBusesAPI.TimeTable.TimeTableRecord
string ServiceNumber [get, set]
The service number of the bus. More...
Company Operator [get, set]
The operator of the bus services More...
BusStop Location [get, set]
The 'BusStop' object for the stop relating to the time table record.. More...
long Sequence [get, set]
What number bus stop is this in the buses route, ie 1, is the first stop to visit. More...
Direction Direction [get, set]
Is this bus heading inbound or outbound. More...
string JourneyCode [get, set]
bool IsTimingPoint [get, set]
DateTime SchArrivalTime [get, set]
The scheduled arrival time for the bus. More...
DateTime SchDepartureTime [get, set]
The scheduled departure time for the bus. More...

Detailed Description

Represents and retrieves information about a actual single time table record, which means information on one bus at one location. Related to the "Tracking History" API.

Constructor & Destructor Documentation

ArchivedBusTimeTable()

ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.ArchivedBusTimeTable ( )
package

Default constructor to prevent creating an object directly outside the API.

Member Function Documentation

ArrivalLateness()

double ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.ArrivalLateness ( )

How late the bus was to arrive at a bus stop.

Returns
The number of seconds the bus was late to arrive by. If no arrival time can be found, 0 is returned.

DepartureLateness()

double ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.DepartureLateness ( )

How late the bus was to departure at a bus stop.

Returns
The number of seconds the bus was late to departure by. If no departure time can be found, 0 is returned.

GetGroupedTimeTable()

static async Task<IGrouping<string, ArchivedBusTimeTable>[]> ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.GetGroupedTimeTable ( BusService service,
DateTime date,
BusStop location,
string vehicle
)
static package

Gets the time table for a service and groups it by a journey code instead of one continuous array of time table entries.

Parameters
service The bus services you wish to view.
date The date of the time table.
location The location to get timetable data from.
vehicle A bus/Vehicle ID number.
Returns
Returns an IGroupings of Arrays of 'BusTimeTable' records grouped by journey codes.
Exceptions
ReadingBusesApiExceptionMalformedQuery If you have tried to get data for a date in the future. Or if you have not provided any date, and/or you have not provided at least either the service or location or vehicle.
ReadingBusesApiExceptionBadQuery Thrown if the API responds with an error message.
ReadingBusesApiExceptionCritical Thrown if the API fails, but provides no reason.

GetTimeTable()

static async Task<ArchivedBusTimeTable[]> ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.GetTimeTable ( BusService service,
DateTime date,
BusStop location,
string vehicle
)
static package

Gets the actual arrival and departure times of a bus, by service, date, location and/or vehicle ID.

Parameters
service The bus services you wish to view.
date The date of the time table.
location The location to get timetable data from.
vehicle A bus/Vehicle ID number.
Returns
An array of time table records for the service or location or both
Exceptions
ReadingBusesApiExceptionMalformedQuery If you have tried to get data for a date in the future. Or if you have not provided any date, and/or you have not provided at least either the service or location or vehicle.
ReadingBusesApiExceptionBadQuery Thrown if the API responds with an error message.
ReadingBusesApiExceptionCritical Thrown if the API fails, but provides no reason.

See also BusTimeTable.GetTimeTable(BusService , DateTime ,BusStop) to get future time table data instead.

Property Documentation

ActArrivalTime

DateTime? ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.ActArrivalTime
get set

The actual arrival time for the bus.

ActDepartureTime

DateTime? ReadingBusesAPI.TimeTable.ArchivedBusTimeTable.ActDepartureTime
get set

The actual departure time for the bus.


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