ReadingBusesAPI 2.1.0

Additional Details

As of the 6th of April 2021, R2P Group are decommissioning the Reading Buses Open Data API, for it to be replaced with a new API feed here: https://reading-opendata.r2p.com/ This current version of the library 2.1.0 will stop working once the old API has been switched off. Please use version 3.0.0 or higher to support the new API source. All other versions will no longer work.

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package ReadingBusesAPI --version 2.1.0
NuGet\Install-Package ReadingBusesAPI -Version 2.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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
#r "nuget: ReadingBusesAPI, 2.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ReadingBusesAPI as a Cake Addin
#addin nuget:?package=ReadingBusesAPI&version=2.1.0

// Install ReadingBusesAPI as a Cake Tool
#tool nuget:?package=ReadingBusesAPI&version=2.1.0

As of the 6th of April 2021, R2P Group are decommissioning the Reading Buses Open Data API, for it to be replaced with a new API feed here: https://reading-opendata.r2p.com This current version of the library (v2.1.0) will stop working once the old API has been switched off. An update will be released soon to make it compatible with the new API feed.

.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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 582 7/30/2022

* 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.