
Product
Announcing Bun and vlt Support in Socket
Bringing supply chain security to the next generation of JavaScript package managers
tk.plogitech:darksky-forecast-api
Advanced tools
A java library to access the DarkSky weather forecast API.
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.
FAQs
A java library to access the DarkSky weather forecast API.
We found that tk.plogitech:darksky-forecast-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.