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.BusTimeTable Class Reference

Represents and retrieves information about a scheduled/predicted single time table record, which means information on one bus at one location. Related to the "Timetabled Journeys" API. More...

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

Package Functions

BusTimeTable ()
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< BusTimeTable[]> GetTimeTable (BusService service, DateTime date, BusStop location)
Gets the time table of a service or a location as one array of 'BusTimeTable' objects. More...
static async Task< IGrouping< string, BusTimeTable >[]> GetGroupedTimeTable (BusService service, DateTime date, BusStop location)
Gets the time table for a service and groups it by a journey code instead of one continuous array of time table entries. More...

Additional Inherited Members

- Public Member Functions inherited from ReadingBusesAPI.TimeTable.TimeTableRecord
BusService GetService ()
Gets the related 'BusService' object relating to the time table record. 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 scheduled/predicted single time table record, which means information on one bus at one location. Related to the "Timetabled Journeys" API.

Constructor & Destructor Documentation

BusTimeTable()

ReadingBusesAPI.TimeTable.BusTimeTable.BusTimeTable ( )
package

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

Member Function Documentation

GetGroupedTimeTable()

static async Task<IGrouping<string, BusTimeTable>[]> ReadingBusesAPI.TimeTable.BusTimeTable.GetGroupedTimeTable ( BusService service,
DateTime date,
BusStop location
)
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.
Returns
Returns an IGroupings of Arrays of 'BusTimeTable' records grouped by journey codes.
Exceptions
ReadingBusesApiExceptionMalformedQuery If you have not provided any date, and/or you have not provided at least either the service or location.
ReadingBusesApiExceptionBadQuery Thrown if the API responds with an error message.
ReadingBusesApiExceptionCritical Thrown if the API fails, but provides no reason.

GetTimeTable()

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

Gets the time table of a service or a location as one array of 'BusTimeTable' objects.

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

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