Git Product home page Git Product logo

darksky-forecast-api's Issues

Decimal formatting

There is a problem with the formatting of decimal numbers. In countries where the notation differs from something like 5.75 the url is not formatted correctly.

Example code from read.me at "https://github.com/200Puls/darksky-forecast-api":

ForecastRequest request = new ForecastRequestBuilder()
.key(new APIKey("key"))
.location(new GeoCoordinates(new Longitude(13.377704), new Latitude(52.516275))).build();

    DarkSkyJacksonClient client = new DarkSkyJacksonClient();
    //Forecast forecast = client.forecast(request);

    /* I added this to see what's happening -> */ System.out.println(request);

/System.out.println("forecast " + forecast);
System.out.println("forecast " + forecast.getCurrently().getTemperature());
/

You get the following by the "System.out.println(request);" statement:
ForecastRequest{url=https://api.darksky.net/forecast/key/52,516275,13,377704?lang=de&units=si}

But it should be something like this:
ForecastRequest{url=https://api.darksky.net/forecast/key/52.516275,13.377704?lang=de&units=si}

If you stick with commas you will get an http-response-code 400 "bad request". At least you are in a country like germany.

I tried to request data with "https://api.darksky.net/forecast/key/52.516275,13.377704?lang=de&units=si" and it worked pretty well.

Apart from this bug, you made an awesome job. This is a great library.

error when latitude or longitude is integer

Cannot construct instance of tk.plogitech.darksky.forecast.model.Longitude (although at least one Creator exists): no int/Int-argument constructor/factory method to deserialize from Number value (50)

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.