ReadingBusesAPI 2.1.0

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

Supports: List of Bus Stops, Live Vehicle Positions, Stop Predictions, List of Services, Line Patterns, Timetabled Journeys, Tracking History and the Vehicle Position History API.

Install-Package ReadingBusesAPI -Version 2.1.0
dotnet add package ReadingBusesAPI --version 2.1.0
<PackageReference Include="ReadingBusesAPI" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ReadingBusesAPI --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

.NET Core
Codacy Badge
https://img.shields.io/badge/Documentation-View-blue

Reading Buses API

A C#, .net Standard Library for the Reading Buses API, available to use in your C# console, UWP, WPF or Win Form Applications.

The library supports the List of Bus Stops, Live Vehicle Positions, Stop Predictions, List of Services, Line Patterns, Timetabled Journeys, Tracking History and the Vehicle Position History API..

Get your own API Keys from: http://rtl2.ods-live.co.uk/cms/apiservice

Examples

Examples code can be found on the Examples Repository here

Documentation

Documentation can be found by online here or the "docs" folder of this repository.

Download & Installation

Get the package from the nuget store here

Very Quick Start

First you need to initialise the Library by providing your API key:

ReadingBuses Controller = await ReadingBuses.Initialise("APIKEY");

Once Initlised all future reference can be got using:

ReadingBuses Controller = ReadingBuses.GetInstance();

Get a List of Bus Services

To get a list of bus services operated by Reading Buses and the information about them you can do any of the following:

To get all Services:

BusService[] Services = Controller.GetServices();

To get all Services from a company:

BusService[] RBServices = Controller.GetServices(Company.ReadingBuses);
BusService[] KNServices = Controller.GetServices(Company.Kennections);

To get specific Services based on their brand:

BusService[] Services = Controller.GetServices("pink");

To get specific Service by Service Number and Company Operator:

BusService Services = Controller.GetService("17", Company.ReadingBuses);

Get a List of Locations (Bus Stops)

To get all locations

BusStop[] Locations = Controller.GetLocations();

To get location based on Acto-Code (Bus Stop ID)

BusStop Locations = Controller.GetLocation("33245365434");

Get GPS Data

To get Live GPS Data

LivePosition[] Positions = await Controller.GpsController.GetLiveVehiclePositions();

To get Archived GPS Data

LivePosition[] Positions = await Controller.GpsController.GetArchivedVehiclePositions(DateTime.Now.AddDays(-1), new TimeSpan(3, 0, 0));

Once you have the bus service or location you want to inspect, they have various properties to let you get further data about them. Such as live bus stop data, GPS data, bus service routes. For more examples please see the repository linked above.

.NET Core
Codacy Badge
https://img.shields.io/badge/Documentation-View-blue

Reading Buses API

A C#, .net Standard Library for the Reading Buses API, available to use in your C# console, UWP, WPF or Win Form Applications.

The library supports the List of Bus Stops, Live Vehicle Positions, Stop Predictions, List of Services, Line Patterns, Timetabled Journeys, Tracking History and the Vehicle Position History API..

Get your own API Keys from: http://rtl2.ods-live.co.uk/cms/apiservice

Examples

Examples code can be found on the Examples Repository here

Documentation

Documentation can be found by online here or the "docs" folder of this repository.

Download & Installation

Get the package from the nuget store here

Very Quick Start

First you need to initialise the Library by providing your API key:

ReadingBuses Controller = await ReadingBuses.Initialise("APIKEY");

Once Initlised all future reference can be got using:

ReadingBuses Controller = ReadingBuses.GetInstance();

Get a List of Bus Services

To get a list of bus services operated by Reading Buses and the information about them you can do any of the following:

To get all Services:

BusService[] Services = Controller.GetServices();

To get all Services from a company:

BusService[] RBServices = Controller.GetServices(Company.ReadingBuses);
BusService[] KNServices = Controller.GetServices(Company.Kennections);

To get specific Services based on their brand:

BusService[] Services = Controller.GetServices("pink");

To get specific Service by Service Number and Company Operator:

BusService Services = Controller.GetService("17", Company.ReadingBuses);

Get a List of Locations (Bus Stops)

To get all locations

BusStop[] Locations = Controller.GetLocations();

To get location based on Acto-Code (Bus Stop ID)

BusStop Locations = Controller.GetLocation("33245365434");

Get GPS Data

To get Live GPS Data

LivePosition[] Positions = await Controller.GpsController.GetLiveVehiclePositions();

To get Archived GPS Data

LivePosition[] Positions = await Controller.GpsController.GetArchivedVehiclePositions(DateTime.Now.AddDays(-1), new TimeSpan(3, 0, 0));

Once you have the bus service or location you want to inspect, they have various properties to let you get further data about them. Such as live bus stop data, GPS data, bus service routes. For more examples please see the repository linked above.

Release Notes

* Converted to .Net Standard for widder usage across .net applications!
* Altered Naming of some Namespaces to enforce proper conventions.
* Added new get all services by operator type.
* Added Support for the Timetable Journeys API.
* Added Support for the Tracking History API.
* Added Support for the Vehicle Position History API.
* Added Support for the Timetabled Journeys API.
* Added Support for the Live Vehicle Position API.
* Added Support for multiple different operator types.
* Added proper Exception Handling and improved information provided about the cause of the error.
* Deprecated printing functions
* Improved Asynchronous Activities for better performance
* Added in unit tests for improved quality.
* Created new documentation and updated examples
* Fixed bug caused when two services had the same ID from different operators.
* Implemented namespaces for better separation of classes.
* General code clean up for ease of use and performance.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.0 105 6/9/2020
2.0.0 64 6/8/2020