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.JourneyDetails.LiveRecord Class Reference

Used to store information about a buses arrival at a bus stop. Mainly related to the "Stop Predictions" API. More...

Public Member Functions

BusService Service ()
Returns the related BusService Object for the Bus LiveRecord. More...
string DisplayTime ()
Returns the number of min till bus is due in a min format. More...
double ArrivalMin ()
Returns the number of min till the bus is due to arrive. More...

Package Functions

LiveRecord ()
The default constructor, used for XML parsing. More...

Static Package Functions

static LiveRecord[] GetLiveData (string actoCode)
Gets a list of upcoming arrivals at a specific bus stop. Can throw an exception. More...

Properties

string ServiceNumber [get, set]
Holds the Service Number for the bus route. More...
string Destination [get, set]
Holds the destination for the bus. More...
DateTime SchArrival [get, set]
Holds scheduled arrival time of the bus at the location. More...
DateTime? ExptArrival [get, set]
Holds the estimated/ expected arrival time of the bus, if Null no estimated time exists yet. More...
Company OperatorCode [get, set]
Holds the operator of the service. More...
string VehicleRef [get, set]
Holds the Vehicles reference ID or number to identify it. More...
string ViaMessage [get, set]

Detailed Description

Used to store information about a buses arrival at a bus stop. Mainly related to the "Stop Predictions" API.

Constructor & Destructor Documentation

LiveRecord()

ReadingBusesAPI.JourneyDetails.LiveRecord.LiveRecord ( )
package

The default constructor, used for XML parsing.

Member Function Documentation

ArrivalMin()

double ReadingBusesAPI.JourneyDetails.LiveRecord.ArrivalMin ( )

Returns the number of min till the bus is due to arrive.

Returns
The number of min till the bus is due to arrive.

DisplayTime()

string ReadingBusesAPI.JourneyDetails.LiveRecord.DisplayTime ( )

Returns the number of min till bus is due in a min format.

Returns
The number of min until the bus is due to arrive in string format.

GetLiveData()

static LiveRecord [] ReadingBusesAPI.JourneyDetails.LiveRecord.GetLiveData ( string actoCode )
static package

Gets a list of upcoming arrivals at a specific bus stop. Can throw an exception.

Parameters
actoCode The Acto-code ID for a specific bus stop.
Returns
A list of Live Records containing details about upcoming buses.
Exceptions
ReadingBusesApiExceptionMalformedQuery Thrown if no data is returned from the API.
ReadingBusesApiExceptionBadQuery Thrown if you have used an invalid or expired API key or an invalid acto-code
ReadingBusesApiExceptionCritical Thrown if no error message or reasoning for fault is detectable.

Service()

BusService ReadingBusesAPI.JourneyDetails.LiveRecord.Service ( )

Returns the related BusService Object for the Bus LiveRecord.

Returns
Information about the current bus service object.
Exceptions
InvalidOperationException Can throw an exception if the service does not exists. This is however very unlikely, if this occurs there is an error in the API, not with your code.

Property Documentation

Destination

string ReadingBusesAPI.JourneyDetails.LiveRecord.Destination
get set

Holds the destination for the bus.

ExptArrival

DateTime? ReadingBusesAPI.JourneyDetails.LiveRecord.ExptArrival
get set

Holds the estimated/ expected arrival time of the bus, if Null no estimated time exists yet.

OperatorCode

Company ReadingBusesAPI.JourneyDetails.LiveRecord.OperatorCode
get set

Holds the operator of the service.

SchArrival

DateTime ReadingBusesAPI.JourneyDetails.LiveRecord.SchArrival
get set

Holds scheduled arrival time of the bus at the location.

ServiceNumber

string ReadingBusesAPI.JourneyDetails.LiveRecord.ServiceNumber
get set

Holds the Service Number for the bus route.

VehicleRef

string ReadingBusesAPI.JourneyDetails.LiveRecord.VehicleRef
get set

Holds the Vehicles reference ID or number to identify it.

ViaMessage

string ReadingBusesAPI.JourneyDetails.LiveRecord.ViaMessage
get set

Holds the 'Via' message, which explains where the bus is traveling past on route. Can be null or a place holder value if none exists.


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