Git Product home page Git Product logo

looker's Issues

Code Review Suggestions

Suggestion #1:
HttpClient is intended to be reused, instead of creating multiple instances for a request, you can use one HttpClient instance to handle multiple asynchronous requests
Line:

HttpClient client = new HttpClient();

Suggestion #2:
The ToEvent method looks brittle, it uses long.Parse which will through various exceptions in certain cases, there are no sanity checks performed to see if the string is a correct Int64 and if it contains content. It may be good to use TryParse(string, out long);
Line:

public static Event ToEvent(this RawEvent @event)

Suggestion #3:
Instead of concatenating the URL you could use a UriBuilder to do this for you, and pass a Uri object to your GetX methods. Using a Uri object will add an extra bit of sanity that says this is a correct URL before it gets as far as attempting to send a request.
Line:

item.Venue = GetVenue(requests.VenueGetUrl + item.Venue + @"/?" + requests.AuthToken).Result;

Suggestion 4:
It isn't necessary to use an @ symbol when indexing your deserialized JObject

Suggestion 5:
It is safer to deserialize to a strong object instead of indexing on key names, spelling mistakes could happen.

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.