Class OpenWeatherMapClient
java.lang.Object
com.github.prominence.openweathermap.api.OpenWeatherMapClient
The main public API client to communicate with OpenWeatherMap services.
Requires API key for usage. More info on the website https://openweathermap.org/api.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAir Pollution API.Current Weather API.5 Day / 3 Hour Forecast API.oneCall()Deprecated.oneCall3()One Call 3 API API.voidsetConnectionTimeout(int connectionTimeout) voidsetReadTimeout(int readTimeout)
-
Constructor Details
-
OpenWeatherMapClient
Created OpenWeatherMap client object.- Parameters:
apiKey- API key obtained on OpenWeatherMap site.
-
-
Method Details
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout) -
setReadTimeout
public void setReadTimeout(int readTimeout) -
currentWeather
Current Weather API.- Returns:
- requester for retrieving current weather information.
-
forecast5Day3HourStep
5 Day / 3 Hour Forecast API.- Returns:
- requester for retrieving 5 day/3-hour weather forecast information.
-
oneCall
Deprecated.One Call API. To get information about current weather, minute forecast for 1 hour, hourly forecast for 48 hours, daily forecast for 7 days and government weather alerts.- Returns:
- requester for retrieving one call weather information.
-
oneCall3
One Call 3 API API. Includes a weather summary statement in addition to the information provided byoneCall()Please note, that One Call API 3.0 is included in the "One Call by Call" subscription only. This separate subscription includes 1,000 calls/day for free and allows you to pay only for the number of API calls made to this product. Please note, that you do not need to subscribe to any other OpenWeather subscription plans to get access to the One Call API 3.0. Please find more details on the pricing page and FAQ or ask Ulla, OpenWeather AI assistant.- Returns:
- requester for retrieving one call weather information for the OneCall 3 API.
-
airPollution
Air Pollution API. Air Pollution API provides current, forecast and historical air pollution data for any coordinates on the globe.- Returns:
- requester for air pollution information retrieval.
-