diff --git a/src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapClient.java b/src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapClient.java index 30c6e89..a450b7d 100644 --- a/src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapClient.java +++ b/src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapClient.java @@ -31,6 +31,7 @@ import com.github.prominence.openweathermap.api.request.onecall.OneCallWeatherRe import com.github.prominence.openweathermap.api.request.weather.CurrentWeatherRequester; import static com.github.prominence.openweathermap.api.enums.SubscriptionPlan.ALL; +import static com.github.prominence.openweathermap.api.enums.SubscriptionPlan.SPECIAL; /** * The main public API client to communicate with OpenWeatherMap services. @@ -80,6 +81,7 @@ public class OpenWeatherMapClient { * @return requester for retrieving one call weather information. */ @SubscriptionAvailability(plans = ALL) + @Deprecated public OneCallWeatherRequester oneCall() { return new OneCallWeatherRequester(new RequestSettings(apiKey, timeoutSettings)); } @@ -87,9 +89,15 @@ public class OpenWeatherMapClient { /** * One Call 3 API API. * Includes a weather summary statement in addition to the information provided by {@link #oneCall()} + * + * 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. + * * @return requester for retrieving one call weather information for the OneCall 3 API. */ - @SubscriptionAvailability(plans = ALL) + @SubscriptionAvailability(plans = SPECIAL) public OneCallWeatherRequester oneCall3() { RequestSettings requestSettings = new RequestSettings(apiKey, timeoutSettings); requestSettings.setUseApi3(); diff --git a/src/main/java/com/github/prominence/openweathermap/api/enums/SubscriptionPlan.java b/src/main/java/com/github/prominence/openweathermap/api/enums/SubscriptionPlan.java index b2419c7..d4ffbde 100644 --- a/src/main/java/com/github/prominence/openweathermap/api/enums/SubscriptionPlan.java +++ b/src/main/java/com/github/prominence/openweathermap/api/enums/SubscriptionPlan.java @@ -56,4 +56,9 @@ public enum SubscriptionPlan { * All existing subscription plans. */ ALL, + + /** + * Special subscription cases. + */ + SPECIAL, }