All Projects → 200Puls → darksky-forecast-api

200Puls / darksky-forecast-api

Licence: MIT license
darksky-forecast-api is a Java library to access the darksky.net weather API

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to darksky-forecast-api

weather-api
A RESTful API to check the weather
Stars: ✭ 209 (+514.71%)
Mutual labels:  weather-api
WallberryTheme
Bringing the WallberryTheme to MagicMirror²
Stars: ✭ 94 (+176.47%)
Mutual labels:  darksky
cuba-weather-python
Application programming interface of the Cuba Weather project implemented in Python
Stars: ✭ 17 (-50%)
Mutual labels:  weather-api
weather-app-android-mvvm
Simple MVVM practice repository for very very beginners. You don't need to know about Dagger, Coroutine or Rx for understanding MVVM and this project. To check the MVVM Architecture Bengali Tutorial visit my blog site
Stars: ✭ 32 (-5.88%)
Mutual labels:  weather-api
MMM-forecast-io
Forecast.io Module for MagicMirror
Stars: ✭ 58 (+70.59%)
Mutual labels:  darksky
meteofrance-api
Python client for Météo-France API. | Client python pour l'API Météo-France
Stars: ✭ 50 (+47.06%)
Mutual labels:  weather-api
Open-Weather-API-Wrapper
An Android wrapper for the APIs of https://openweathermap.org
Stars: ✭ 23 (-32.35%)
Mutual labels:  weather-api
dwdweather2
Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.
Stars: ✭ 68 (+100%)
Mutual labels:  weather-api
OWM-JAPIs
Java APIs for OpenWeatherMap.org
Stars: ✭ 14 (-58.82%)
Mutual labels:  weather-api
SkyMate
⚡ Weather app that fetches real time weather data of any location
Stars: ✭ 18 (-47.06%)
Mutual labels:  weather-api
Weather-Man
weather app with darksky api in flutter
Stars: ✭ 29 (-14.71%)
Mutual labels:  weather-api
Wttr.in
⛅ The right way to check the weather
Stars: ✭ 16,345 (+47973.53%)
Mutual labels:  weather-api
info-bot
🤖 A Versatile Telegram Bot
Stars: ✭ 37 (+8.82%)
Mutual labels:  weather-api
riem
✈️ ☀️ R package for accessing ASOS data via the Iowa Environment Mesonet ☁️ ✈️
Stars: ✭ 38 (+11.76%)
Mutual labels:  weather-api
api
Community discussion and documentation for the NWS API
Stars: ✭ 168 (+394.12%)
Mutual labels:  weather-api
react-weather-app
⛅️ PWA Weather App made with ReactJS
Stars: ✭ 147 (+332.35%)
Mutual labels:  weather-api
rainviewer-api-example
How to use RainViewer API: simple HTML + JS code which render an animated weather radar overlay on the map
Stars: ✭ 56 (+64.71%)
Mutual labels:  weather-api
codetabs
Free Online Services. Github/GitLab star history. Count Lines of Code. CORS proxy server. IP GeoLocation. Convert Video to Gif. HTTP Headers. Api weather temp. Alexa ranking.
Stars: ✭ 114 (+235.29%)
Mutual labels:  weather-api
pirate-weather-ha
Replacement for the default Dark Sky Home Assistant integration using Pirate Weather
Stars: ✭ 193 (+467.65%)
Mutual labels:  weather-api
Weather
Weather Android App using apixu API https://www.apixu.com
Stars: ✭ 48 (+41.18%)
Mutual labels:  weather-api

darksky-forecast-api

  • darksky-forecast-api is a Java library to access the darksky.net weather API
  • No dependencies for the the base library
  • You can pipe the response to the JSON framework of choice or use it directly as String, Stream or byte[] (e.g. poxying)
  • For Jackson users there is darksky-forecast-api-jackson to get the Forecast parsed as Java beans. This library includes the base library as dependency.
  • deployed to Maven Central
  • Javadoc available: https://200puls.github.io/darksky-forecast-api/
  • Full Java 9 module support (2.0.2 use 1.3.1 for java 8 sources)

Example usage for base library:

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

    DarkSkyClient client = new DarkSkyClient();
    String forecast = client.forecastJsonString(request);

The response can be returned as byte[], String or InputStream. Useful if you want to proxy the API or only save the result.

The API also supports time machine requests and other API parameters:

    ForecastRequest request = new ForecastRequestBuilder()
        .key(new APIKey("your-private-key"))
        .time(Instant.now().minus(5, ChronoUnit.DAYS))
        .language(ForecastRequestBuilder.Language.de)
        .units(ForecastRequestBuilder.Units.us)
        .exclude(ForecastRequestBuilder.Block.minutely)
        .extendHourly()
        .location(new GeoCoordinates(new Longitude(13.377704), new Latitude(52.516275))).build();

    DarkSkyClient client = new DarkSkyClient();
    String forecast = client.forecastJsonString(request);

The Maven dependency is:

      <dependency>
            <groupId>tk.plogitech</groupId>
            <artifactId>darksky-forecast-api</artifactId>
            <version>2.0.2</version>
     </dependency>

Example usage for the Jackson library:

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

    DarkSkyJacksonClient client = new DarkSkyJacksonClient();
    Forecast forecast = client.forecast(request);
    System.out.println("forecast " + forecast);
    System.out.println("forecast " + forecast.getCurrently().getTemperature());

The Maven dependency for the Jackson library is:

    <dependency>
            <groupId>tk.plogitech</groupId>
            <artifactId>darksky-forecast-api-jackson</artifactId>
            <version>2.0.2</version>
    </dependency>

It pulls in the base library automatically.

For more information about Request and Response format see: DarkSky documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].