Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

BikeshareClient

Dotnet client for the General Bikeshare Feed Specification (GBFS). Mainly used against Urban Infrastructure Partner, with Trondheim City Bike and Bergen City Bike.

For all available GBFS systems, see the system overview from the GBFS project.

Supports the required fields in the GBFS standard for now.

// Create the client from a GBFS API URL.
IBikeshareClient client = new Client("http://gbfs.urbansharing.com/trondheim/gbfs.json");

// Or with an existing HTTPClient
IBikeshareClient client = new Client("http://gbfs.urbansharing.com/trondheim/gbfs.json", httpClient);

// All available stations, containing name, id, lat, long, address and capacity
var stations = await client.GetStationsAsync();

// All stations status, containing number of bikes and docks available, is renting, is returning etc.
var statuses = await client.GetStationsStatusAsync();

A simple dotnet-script test script for the client can be seen here.

Simple build:

docker run --rm -it -v $(pwd):/app mcr.microsoft.com/dotnet/sdk:5.0 dotnet pack app/src/BikeshareClient -o /app

Run test script:

docker run --rm -it -v $(pwd)/src/TestScript/:/scripts  andmos/dotnet-script main.csx "Skansen"

Build Status

codecov

NuGet

Dependabot Status

GBFS is a standard backed by the North American Bike Share Association (NABSA).

About

C# client for General Bikeshare Feed Specification (GBFS)

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •