Skip to content

This is a library for the OpenWeatherMap.org restful web service.

License

Notifications You must be signed in to change notification settings

Rosisoft3/Java-API-OpenWeatherMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

OpenWeatherMap

Weather API - OpenWeatherMap,

Description

This library is for getting information about the weather (current weather data, 5- and 16-day forecasts...), using the OpenWeatherMap.orgrestful web service.

Features

Current & Forecast weather data collection: *Current weather data *16 day / daily forecast *5 day / 3 hour forecast

Requirements

Installation

Before you start, ensure you have your own OpenWeather API-Key to be able to retrieve the weather data.

  • Summary of set up An example for using this library:
#!java

public static void main(String[] args)
 	{ 		
 		try
 		{
      // Place your OpenWeather API-Key
       String API-Key ="***";
       IWeatherDataService dataService = DataServiceFactory.getWeatherService(service.OPEN_WEATHER_MAP,API-Key);
       WeatherForecastDaily	data =   dataService.GET_16_DAY_WEATHER_FORECAST_DATA_BY_CITY_NAME("Constantine","dz");
       CurrentWeather data2 = dataService.GET_CURRENT_WEATHER_DATA_BY_CITY_NAME("Toronto","on");
       WeatherForecast data3 = dataService.GET_5_DAY_WEATHER_FORECAST_DATA_BY_CITY_NAME("London","uk");           
 		}
 		catch (WeatherDataServiceException e)
 		{
 			e.printStackTrace();
 		}
 	}

License

*GNU Lesser General Public License v3.0

Contact me

Releases

No releases published

Packages

No packages published

Languages