Code Monkey home page Code Monkey logo

bikeshareclient's People

Contributors

andmos avatar dependabot-preview[bot] avatar dependabot[bot] avatar hjerpbakk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ericsellers

bikeshareclient's Issues

Make HTTPClient injectable

public Client(string gbfsBaseUrl, HTTPClient httpClient = null) or something to avoid breaking changes in the client.

Handle GBFS.json

The GBFS standard has a GBFS.json file that returns available feeds. The client should use this file, not just baseurl.

Rewrite xUnit tests to remove warnings

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]

Create Microsoft.Extensions.DependencyInjection extention for client

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.

Improve documentation in README

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 ๐Ÿ˜…

Add dependabot config

The default dependabot "happy path" takes one csproj. Create a config also including the test-project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.