Skip to content

DarkDomian/weather-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather SDK

Release License Java

A lightweight Java SDK for seamless integration with the OpenWeatherMap API. Built for efficiency and ease of use.

weather badge image

Quick Start

Installation

<dependency>
    <groupId>com.github.trelawnm.weathersdk</groupId>
    <artifactId>weather-sdk</artifactId>
    <version>1.1.0</version>
</dependency>

Basic Usage

// 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();

Key Features

  • 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

Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.


Get your free API key at OpenWeatherMap.org 🌤️

About

Software Development Kit for OpenWeatherMap API

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages