andmos / bikeshareclient Goto Github PK
View Code? Open in Web Editor NEWC# client for General Bikeshare Feed Specification (GBFS)
License: MIT License
C# client for General Bikeshare Feed Specification (GBFS)
License: MIT License
Example:
coverage:
status:
project:
default:
# basic
target: auto
threshold: 0%
ignore:
- test # - tests
public Client(string gbfsBaseUrl, HTTPClient httpClient = null)
or something to avoid breaking changes in the client.
There is no description on the NuGet package. Let's add one.
The GBFS standard has a GBFS.json file that returns available feeds. The client should use this file, not just baseurl.
Dependabot couldn't find a .(cs|vb|fs)proj for this project.
Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /<anything>.(cs|vb|fs)proj
.
If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.
Annotate the model types so that debugging is easier. The name of the class is of little use while debugging a list.
is_installed
, is_renting
, is_returning
etc. Can be converted from int to bool for better flow.
We need to mesure code coverage.
Need to update the BikeStatus
model to support is_reserved
and is_disabled
.
https://github.com/NABSA/gbfs/blob/v2.0/gbfs.md
See if
Change boolean from 1/0 to true/false
Can be supported without a breaking changes, support both formats etc.
After upgrading xUnit package, a couple of warnings shows up. The tests should be rewritten anyways, since some of the assert-usage is pointless in the first place.
TestBikeShareClient.cs(246,13): warning xUnit2002: Do not use Assert.NotNull() on value type 'DateTime'. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
TestBikeShareClient.cs(258,13): warning xUnit2002: Do not use Assert.NotNull() on value type 'DateTime'. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
TestBikeShareClient.cs(261,13): warning xUnit2002: Do not use Assert.NotNull() on value type 'int'. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
TestBikeShareClient.cs(263,13): warning xUnit2002: Do not use Assert.NotNull() on value type 'int'. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
TestBikeShareClient.cs(265,13): warning xUnit2002: Do not use Assert.NotNull() on value type 'int'. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
TestBikeShareClient.cs(221,13): warning xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
TestBikeShareClient.cs(235,13): warning xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection. [/app/TestBikeshareClient/TestBikeshareClient.csproj]
It would be great to publish an BikeshareClient.Aspnet
or something that implements
public static class ServiceCollectionExtensions
{
public static IHttpClientBuilder AddBikeshareClient(this IServiceCollection services)
=> services.AddHttpClient<IClient, BikeshareClient>();
}
As long as the client has a HTTPClient this should be rather straight forward.
If any mandatory endpoints is not implemented (like bike_status
) And the consumer calls the method for that endpoint, throw better exception.
Publish NuGet package to nuget.org
Some example code in the README demonstrating how to use the client would be nice.
Even if it is as simple as creating a client and providing a url ๐
The default dependabot "happy path" takes one csproj. Create a config also including the test-project.
After GBFS update: MobilityData/gbfs@44c8688
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.