diff --git a/.gitignore b/.gitignore index ddf57da..47bfbba 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ hs_err_pid* *.iml .idea/ +target/ **/ApplicationTest.java \ No newline at end of file diff --git a/README.md b/README.md index eb9a1ba..287bf98 100644 --- a/README.md +++ b/README.md @@ -259,5 +259,8 @@ Forecasts: | Unit.IMPERIAL_SYSTEM | Fahrenheit, miles/hour, hPa, mm(rain, snow). | | Unit.STANDARD_SYSTEM | Kelvin, meter/sec, hPa, mm(rain, snow) | +### Dependencies +* com.alibaba:fastjson:1.2.44 + ### License MIT diff --git a/pom.xml b/pom.xml index b4d0510..8ce86cb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,9 +4,42 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - openweather-api - by.prominence.openweatermap.api + com.github.prominence + openweathermap-api 1.0-SNAPSHOT + jar + + Java OpenWeatherMap API + Java API for OpenWeatherMap services. + https://github.com/Prominence/openweathermap-java-api + + + https://github.com/Prominence/openweathermap-java-api + scm:git:git://github.com/Prominence/openweathermap-java-api.git + scm:git:git@github.com:prominence/openweathermap-java-api.git + + + + https://github.com/Prominence/openweathermap-java-api/issues + GitHub Issues + + + + + MIT License + http://www.opensource.org/licenses/mit-license.php + repo + + + + + + prominence96@gmail.com + Alexey Zinchenko + https://github.com/prominence + Prominence + + diff --git a/src/main/java/by/prominence/openweathermap/api/AuthenticationTokenBasedRequester.java b/src/main/java/com/github/prominence/openweathermap/api/AuthenticationTokenBasedRequester.java similarity index 96% rename from src/main/java/by/prominence/openweathermap/api/AuthenticationTokenBasedRequester.java rename to src/main/java/com/github/prominence/openweathermap/api/AuthenticationTokenBasedRequester.java index ee35c54..5c005ea 100644 --- a/src/main/java/by/prominence/openweathermap/api/AuthenticationTokenBasedRequester.java +++ b/src/main/java/com/github/prominence/openweathermap/api/AuthenticationTokenBasedRequester.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api; +package com.github.prominence.openweathermap.api; abstract class AuthenticationTokenBasedRequester { diff --git a/src/main/java/by/prominence/openweathermap/api/BasicRequester.java b/src/main/java/com/github/prominence/openweathermap/api/BasicRequester.java similarity index 89% rename from src/main/java/by/prominence/openweathermap/api/BasicRequester.java rename to src/main/java/com/github/prominence/openweathermap/api/BasicRequester.java index 0fca97c..3ad3b20 100644 --- a/src/main/java/by/prominence/openweathermap/api/BasicRequester.java +++ b/src/main/java/com/github/prominence/openweathermap/api/BasicRequester.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api; +package com.github.prominence.openweathermap.api; -import by.prominence.openweathermap.api.constants.System; -import by.prominence.openweathermap.api.constants.Unit; -import by.prominence.openweathermap.api.exception.DataNotFoundException; -import by.prominence.openweathermap.api.exception.InvalidAuthTokenException; -import by.prominence.openweathermap.api.model.Coordinates; +import com.github.prominence.openweathermap.api.constants.System; +import com.github.prominence.openweathermap.api.constants.Unit; +import com.github.prominence.openweathermap.api.exception.DataNotFoundException; +import com.github.prominence.openweathermap.api.exception.InvalidAuthTokenException; +import com.github.prominence.openweathermap.api.model.Coordinates; import java.net.MalformedURLException; import java.net.URL; diff --git a/src/main/java/by/prominence/openweathermap/api/HourlyForecastRequester.java b/src/main/java/com/github/prominence/openweathermap/api/HourlyForecastRequester.java similarity index 84% rename from src/main/java/by/prominence/openweathermap/api/HourlyForecastRequester.java rename to src/main/java/com/github/prominence/openweathermap/api/HourlyForecastRequester.java index dbfd8ff..6841376 100644 --- a/src/main/java/by/prominence/openweathermap/api/HourlyForecastRequester.java +++ b/src/main/java/com/github/prominence/openweathermap/api/HourlyForecastRequester.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api; +package com.github.prominence.openweathermap.api; -import by.prominence.openweathermap.api.constants.Unit; -import by.prominence.openweathermap.api.exception.DataNotFoundException; -import by.prominence.openweathermap.api.exception.InvalidAuthTokenException; -import by.prominence.openweathermap.api.model.response.HourlyForecast; -import by.prominence.openweathermap.api.utils.JsonUtils; -import by.prominence.openweathermap.api.utils.RequestUtils; +import com.github.prominence.openweathermap.api.constants.Unit; +import com.github.prominence.openweathermap.api.exception.DataNotFoundException; +import com.github.prominence.openweathermap.api.exception.InvalidAuthTokenException; +import com.github.prominence.openweathermap.api.model.response.HourlyForecast; +import com.github.prominence.openweathermap.api.utils.JsonUtils; +import com.github.prominence.openweathermap.api.utils.RequestUtils; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/by/prominence/openweathermap/api/OpenWeatherMapManager.java b/src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapManager.java similarity index 96% rename from src/main/java/by/prominence/openweathermap/api/OpenWeatherMapManager.java rename to src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapManager.java index ac5c6cf..7137b7f 100644 --- a/src/main/java/by/prominence/openweathermap/api/OpenWeatherMapManager.java +++ b/src/main/java/com/github/prominence/openweathermap/api/OpenWeatherMapManager.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api; +package com.github.prominence.openweathermap.api; public class OpenWeatherMapManager { diff --git a/src/main/java/by/prominence/openweathermap/api/WeatherRequester.java b/src/main/java/com/github/prominence/openweathermap/api/WeatherRequester.java similarity index 83% rename from src/main/java/by/prominence/openweathermap/api/WeatherRequester.java rename to src/main/java/com/github/prominence/openweathermap/api/WeatherRequester.java index 7ee42fe..08ab60b 100644 --- a/src/main/java/by/prominence/openweathermap/api/WeatherRequester.java +++ b/src/main/java/com/github/prominence/openweathermap/api/WeatherRequester.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api; +package com.github.prominence.openweathermap.api; -import by.prominence.openweathermap.api.constants.Unit; -import by.prominence.openweathermap.api.exception.DataNotFoundException; -import by.prominence.openweathermap.api.exception.InvalidAuthTokenException; -import by.prominence.openweathermap.api.model.response.Weather; -import by.prominence.openweathermap.api.utils.JsonUtils; -import by.prominence.openweathermap.api.utils.RequestUtils; +import com.github.prominence.openweathermap.api.constants.Unit; +import com.github.prominence.openweathermap.api.exception.DataNotFoundException; +import com.github.prominence.openweathermap.api.exception.InvalidAuthTokenException; +import com.github.prominence.openweathermap.api.model.response.Weather; +import com.github.prominence.openweathermap.api.utils.JsonUtils; +import com.github.prominence.openweathermap.api.utils.RequestUtils; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/by/prominence/openweathermap/api/constants/Accuracy.java b/src/main/java/com/github/prominence/openweathermap/api/constants/Accuracy.java similarity index 95% rename from src/main/java/by/prominence/openweathermap/api/constants/Accuracy.java rename to src/main/java/com/github/prominence/openweathermap/api/constants/Accuracy.java index 6554cf7..435cf0c 100644 --- a/src/main/java/by/prominence/openweathermap/api/constants/Accuracy.java +++ b/src/main/java/com/github/prominence/openweathermap/api/constants/Accuracy.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.constants; +package com.github.prominence.openweathermap.api.constants; public final class Accuracy { diff --git a/src/main/java/by/prominence/openweathermap/api/constants/Language.java b/src/main/java/com/github/prominence/openweathermap/api/constants/Language.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/constants/Language.java rename to src/main/java/com/github/prominence/openweathermap/api/constants/Language.java index 34417b2..756726b 100644 --- a/src/main/java/by/prominence/openweathermap/api/constants/Language.java +++ b/src/main/java/com/github/prominence/openweathermap/api/constants/Language.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.constants; +package com.github.prominence.openweathermap.api.constants; public final class Language { diff --git a/src/main/java/by/prominence/openweathermap/api/constants/System.java b/src/main/java/com/github/prominence/openweathermap/api/constants/System.java similarity index 95% rename from src/main/java/by/prominence/openweathermap/api/constants/System.java rename to src/main/java/com/github/prominence/openweathermap/api/constants/System.java index 96f0848..d429c29 100644 --- a/src/main/java/by/prominence/openweathermap/api/constants/System.java +++ b/src/main/java/com/github/prominence/openweathermap/api/constants/System.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.constants; +package com.github.prominence.openweathermap.api.constants; public final class System { diff --git a/src/main/java/by/prominence/openweathermap/api/constants/Unit.java b/src/main/java/com/github/prominence/openweathermap/api/constants/Unit.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/constants/Unit.java rename to src/main/java/com/github/prominence/openweathermap/api/constants/Unit.java index 532dde0..594013b 100644 --- a/src/main/java/by/prominence/openweathermap/api/constants/Unit.java +++ b/src/main/java/com/github/prominence/openweathermap/api/constants/Unit.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.constants; +package com.github.prominence.openweathermap.api.constants; public final class Unit { diff --git a/src/main/java/by/prominence/openweathermap/api/exception/DataNotFoundException.java b/src/main/java/com/github/prominence/openweathermap/api/exception/DataNotFoundException.java similarity index 95% rename from src/main/java/by/prominence/openweathermap/api/exception/DataNotFoundException.java rename to src/main/java/com/github/prominence/openweathermap/api/exception/DataNotFoundException.java index 00d5e74..a84297d 100644 --- a/src/main/java/by/prominence/openweathermap/api/exception/DataNotFoundException.java +++ b/src/main/java/com/github/prominence/openweathermap/api/exception/DataNotFoundException.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.exception; +package com.github.prominence.openweathermap.api.exception; public class DataNotFoundException extends Exception { diff --git a/src/main/java/by/prominence/openweathermap/api/exception/InvalidAuthTokenException.java b/src/main/java/com/github/prominence/openweathermap/api/exception/InvalidAuthTokenException.java similarity index 95% rename from src/main/java/by/prominence/openweathermap/api/exception/InvalidAuthTokenException.java rename to src/main/java/com/github/prominence/openweathermap/api/exception/InvalidAuthTokenException.java index 1f1c0af..cecfd5f 100644 --- a/src/main/java/by/prominence/openweathermap/api/exception/InvalidAuthTokenException.java +++ b/src/main/java/com/github/prominence/openweathermap/api/exception/InvalidAuthTokenException.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.exception; +package com.github.prominence.openweathermap.api.exception; public class InvalidAuthTokenException extends Exception { diff --git a/src/main/java/by/prominence/openweathermap/api/model/Clouds.java b/src/main/java/com/github/prominence/openweathermap/api/model/Clouds.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/model/Clouds.java rename to src/main/java/com/github/prominence/openweathermap/api/model/Clouds.java index 000d3a2..6b3afaf 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/Clouds.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/Clouds.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/by/prominence/openweathermap/api/model/Coordinates.java b/src/main/java/com/github/prominence/openweathermap/api/model/Coordinates.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/model/Coordinates.java rename to src/main/java/com/github/prominence/openweathermap/api/model/Coordinates.java index 99238bf..b5f06d4 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/Coordinates.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/Coordinates.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/by/prominence/openweathermap/api/model/OpenWeatherResponse.java b/src/main/java/com/github/prominence/openweathermap/api/model/OpenWeatherResponse.java similarity index 95% rename from src/main/java/by/prominence/openweathermap/api/model/OpenWeatherResponse.java rename to src/main/java/com/github/prominence/openweathermap/api/model/OpenWeatherResponse.java index ec6c209..ce6a60f 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/OpenWeatherResponse.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/OpenWeatherResponse.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; public interface OpenWeatherResponse { diff --git a/src/main/java/by/prominence/openweathermap/api/model/Rain.java b/src/main/java/com/github/prominence/openweathermap/api/model/Rain.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/model/Rain.java rename to src/main/java/com/github/prominence/openweathermap/api/model/Rain.java index 6935f5b..948db41 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/Rain.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/Rain.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/by/prominence/openweathermap/api/model/Snow.java b/src/main/java/com/github/prominence/openweathermap/api/model/Snow.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/model/Snow.java rename to src/main/java/com/github/prominence/openweathermap/api/model/Snow.java index 86b4dc5..8f00279 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/Snow.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/Snow.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/by/prominence/openweathermap/api/model/WeatherState.java b/src/main/java/com/github/prominence/openweathermap/api/model/WeatherState.java similarity index 98% rename from src/main/java/by/prominence/openweathermap/api/model/WeatherState.java rename to src/main/java/com/github/prominence/openweathermap/api/model/WeatherState.java index 8bb3272..eed38a9 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/WeatherState.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/WeatherState.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/by/prominence/openweathermap/api/model/Wind.java b/src/main/java/com/github/prominence/openweathermap/api/model/Wind.java similarity index 97% rename from src/main/java/by/prominence/openweathermap/api/model/Wind.java rename to src/main/java/com/github/prominence/openweathermap/api/model/Wind.java index 695a030..3374230 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/Wind.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/Wind.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model; +package com.github.prominence.openweathermap.api.model; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/by/prominence/openweathermap/api/model/response/HourlyForecast.java b/src/main/java/com/github/prominence/openweathermap/api/model/response/HourlyForecast.java similarity index 99% rename from src/main/java/by/prominence/openweathermap/api/model/response/HourlyForecast.java rename to src/main/java/com/github/prominence/openweathermap/api/model/response/HourlyForecast.java index c3af464..8c2025f 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/response/HourlyForecast.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/response/HourlyForecast.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model.response; +package com.github.prominence.openweathermap.api.model.response; -import by.prominence.openweathermap.api.model.*; import com.alibaba.fastjson.annotation.JSONField; +import com.github.prominence.openweathermap.api.model.*; import java.util.Comparator; import java.util.Date; diff --git a/src/main/java/by/prominence/openweathermap/api/model/response/Weather.java b/src/main/java/com/github/prominence/openweathermap/api/model/response/Weather.java similarity index 99% rename from src/main/java/by/prominence/openweathermap/api/model/response/Weather.java rename to src/main/java/com/github/prominence/openweathermap/api/model/response/Weather.java index 3398f44..a715ecb 100644 --- a/src/main/java/by/prominence/openweathermap/api/model/response/Weather.java +++ b/src/main/java/com/github/prominence/openweathermap/api/model/response/Weather.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.model.response; +package com.github.prominence.openweathermap.api.model.response; -import by.prominence.openweathermap.api.model.*; import com.alibaba.fastjson.annotation.JSONField; +import com.github.prominence.openweathermap.api.model.*; import java.util.Date; import java.util.List; diff --git a/src/main/java/by/prominence/openweathermap/api/utils/JsonUtils.java b/src/main/java/com/github/prominence/openweathermap/api/utils/JsonUtils.java similarity index 96% rename from src/main/java/by/prominence/openweathermap/api/utils/JsonUtils.java rename to src/main/java/com/github/prominence/openweathermap/api/utils/JsonUtils.java index 11958f0..de2379b 100644 --- a/src/main/java/by/prominence/openweathermap/api/utils/JsonUtils.java +++ b/src/main/java/com/github/prominence/openweathermap/api/utils/JsonUtils.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.utils; +package com.github.prominence.openweathermap.api.utils; import com.alibaba.fastjson.JSON; diff --git a/src/main/java/by/prominence/openweathermap/api/utils/RequestUtils.java b/src/main/java/com/github/prominence/openweathermap/api/utils/RequestUtils.java similarity index 90% rename from src/main/java/by/prominence/openweathermap/api/utils/RequestUtils.java rename to src/main/java/com/github/prominence/openweathermap/api/utils/RequestUtils.java index 68725f1..b667f2d 100644 --- a/src/main/java/by/prominence/openweathermap/api/utils/RequestUtils.java +++ b/src/main/java/com/github/prominence/openweathermap/api/utils/RequestUtils.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package by.prominence.openweathermap.api.utils; +package com.github.prominence.openweathermap.api.utils; -import by.prominence.openweathermap.api.exception.DataNotFoundException; -import by.prominence.openweathermap.api.exception.InvalidAuthTokenException; +import com.github.prominence.openweathermap.api.exception.DataNotFoundException; +import com.github.prominence.openweathermap.api.exception.InvalidAuthTokenException; import java.io.IOException; import java.io.InputStream;