A lightweight Java SDK for seamless integration with the OpenWeatherMap API. Built for efficiency and ease of use.
<dependency>
<groupId>com.github.trelawnm.weathersdk</groupId>
<artifactId>weather-sdk</artifactId>
<version>1.1.0</version>
</dependency>// Initialize SDK
WeatherSDK sdk = new WeatherSDK.Builder("your-api-key")
.mode(WeatherSDKMode.POLLING)
.build();
// Get weather data
String weatherJson = sdk.getWeather("London");
WeatherResponse weather = sdk.getWeatherObj("Paris");
// Cleanup
sdk.shutdown();
sdk.clearCache();- Smart Caching - Reduces API calls with configurable TTL
- Dual Operation Modes - On-demand or background polling
- Free Tier Friendly - Optimized for OpenWeatherMap's free plan
- Thread-Safe - Built for concurrent applications
This project is licensed under the MIT License - see the LICENSE file for details.
Get your free API key at OpenWeatherMap.org 🌤️
