From 44507bf31f30d19ca908389b6089adb3422904f9 Mon Sep 17 00:00:00 2001 From: Witalij Berdinskich Date: Tue, 12 Oct 2021 07:44:39 +0300 Subject: [PATCH] Rename to Monobank4J, close #7 --- .codacy.yml | 10 +++--- .gitlab-ci.yml | 2 +- NOTICE | 2 +- contributing.md | 6 ++-- .../pom.xml | 10 +++--- .../readme.md | 18 +++++----- .../monobank4j/api_gson/ClientInfo.java | 4 +++ .../bot_by/monobank4j}/api_gson/Currency.java | 6 ++-- .../monobank4j}/api_gson/CurrencyInfo.java | 2 +- .../bot_by/monobank4j/api_gson/Personal.java | 34 +++++++++++++++++++ .../api_gson/UnixTimeTypeAdapter.java | 2 +- .../monobank4j}/api_gson/package-info.java | 2 +- .../src/main/javadoc/overview.html | 6 ++-- .../main/javadoc/resources/monobank-api.css | 0 .../src/main/javadoc/resources/prism.css | 0 .../src/main/javadoc/resources/prism.js | 0 .../monobank4j}/api_gson/CurrencyTest.java | 2 +- .../bot_by/monobank4j}/api_gson/GsonTest.java | 2 +- .../api_gson/UnixTimeTypeAdapterTest.java | 2 +- .../api_gson/example/GetExchangeRates.java | 6 ++-- .../currency_rates/currency_rates.json | 0 .../missed_fields/currency_rates.json | 0 .../too_many_requests/message_pattern.txt | 0 .../too_many_requests/too_many_requests.json | 0 .../pom.xml | 10 +++--- .../readme.md | 18 +++++----- .../monobank4j}/api_jackson_jr/Currency.java | 6 ++-- .../api_jackson_jr/CurrencyInfo.java | 2 +- .../api_jackson_jr/UnixTimeProvider.java | 2 +- .../api_jackson_jr/package-info.java | 2 +- .../src/main/javadoc/overview.html | 6 ++-- .../main/javadoc/resources/monobank-api.css | 0 .../src/main/javadoc/resources/prism.css | 0 .../src/main/javadoc/resources/prism.js | 0 .../api_jackson_jr/CurrencyTest.java | 2 +- .../api_jackson_jr/JacksonJrTest.java | 2 +- .../api_jackson_jr/UnixTimeProviderTest.java | 2 +- .../example/GetExchangeRates.java | 8 ++--- .../currency_rates/currency_rates.json | 0 .../missed_fields/currency_rates.json | 0 .../too_many_requests/message_pattern.txt | 0 .../too_many_requests/too_many_requests.json | 0 .../pom.xml | 10 +++--- .../readme.md | 18 +++++----- .../monobank4j}/api_jackson/Currency.java | 6 ++-- .../monobank4j}/api_jackson/CurrencyInfo.java | 2 +- .../api_jackson/UnixTimeDeserializer.java | 2 +- .../api_jackson/UnixTimeSerializer.java | 2 +- .../monobank4j}/api_jackson/package-info.java | 2 +- .../src/main/javadoc/overview.html | 6 ++-- .../main/javadoc/resources/monobank-api.css | 0 .../src/main/javadoc/resources/prism.css | 0 .../src/main/javadoc/resources/prism.js | 0 .../monobank4j}/api_jackson/CurrencyTest.java | 2 +- .../monobank4j}/api_jackson/JacksonTest.java | 2 +- .../api_jackson/UnixTimeDeserializerTest.java | 2 +- .../api_jackson/UnixTimeSerializerTest.java | 2 +- .../api_jackson/example/GetExchangeRates.java | 6 ++-- .../currency_rates/currency_rates.json | 0 .../missed_fields/currency_rates.json | 0 .../too_many_requests/message_pattern.txt | 0 .../too_many_requests/too_many_requests.json | 0 .../pom.xml | 10 +++--- .../readme.md | 18 +++++----- .../bot_by/monobank4j}/api_json/Currency.java | 6 ++-- .../monobank4j}/api_json/package-info.java | 2 +- .../src/main/javadoc/overview.html | 6 ++-- .../main/javadoc/resources/monobank-api.css | 0 .../src/main/javadoc/resources/prism.css | 0 .../src/main/javadoc/resources/prism.js | 0 .../monobank4j}/api_json/CurrencyTest.java | 2 +- .../bot_by/monobank4j}/api_json/JsonTest.java | 2 +- .../api_json/example/GetExchangeRates.java | 4 +-- .../currency_rates/currency_rates.json | 0 .../too_many_requests/message_pattern.txt | 0 .../too_many_requests/too_many_requests.json | 0 .../pom.xml | 10 +++--- .../api_token/TokenInterceptor.java | 2 +- .../monobank4j}/api_token/package-info.java | 2 +- .../api_token/TokenInterceptorTest.java | 2 +- pom.xml | 30 ++++++++-------- readme.md | 12 +++---- readme.uk.md | 12 +++---- 83 files changed, 198 insertions(+), 160 deletions(-) rename {monobank-api-gson => monobank4j-gson}/pom.xml (94%) rename {monobank-api-gson => monobank4j-gson}/readme.md (77%) create mode 100644 monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/ClientInfo.java rename {monobank-api-gson/src/main/java/uk/bot_by/monobank => monobank4j-gson/src/main/java/uk/bot_by/monobank4j}/api_gson/Currency.java (93%) rename {monobank-api-gson/src/main/java/uk/bot_by/monobank => monobank4j-gson/src/main/java/uk/bot_by/monobank4j}/api_gson/CurrencyInfo.java (98%) create mode 100644 monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Personal.java rename {monobank-api-gson/src/main/java/uk/bot_by/monobank => monobank4j-gson/src/main/java/uk/bot_by/monobank4j}/api_gson/UnixTimeTypeAdapter.java (97%) rename {monobank-api-gson/src/main/java/uk/bot_by/monobank => monobank4j-gson/src/main/java/uk/bot_by/monobank4j}/api_gson/package-info.java (82%) rename {monobank-api-gson => monobank4j-gson}/src/main/javadoc/overview.html (87%) rename {monobank-api-gson => monobank4j-gson}/src/main/javadoc/resources/monobank-api.css (100%) rename {monobank-api-gson => monobank4j-gson}/src/main/javadoc/resources/prism.css (100%) rename {monobank-api-gson => monobank4j-gson}/src/main/javadoc/resources/prism.js (100%) rename {monobank-api-gson/src/test/java/uk/bot_by/monobank => monobank4j-gson/src/test/java/uk/bot_by/monobank4j}/api_gson/CurrencyTest.java (99%) rename {monobank-api-gson/src/test/java/uk/bot_by/monobank => monobank4j-gson/src/test/java/uk/bot_by/monobank4j}/api_gson/GsonTest.java (99%) rename {monobank-api-gson/src/test/java/uk/bot_by/monobank => monobank4j-gson/src/test/java/uk/bot_by/monobank4j}/api_gson/UnixTimeTypeAdapterTest.java (98%) rename {monobank-api-gson/src/test/java/uk/bot_by/monobank => monobank4j-gson/src/test/java/uk/bot_by/monobank4j}/api_gson/example/GetExchangeRates.java (88%) rename {monobank-api-gson => monobank4j-gson}/src/test/resources/currency_rates/currency_rates.json (100%) rename {monobank-api-gson => monobank4j-gson}/src/test/resources/missed_fields/currency_rates.json (100%) rename {monobank-api-gson => monobank4j-gson}/src/test/resources/too_many_requests/message_pattern.txt (100%) rename {monobank-api-gson => monobank4j-gson}/src/test/resources/too_many_requests/too_many_requests.json (100%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/pom.xml (94%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/readme.md (80%) rename {monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j}/api_jackson_jr/Currency.java (94%) rename {monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j}/api_jackson_jr/CurrencyInfo.java (98%) rename {monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j}/api_jackson_jr/UnixTimeProvider.java (98%) rename {monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j}/api_jackson_jr/package-info.java (79%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/main/javadoc/overview.html (86%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/main/javadoc/resources/monobank-api.css (100%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/main/javadoc/resources/prism.css (100%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/main/javadoc/resources/prism.js (100%) rename {monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j}/api_jackson_jr/CurrencyTest.java (99%) rename {monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j}/api_jackson_jr/JacksonJrTest.java (99%) rename {monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j}/api_jackson_jr/UnixTimeProviderTest.java (98%) rename {monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank => monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j}/api_jackson_jr/example/GetExchangeRates.java (87%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/test/resources/currency_rates/currency_rates.json (100%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/test/resources/missed_fields/currency_rates.json (100%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/test/resources/too_many_requests/message_pattern.txt (100%) rename {monobank-api-jackson-jr => monobank4j-jackson-jr}/src/test/resources/too_many_requests/too_many_requests.json (100%) rename {monobank-api-jackson => monobank4j-jackson}/pom.xml (94%) rename {monobank-api-jackson => monobank4j-jackson}/readme.md (82%) rename {monobank-api-jackson/src/main/java/uk/bot_by/monobank => monobank4j-jackson/src/main/java/uk/bot_by/monobank4j}/api_jackson/Currency.java (93%) rename {monobank-api-jackson/src/main/java/uk/bot_by/monobank => monobank4j-jackson/src/main/java/uk/bot_by/monobank4j}/api_jackson/CurrencyInfo.java (98%) rename {monobank-api-jackson/src/main/java/uk/bot_by/monobank => monobank4j-jackson/src/main/java/uk/bot_by/monobank4j}/api_jackson/UnixTimeDeserializer.java (96%) rename {monobank-api-jackson/src/main/java/uk/bot_by/monobank => monobank4j-jackson/src/main/java/uk/bot_by/monobank4j}/api_jackson/UnixTimeSerializer.java (96%) rename {monobank-api-jackson/src/main/java/uk/bot_by/monobank => monobank4j-jackson/src/main/java/uk/bot_by/monobank4j}/api_jackson/package-info.java (80%) rename {monobank-api-jackson => monobank4j-jackson}/src/main/javadoc/overview.html (87%) rename {monobank-api-jackson => monobank4j-jackson}/src/main/javadoc/resources/monobank-api.css (100%) rename {monobank-api-jackson => monobank4j-jackson}/src/main/javadoc/resources/prism.css (100%) rename {monobank-api-jackson => monobank4j-jackson}/src/main/javadoc/resources/prism.js (100%) rename {monobank-api-jackson/src/test/java/uk/bot_by/monobank => monobank4j-jackson/src/test/java/uk/bot_by/monobank4j}/api_jackson/CurrencyTest.java (99%) rename {monobank-api-jackson/src/test/java/uk/bot_by/monobank => monobank4j-jackson/src/test/java/uk/bot_by/monobank4j}/api_jackson/JacksonTest.java (99%) rename {monobank-api-jackson/src/test/java/uk/bot_by/monobank => monobank4j-jackson/src/test/java/uk/bot_by/monobank4j}/api_jackson/UnixTimeDeserializerTest.java (96%) rename {monobank-api-jackson/src/test/java/uk/bot_by/monobank => monobank4j-jackson/src/test/java/uk/bot_by/monobank4j}/api_jackson/UnixTimeSerializerTest.java (97%) rename {monobank-api-jackson/src/test/java/uk/bot_by/monobank => monobank4j-jackson/src/test/java/uk/bot_by/monobank4j}/api_jackson/example/GetExchangeRates.java (88%) rename {monobank-api-jackson => monobank4j-jackson}/src/test/resources/currency_rates/currency_rates.json (100%) rename {monobank-api-jackson => monobank4j-jackson}/src/test/resources/missed_fields/currency_rates.json (100%) rename {monobank-api-jackson => monobank4j-jackson}/src/test/resources/too_many_requests/message_pattern.txt (100%) rename {monobank-api-jackson => monobank4j-jackson}/src/test/resources/too_many_requests/too_many_requests.json (100%) rename {monobank-api-json => monobank4j-json}/pom.xml (95%) rename {monobank-api-json => monobank4j-json}/readme.md (77%) rename {monobank-api-json/src/main/java/uk/bot_by/monobank => monobank4j-json/src/main/java/uk/bot_by/monobank4j}/api_json/Currency.java (93%) rename {monobank-api-json/src/main/java/uk/bot_by/monobank => monobank4j-json/src/main/java/uk/bot_by/monobank4j}/api_json/package-info.java (82%) rename {monobank-api-json => monobank4j-json}/src/main/javadoc/overview.html (87%) rename {monobank-api-json => monobank4j-json}/src/main/javadoc/resources/monobank-api.css (100%) rename {monobank-api-json => monobank4j-json}/src/main/javadoc/resources/prism.css (100%) rename {monobank-api-json => monobank4j-json}/src/main/javadoc/resources/prism.js (100%) rename {monobank-api-json/src/test/java/uk/bot_by/monobank => monobank4j-json/src/test/java/uk/bot_by/monobank4j}/api_json/CurrencyTest.java (98%) rename {monobank-api-json/src/test/java/uk/bot_by/monobank => monobank4j-json/src/test/java/uk/bot_by/monobank4j}/api_json/JsonTest.java (98%) rename {monobank-api-json/src/test/java/uk/bot_by/monobank => monobank4j-json/src/test/java/uk/bot_by/monobank4j}/api_json/example/GetExchangeRates.java (92%) rename {monobank-api-json => monobank4j-json}/src/test/resources/currency_rates/currency_rates.json (100%) rename {monobank-api-json => monobank4j-json}/src/test/resources/too_many_requests/message_pattern.txt (100%) rename {monobank-api-json => monobank4j-json}/src/test/resources/too_many_requests/too_many_requests.json (100%) rename {monobank-api-token => monobank4j-token}/pom.xml (92%) rename {monobank-api-token/src/main/java/uk/bot_by/monobank => monobank4j-token/src/main/java/uk/bot_by/monobank4j}/api_token/TokenInterceptor.java (97%) rename {monobank-api-token/src/main/java/uk/bot_by/monobank => monobank4j-token/src/main/java/uk/bot_by/monobank4j}/api_token/package-info.java (82%) rename {monobank-api-token/src/test/java/uk/bot_by/monobank => monobank4j-token/src/test/java/uk/bot_by/monobank4j}/api_token/TokenInterceptorTest.java (97%) diff --git a/.codacy.yml b/.codacy.yml index cde8179..c9be829 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -2,11 +2,11 @@ engines: duplication: exclude_paths: - - "monobank-api-gson/src/test/java/**/*" - - "monobank-api-jackson/src/test/java/**/*" - - "monobank-api-jackson-jr/src/test/java/**/*" - - "monobank-api-json/src/test/java/**/*" - - "monobank-api-token/src/test/java/**/*" + - "monobank4j-gson/src/test/java/**/*" + - "monobank4j-jackson/src/test/java/**/*" + - "monobank4j-jackson-jr/src/test/java/**/*" + - "monobank4j-json/src/test/java/**/*" + - "monobank4j-token/src/test/java/**/*" exclude_paths: - "**/prism.css" - "**/prism.js" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3cba50..d9400c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ test: stage: test script: - mvn $MAVEN_CLI_OPTS verify - - bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r monobank-api-gson/target/site/jacoco/jacoco.xml -r monobank-api-jackson/target/site/jacoco/jacoco.xml -r monobank-api-jackson-jr/target/site/jacoco/jacoco.xml -r monobank-api-json/target/site/jacoco/jacoco.xml -r monobank-api-token/target/site/jacoco/jacoco.xml + - bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r monobank4j-gson/target/site/jacoco/jacoco.xml -r monobank4j-jackson/target/site/jacoco/jacoco.xml -r monobank4j-jackson-jr/target/site/jacoco/jacoco.xml -r monobank4j-json/target/site/jacoco/jacoco.xml -r monobank4j-token/target/site/jacoco/jacoco.xml except: - tags diff --git a/NOTICE b/NOTICE index e488291..e720979 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -monobank-api +monobank4j Copyright 2021 Witalij Berdinskich Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/contributing.md b/contributing.md index 07c1b96..699f1da 100644 --- a/contributing.md +++ b/contributing.md @@ -1,4 +1,4 @@ -# Contributing to Monobank API wrapper +# Contributing to Monobank4J **Monobank** API wrapper is an open-source project and all contributions are welcome to assist with its development and maintenance. @@ -18,7 +18,7 @@ updates. Contribute your fixes and new features back to the main codebase using [GitLab merge requests][gitlab-merge-requests]. -[wrapper-issues]: https://gitlab.com/bot-by/monobank-api/-/issues +[wrapper-issues]: https://gitlab.com/bot-by/monobank4j/-/issues [issue-guidelines]: http://github.com/necolas/issue-guidelines/#readme -[wrapper-gitlab]: https://gitlab.com/bot-by/monobank-api/ +[wrapper-gitlab]: https://gitlab.com/bot-by/monobank4j/ [gitlab-merge-requests]: https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html diff --git a/monobank-api-gson/pom.xml b/monobank4j-gson/pom.xml similarity index 94% rename from monobank-api-gson/pom.xml rename to monobank4j-gson/pom.xml index c7ed147..15b7122 100644 --- a/monobank-api-gson/pom.xml +++ b/monobank4j-gson/pom.xml @@ -20,19 +20,19 @@ 4.0.0 - monobank-api - uk.bot-by.monobank + monobank4j + uk.bot-by.monobank4j ${revision}${sha1}${changelist} - monobank-api-gson + monobank4j-gson - Monobank API with Gson + Monobank4J with Gson Unofficial Java wrapper for [Monobank API](https://api.monobank.ua/docs): - get exchange rates (public), - get client info and statements, - set a webhook to receive transaction events (personal). - https://gitlab.com/bot-by/monobank-api + https://gitlab.com/bot-by/monobank4j 2021 bot-by diff --git a/monobank-api-gson/readme.md b/monobank4j-gson/readme.md similarity index 77% rename from monobank-api-gson/readme.md rename to monobank4j-gson/readme.md index bfe2c01..621d8e5 100644 --- a/monobank-api-gson/readme.md +++ b/monobank4j-gson/readme.md @@ -1,4 +1,4 @@ -# Monobank API with Gson +# Monobank4J with Gson Unofficial Java wrapper for [Monobank API][monobank-api]: get exchange rates (public), get client info and statements and set a webhook to receive transaction @@ -19,7 +19,7 @@ Use project's GitLab repository instead, please: ```xml - monobank-api-maven + monobank4j-maven https://gitlab.example.com/api/v4/projects/28690779/packages/maven @@ -29,8 +29,8 @@ Please add dependency to your project: ```xml - uk.bot-by.monobank - monobank-api-gson + uk.bot-by.monobank4j + monobank4j-gson 1.1.0 ``` @@ -39,7 +39,7 @@ Please add dependency to your project: ### Currency -Create an instance of currency Monobank API using `Currency.getInstance()` +Create an instance of currency Monobank Currency API using `Currency.getInstance()` or with [Feign][feign] manually, e.g. if you want to use custom client. ```java @@ -60,13 +60,13 @@ To run the example [GetExchangeRates][example]: 1. Build the whole project: `mvn` -2. Go to the **monobank-api-gson** and get all dependencies: +2. Go to the **monobank4j-gson** and get all dependencies: `mvn dependency:copy-dependencies` 3. Then go to **target/dependency** and run the following to get rates of pound and zloty: - - java -cp gson-2.8.7.jar:feign-core-11.6.jar:feign-gson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_gson.example.GetExchangeRates 826 - - java -cp gson-2.8.7.jar:feign-core-11.6.jar:feign-gson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_gson.example.GetExchangeRates 985 + - java -cp gson-2.8.7.jar:feign-core-11.6.jar:feign-gson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 826 + - java -cp gson-2.8.7.jar:feign-core-11.6.jar:feign-gson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 985 ## License @@ -75,6 +75,6 @@ To run the example [GetExchangeRates][example]: [monobank-api]: https://api.monobank.ua/docs/ "Monobank API to get statements and account balances" [gson]: https://github.com/google/gson "A Java serialization/deserialization library to convert Java Objects into JSON and back" -[parent]: https://gitlab.com/bot-by/monobank-api/ "Java wrapper for Monobank API" +[parent]: https://gitlab.com/bot-by/monobank4j/ "Java wrapper for Monobank API" [feign]: https://github.com/OpenFeign/feign "Feign makes writing java http clients easier." [example]: src/test/java/uk/bot_by/monobank/api_gson/example/GetExchangeRates.java diff --git a/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/ClientInfo.java b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/ClientInfo.java new file mode 100644 index 0000000..411d7d3 --- /dev/null +++ b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/ClientInfo.java @@ -0,0 +1,4 @@ +package uk.bot_by.monobank4j.api_gson; + +public class ClientInfo { +} diff --git a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/Currency.java b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Currency.java similarity index 93% rename from monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/Currency.java rename to monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Currency.java index 61877c2..e1a3a13 100644 --- a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/Currency.java +++ b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Currency.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; import feign.Feign; import feign.RequestLine; @@ -26,7 +26,7 @@ * *

How to get currency rates

*

- * First create an instance of Monobank API. + * First create an instance of Monobank Currency API. *

* You can use static method {@linkplain #getInstance} or build it with * Feign manually, @@ -48,7 +48,7 @@ public interface Currency { /** - * Get an instance of currency Monobank API. + * Get an instance of currency Monobank Currency API. * * @return a currency API instance */ diff --git a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/CurrencyInfo.java b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/CurrencyInfo.java similarity index 98% rename from monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/CurrencyInfo.java rename to monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/CurrencyInfo.java index 9f3ab11..40a44a3 100644 --- a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/CurrencyInfo.java +++ b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/CurrencyInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; import com.google.gson.annotations.JsonAdapter; diff --git a/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Personal.java b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Personal.java new file mode 100644 index 0000000..de1c93a --- /dev/null +++ b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/Personal.java @@ -0,0 +1,34 @@ +/* + * Copyright 2021 Witalij Berdinskich + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package uk.bot_by.monobank4j.api_gson; + +import feign.Body; +import feign.Param; +import feign.RequestLine; +import feign.Response; + +import java.net.URL; + +public interface Personal { + + @RequestLine("GET /personal/client-info") + ClientInfo getClientInfo(); + + @RequestLine("POST /personal/webhook") + @Body("%7B\"webHookUrl\":\"{webhook}\"%7D") + Response setWebhook(@Param("webhook") URL webhook); + +} diff --git a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/UnixTimeTypeAdapter.java b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/UnixTimeTypeAdapter.java similarity index 97% rename from monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/UnixTimeTypeAdapter.java rename to monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/UnixTimeTypeAdapter.java index 5d4c053..834ee95 100644 --- a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/UnixTimeTypeAdapter.java +++ b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/UnixTimeTypeAdapter.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; diff --git a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/package-info.java b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/package-info.java similarity index 82% rename from monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/package-info.java rename to monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/package-info.java index ca78581..b697764 100644 --- a/monobank-api-gson/src/main/java/uk/bot_by/monobank/api_gson/package-info.java +++ b/monobank4j-gson/src/main/java/uk/bot_by/monobank4j/api_gson/package-info.java @@ -7,4 +7,4 @@ *

  • currency rates
  • * */ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; diff --git a/monobank-api-gson/src/main/javadoc/overview.html b/monobank4j-gson/src/main/javadoc/overview.html similarity index 87% rename from monobank-api-gson/src/main/javadoc/overview.html rename to monobank4j-gson/src/main/javadoc/overview.html index c1649ed..5ac3cf3 100644 --- a/monobank-api-gson/src/main/javadoc/overview.html +++ b/monobank4j-gson/src/main/javadoc/overview.html @@ -17,7 +17,7 @@

    Unofficial Java wrapper for
    
     <repositories>
       <repository>
    -    <id>monobank-api-maven</id>
    +    <id>monobank4j-maven</id>
         <url>https://gitlab.example.com/api/v4/projects/28690779/packages/maven</url>
       </repository>
     </repositories>
    @@ -25,8 +25,8 @@ 

    Unofficial Java wrapper for Please add dependency to your project:
    
     <dependency>
    -  <groupId>uk.bot-by.monobank</groupId>
    -  <artifactId>monobank-api-gson</artifactId>
    +  <groupId>uk.bot-by.monobank4j</groupId>
    +  <artifactId>monobank4j-gson</artifactId>
       <version>1.1.0</version>
     </dependency>
     
    diff --git a/monobank-api-gson/src/main/javadoc/resources/monobank-api.css b/monobank4j-gson/src/main/javadoc/resources/monobank-api.css similarity index 100% rename from monobank-api-gson/src/main/javadoc/resources/monobank-api.css rename to monobank4j-gson/src/main/javadoc/resources/monobank-api.css diff --git a/monobank-api-gson/src/main/javadoc/resources/prism.css b/monobank4j-gson/src/main/javadoc/resources/prism.css similarity index 100% rename from monobank-api-gson/src/main/javadoc/resources/prism.css rename to monobank4j-gson/src/main/javadoc/resources/prism.css diff --git a/monobank-api-gson/src/main/javadoc/resources/prism.js b/monobank4j-gson/src/main/javadoc/resources/prism.js similarity index 100% rename from monobank-api-gson/src/main/javadoc/resources/prism.js rename to monobank4j-gson/src/main/javadoc/resources/prism.js diff --git a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/CurrencyTest.java b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/CurrencyTest.java similarity index 99% rename from monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/CurrencyTest.java rename to monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/CurrencyTest.java index 8cc5055..b0844db 100644 --- a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/CurrencyTest.java +++ b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/CurrencyTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; import feign.Feign; import feign.FeignException; diff --git a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/GsonTest.java b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/GsonTest.java similarity index 99% rename from monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/GsonTest.java rename to monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/GsonTest.java index 2f58fc3..42aa76c 100644 --- a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/GsonTest.java +++ b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/GsonTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; import feign.Feign; import feign.FeignException; diff --git a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/UnixTimeTypeAdapterTest.java b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/UnixTimeTypeAdapterTest.java similarity index 98% rename from monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/UnixTimeTypeAdapterTest.java rename to monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/UnixTimeTypeAdapterTest.java index 7719e1e..7925ebe 100644 --- a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/UnixTimeTypeAdapterTest.java +++ b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/UnixTimeTypeAdapterTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_gson; +package uk.bot_by.monobank4j.api_gson; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; diff --git a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/example/GetExchangeRates.java b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/example/GetExchangeRates.java similarity index 88% rename from monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/example/GetExchangeRates.java rename to monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/example/GetExchangeRates.java index c607f89..8d296c1 100644 --- a/monobank-api-gson/src/test/java/uk/bot_by/monobank/api_gson/example/GetExchangeRates.java +++ b/monobank4j-gson/src/test/java/uk/bot_by/monobank4j/api_gson/example/GetExchangeRates.java @@ -1,8 +1,8 @@ -package uk.bot_by.monobank.api_gson.example; +package uk.bot_by.monobank4j.api_gson.example; import feign.FeignException; -import uk.bot_by.monobank.api_gson.Currency; -import uk.bot_by.monobank.api_gson.CurrencyInfo; +import uk.bot_by.monobank4j.api_gson.Currency; +import uk.bot_by.monobank4j.api_gson.CurrencyInfo; public class GetExchangeRates { diff --git a/monobank-api-gson/src/test/resources/currency_rates/currency_rates.json b/monobank4j-gson/src/test/resources/currency_rates/currency_rates.json similarity index 100% rename from monobank-api-gson/src/test/resources/currency_rates/currency_rates.json rename to monobank4j-gson/src/test/resources/currency_rates/currency_rates.json diff --git a/monobank-api-gson/src/test/resources/missed_fields/currency_rates.json b/monobank4j-gson/src/test/resources/missed_fields/currency_rates.json similarity index 100% rename from monobank-api-gson/src/test/resources/missed_fields/currency_rates.json rename to monobank4j-gson/src/test/resources/missed_fields/currency_rates.json diff --git a/monobank-api-gson/src/test/resources/too_many_requests/message_pattern.txt b/monobank4j-gson/src/test/resources/too_many_requests/message_pattern.txt similarity index 100% rename from monobank-api-gson/src/test/resources/too_many_requests/message_pattern.txt rename to monobank4j-gson/src/test/resources/too_many_requests/message_pattern.txt diff --git a/monobank-api-gson/src/test/resources/too_many_requests/too_many_requests.json b/monobank4j-gson/src/test/resources/too_many_requests/too_many_requests.json similarity index 100% rename from monobank-api-gson/src/test/resources/too_many_requests/too_many_requests.json rename to monobank4j-gson/src/test/resources/too_many_requests/too_many_requests.json diff --git a/monobank-api-jackson-jr/pom.xml b/monobank4j-jackson-jr/pom.xml similarity index 94% rename from monobank-api-jackson-jr/pom.xml rename to monobank4j-jackson-jr/pom.xml index f6f17ce..41a0cca 100644 --- a/monobank-api-jackson-jr/pom.xml +++ b/monobank4j-jackson-jr/pom.xml @@ -20,19 +20,19 @@ 4.0.0 - monobank-api - uk.bot-by.monobank + monobank4j + uk.bot-by.monobank4j ${revision}${sha1}${changelist} - monobank-api-jackson-jr + monobank4j-jackson-jr - Monobank API with Jackson Jr. + Monobank4J with Jackson Jr. Unofficial Java wrapper for [Monobank API](https://api.monobank.ua/docs): - get exchange rates (public), - get client info and statements, - set a webhook to receive transaction events (personal). - https://gitlab.com/bot-by/monobank-api + https://gitlab.com/bot-by/monobank4j 2021 bot-by diff --git a/monobank-api-jackson-jr/readme.md b/monobank4j-jackson-jr/readme.md similarity index 80% rename from monobank-api-jackson-jr/readme.md rename to monobank4j-jackson-jr/readme.md index dee83b9..44a2bde 100644 --- a/monobank-api-jackson-jr/readme.md +++ b/monobank4j-jackson-jr/readme.md @@ -1,4 +1,4 @@ -# Monobank API with Jackson Jr. +# Monobank4J with Jackson Jr. Unofficial Java wrapper for [Monobank API][monobank-api]: get exchange rates (public), get client info and statements and set a webhook to receive transaction @@ -19,7 +19,7 @@ Use project's GitLab repository instead, please: ```xml - monobank-api-maven + monobank4j-maven https://gitlab.example.com/api/v4/projects/28690779/packages/maven @@ -29,8 +29,8 @@ Please add dependency to your project: ```xml - uk.bot-by.monobank - monobank-api-jackson-jr + uk.bot-by.monobank4j + monobank4j-jackson-jr 1.1.0 ``` @@ -39,7 +39,7 @@ Please add dependency to your project: ### Currency -Create an instance of currency Monobank API using `Currency.getInstance()` +Create an instance of currency Monobank Currency API using `Currency.getInstance()` or with [Feign][feign] manually, e.g. if you want to use custom client. ```java @@ -69,13 +69,13 @@ To run the example [GetExchangeRates][example]: 1. Build the whole project: `mvn` -2. Go to the **monobank-api-jackson-jr** and get all dependencies: +2. Go to the **monobank4j-jackson-jr** and get all dependencies: `mvn dependency:copy-dependencies` 3. Then go to **target/dependency** and run the following to get rates of pound and zloty: - - java -cp jackson-core-2.12.4.jar:jackson-jr-objects-2.12.4.jar:feign-core-11.6.jar:feign-jackson-jr-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_jackson_jr.example.GetExchangeRates 826 - - java -cp jackson-core-2.12.4.jar:jackson-jr-objects-2.12.4.jar:feign-core-11.6.jar:feign-jackson-jr-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_jackson_jr.example.GetExchangeRates 985 + - java -cp jackson-core-2.12.4.jar:jackson-jr-objects-2.12.4.jar:feign-core-11.6.jar:feign-jackson-jr-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 826 + - java -cp jackson-core-2.12.4.jar:jackson-jr-objects-2.12.4.jar:feign-core-11.6.jar:feign-jackson-jr-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 985 ## License @@ -84,6 +84,6 @@ To run the example [GetExchangeRates][example]: [monobank-api]: https://api.monobank.ua/docs/ "Monobank API to get statements and account balances" [jackson-jr]: https://github.com/FasterXML/jackson-jr "A compact alternative to full Jackson Databind component" -[parent]: https://gitlab.com/bot-by/monobank-api/ "Java wrapper for Monobank API" +[parent]: https://gitlab.com/bot-by/monobank4j/ "Java wrapper for Monobank API" [feign]: https://github.com/OpenFeign/feign "Feign makes writing java http clients easier." [example]: src/test/java/uk/bot_by/monobank/api_jackson_jr/example/GetExchangeRates.java diff --git a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/Currency.java b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/Currency.java similarity index 94% rename from monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/Currency.java rename to monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/Currency.java index 4089e6c..645750c 100644 --- a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/Currency.java +++ b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/Currency.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; import com.fasterxml.jackson.jr.ob.JacksonJrExtension; import com.fasterxml.jackson.jr.ob.api.ExtensionContext; @@ -28,7 +28,7 @@ * *

    How to get currency rates

    *

    - * First create an instance of Monobank API. + * First create an instance of Monobank Currency API. *

    * You can use static method {@linkplain #getInstance} or build it with * Feign manually, @@ -57,7 +57,7 @@ public interface Currency { /** - * Get an instance of currency Monobank API. + * Get an instance of currency Monobank Currency API. * * @return a currency API instance */ diff --git a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/CurrencyInfo.java b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/CurrencyInfo.java similarity index 98% rename from monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/CurrencyInfo.java rename to monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/CurrencyInfo.java index ef6b5ba..72bd25e 100644 --- a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/CurrencyInfo.java +++ b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/CurrencyInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; import java.math.BigDecimal; import java.time.Instant; diff --git a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/UnixTimeProvider.java b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/UnixTimeProvider.java similarity index 98% rename from monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/UnixTimeProvider.java rename to monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/UnixTimeProvider.java index 9bd9308..12e74a8 100644 --- a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/UnixTimeProvider.java +++ b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/UnixTimeProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; diff --git a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/package-info.java b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/package-info.java similarity index 79% rename from monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/package-info.java rename to monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/package-info.java index 1cf6a52..a876edf 100644 --- a/monobank-api-jackson-jr/src/main/java/uk/bot_by/monobank/api_jackson_jr/package-info.java +++ b/monobank4j-jackson-jr/src/main/java/uk/bot_by/monobank4j/api_jackson_jr/package-info.java @@ -7,4 +7,4 @@ *

  • currency rates
  • * */ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; diff --git a/monobank-api-jackson-jr/src/main/javadoc/overview.html b/monobank4j-jackson-jr/src/main/javadoc/overview.html similarity index 86% rename from monobank-api-jackson-jr/src/main/javadoc/overview.html rename to monobank4j-jackson-jr/src/main/javadoc/overview.html index b5f1aa2..69ea53d 100644 --- a/monobank-api-jackson-jr/src/main/javadoc/overview.html +++ b/monobank4j-jackson-jr/src/main/javadoc/overview.html @@ -17,7 +17,7 @@

    Unofficial Java wrapper for
    
     <repositories>
       <repository>
    -    <id>monobank-api-maven</id>
    +    <id>monobank4j-maven</id>
         <url>https://gitlab.example.com/api/v4/projects/28690779/packages/maven</url>
       </repository>
     </repositories>
    @@ -25,8 +25,8 @@ 

    Unofficial Java wrapper for Please add dependency to your project:
    
     <dependency>
    -  <groupId>uk.bot-by.monobank</groupId>
    -  <artifactId>monobank-api-jackson-jr</artifactId>
    +  <groupId>uk.bot-by.monobank4j</groupId>
    +  <artifactId>monobank4j-jackson-jr</artifactId>
       <version>1.1.0</version>
     </dependency>
     
    diff --git a/monobank-api-jackson-jr/src/main/javadoc/resources/monobank-api.css b/monobank4j-jackson-jr/src/main/javadoc/resources/monobank-api.css similarity index 100% rename from monobank-api-jackson-jr/src/main/javadoc/resources/monobank-api.css rename to monobank4j-jackson-jr/src/main/javadoc/resources/monobank-api.css diff --git a/monobank-api-jackson-jr/src/main/javadoc/resources/prism.css b/monobank4j-jackson-jr/src/main/javadoc/resources/prism.css similarity index 100% rename from monobank-api-jackson-jr/src/main/javadoc/resources/prism.css rename to monobank4j-jackson-jr/src/main/javadoc/resources/prism.css diff --git a/monobank-api-jackson-jr/src/main/javadoc/resources/prism.js b/monobank4j-jackson-jr/src/main/javadoc/resources/prism.js similarity index 100% rename from monobank-api-jackson-jr/src/main/javadoc/resources/prism.js rename to monobank4j-jackson-jr/src/main/javadoc/resources/prism.js diff --git a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/CurrencyTest.java b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/CurrencyTest.java similarity index 99% rename from monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/CurrencyTest.java rename to monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/CurrencyTest.java index e6574bb..79b9066 100644 --- a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/CurrencyTest.java +++ b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/CurrencyTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; import com.fasterxml.jackson.jr.ob.JSON; import com.fasterxml.jackson.jr.ob.JacksonJrExtension; diff --git a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/JacksonJrTest.java b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/JacksonJrTest.java similarity index 99% rename from monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/JacksonJrTest.java rename to monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/JacksonJrTest.java index 2b36d19..f8494b6 100644 --- a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/JacksonJrTest.java +++ b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/JacksonJrTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; import com.fasterxml.jackson.jr.ob.JSON; import com.fasterxml.jackson.jr.ob.JacksonJrExtension; diff --git a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/UnixTimeProviderTest.java b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/UnixTimeProviderTest.java similarity index 98% rename from monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/UnixTimeProviderTest.java rename to monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/UnixTimeProviderTest.java index cf9a45f..a912f15 100644 --- a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/UnixTimeProviderTest.java +++ b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/UnixTimeProviderTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson_jr; +package uk.bot_by.monobank4j.api_jackson_jr; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; diff --git a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/example/GetExchangeRates.java b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/example/GetExchangeRates.java similarity index 87% rename from monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/example/GetExchangeRates.java rename to monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/example/GetExchangeRates.java index 25e1aba..fbfaa9e 100644 --- a/monobank-api-jackson-jr/src/test/java/uk/bot_by/monobank/api_jackson_jr/example/GetExchangeRates.java +++ b/monobank4j-jackson-jr/src/test/java/uk/bot_by/monobank4j/api_jackson_jr/example/GetExchangeRates.java @@ -1,11 +1,11 @@ -package uk.bot_by.monobank.api_jackson_jr.example; +package uk.bot_by.monobank4j.api_jackson_jr.example; import com.fasterxml.jackson.jr.ob.JacksonJrExtension; import com.fasterxml.jackson.jr.ob.api.ExtensionContext; import feign.FeignException; -import uk.bot_by.monobank.api_jackson_jr.Currency; -import uk.bot_by.monobank.api_jackson_jr.CurrencyInfo; -import uk.bot_by.monobank.api_jackson_jr.UnixTimeProvider; +import uk.bot_by.monobank4j.api_jackson_jr.Currency; +import uk.bot_by.monobank4j.api_jackson_jr.CurrencyInfo; +import uk.bot_by.monobank4j.api_jackson_jr.UnixTimeProvider; import java.util.List; diff --git a/monobank-api-jackson-jr/src/test/resources/currency_rates/currency_rates.json b/monobank4j-jackson-jr/src/test/resources/currency_rates/currency_rates.json similarity index 100% rename from monobank-api-jackson-jr/src/test/resources/currency_rates/currency_rates.json rename to monobank4j-jackson-jr/src/test/resources/currency_rates/currency_rates.json diff --git a/monobank-api-jackson-jr/src/test/resources/missed_fields/currency_rates.json b/monobank4j-jackson-jr/src/test/resources/missed_fields/currency_rates.json similarity index 100% rename from monobank-api-jackson-jr/src/test/resources/missed_fields/currency_rates.json rename to monobank4j-jackson-jr/src/test/resources/missed_fields/currency_rates.json diff --git a/monobank-api-jackson-jr/src/test/resources/too_many_requests/message_pattern.txt b/monobank4j-jackson-jr/src/test/resources/too_many_requests/message_pattern.txt similarity index 100% rename from monobank-api-jackson-jr/src/test/resources/too_many_requests/message_pattern.txt rename to monobank4j-jackson-jr/src/test/resources/too_many_requests/message_pattern.txt diff --git a/monobank-api-jackson-jr/src/test/resources/too_many_requests/too_many_requests.json b/monobank4j-jackson-jr/src/test/resources/too_many_requests/too_many_requests.json similarity index 100% rename from monobank-api-jackson-jr/src/test/resources/too_many_requests/too_many_requests.json rename to monobank4j-jackson-jr/src/test/resources/too_many_requests/too_many_requests.json diff --git a/monobank-api-jackson/pom.xml b/monobank4j-jackson/pom.xml similarity index 94% rename from monobank-api-jackson/pom.xml rename to monobank4j-jackson/pom.xml index 2e05352..2101e4e 100644 --- a/monobank-api-jackson/pom.xml +++ b/monobank4j-jackson/pom.xml @@ -20,19 +20,19 @@ 4.0.0 - monobank-api - uk.bot-by.monobank + monobank4j + uk.bot-by.monobank4j ${revision}${sha1}${changelist} - monobank-api-jackson + monobank4j-jackson - Monobank API with Jackson + Monobank4J with Jackson Unofficial Java wrapper for [Monobank API](https://api.monobank.ua/docs): - get exchange rates (public), - get client info and statements, - set a webhook to receive transaction events (personal). - https://gitlab.com/bot-by/monobank-api + https://gitlab.com/bot-by/monobank4j 2021 bot-by diff --git a/monobank-api-jackson/readme.md b/monobank4j-jackson/readme.md similarity index 82% rename from monobank-api-jackson/readme.md rename to monobank4j-jackson/readme.md index 75d9dc2..9c42029 100644 --- a/monobank-api-jackson/readme.md +++ b/monobank4j-jackson/readme.md @@ -1,4 +1,4 @@ -# Monobank API with Jackson +# Monobank4J with Jackson Unofficial Java wrapper for [Monobank API][monobank-api]: get exchange rates (public), get client info and statements and set a webhook to receive transaction @@ -19,7 +19,7 @@ Use project's GitLab repository instead, please: ```xml - monobank-api-maven + monobank4j-maven https://gitlab.example.com/api/v4/projects/28690779/packages/maven @@ -29,8 +29,8 @@ Please add dependency to your project: ```xml - uk.bot-by.monobank - monobank-api-jackson + uk.bot-by.monobank4j + monobank4j-jackson 1.1.0 ``` @@ -39,7 +39,7 @@ Please add dependency to your project: ### Currency -Create an instance of currency Monobank API using `Currency.getInstance()` +Create an instance of currency Monobank Currency API using `Currency.getInstance()` or with [Feign][feign] manually, e.g. if you want to use custom client. ```java @@ -60,13 +60,13 @@ To run the example [GetExchangeRates][example]: 1. Build the whole project: `mvn` -2. Go to the **monobank-api-jackson** and get all dependencies: +2. Go to the **monobank4j-jackson** and get all dependencies: `mvn dependency:copy-dependencies` 3. Then go to **target/dependency** and run the following to get rates of pound and zloty: - - java -cp jackson-annotations-2.12.4.jar:jackson-core-2.12.4.jar:jackson-databind-2.12.4.jar:feign-core-11.6.jar:feign-jackson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_jackson.example.GetExchangeRates 826 - - java -cp jackson-annotations-2.12.4.jar:jackson-core-2.12.4.jar:jackson-databind-2.12.4.jar:feign-core-11.6.jar:feign-jackson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_jackson.example.GetExchangeRates 985 + - java -cp jackson-annotations-2.12.4.jar:jackson-core-2.12.4.jar:jackson-databind-2.12.4.jar:feign-core-11.6.jar:feign-jackson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 826 + - java -cp jackson-annotations-2.12.4.jar:jackson-core-2.12.4.jar:jackson-databind-2.12.4.jar:feign-core-11.6.jar:feign-jackson-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 985 ## License @@ -75,6 +75,6 @@ To run the example [GetExchangeRates][example]: [monobank-api]: https://api.monobank.ua/docs/ "Monobank API to get statements and account balances" [jackson]: https://github.com/FasterXML/jackson "JSON for Java" -[parent]: https://gitlab.com/bot-by/monobank-api/ "Java wrapper for Monobank API" +[parent]: https://gitlab.com/bot-by/monobank4j/ "Java wrapper for Monobank API" [feign]: https://github.com/OpenFeign/feign "Feign makes writing java http clients easier." [example]: src/test/java/uk/bot_by/monobank/api_jackson/example/GetExchangeRates.java diff --git a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/Currency.java b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/Currency.java similarity index 93% rename from monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/Currency.java rename to monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/Currency.java index e05cb50..8de5a58 100644 --- a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/Currency.java +++ b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/Currency.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import feign.Feign; import feign.RequestLine; @@ -26,7 +26,7 @@ * *

    How to get currency rates

    *

    - * First create an instance of Monobank API. + * First create an instance of Monobank Currency API. *

    * You can use static method {@linkplain #getInstance} or build it with * Feign manually, @@ -48,7 +48,7 @@ public interface Currency { /** - * Get an instance of currency Monobank API. + * Get an instance of currency Monobank Currency API. * * @return a currency API instance */ diff --git a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/CurrencyInfo.java b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/CurrencyInfo.java similarity index 98% rename from monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/CurrencyInfo.java rename to monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/CurrencyInfo.java index 222fb9d..b287b39 100644 --- a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/CurrencyInfo.java +++ b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/CurrencyInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/UnixTimeDeserializer.java b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/UnixTimeDeserializer.java similarity index 96% rename from monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/UnixTimeDeserializer.java rename to monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/UnixTimeDeserializer.java index 9da33b5..de89f6d 100644 --- a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/UnixTimeDeserializer.java +++ b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/UnixTimeDeserializer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; diff --git a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/UnixTimeSerializer.java b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/UnixTimeSerializer.java similarity index 96% rename from monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/UnixTimeSerializer.java rename to monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/UnixTimeSerializer.java index 875ee49..2148e1a 100644 --- a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/UnixTimeSerializer.java +++ b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/UnixTimeSerializer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; diff --git a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/package-info.java b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/package-info.java similarity index 80% rename from monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/package-info.java rename to monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/package-info.java index fd541d4..37149fe 100644 --- a/monobank-api-jackson/src/main/java/uk/bot_by/monobank/api_jackson/package-info.java +++ b/monobank4j-jackson/src/main/java/uk/bot_by/monobank4j/api_jackson/package-info.java @@ -7,4 +7,4 @@ *

  • currency rates
  • * */ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; diff --git a/monobank-api-jackson/src/main/javadoc/overview.html b/monobank4j-jackson/src/main/javadoc/overview.html similarity index 87% rename from monobank-api-jackson/src/main/javadoc/overview.html rename to monobank4j-jackson/src/main/javadoc/overview.html index df1d79f..05e5a19 100644 --- a/monobank-api-jackson/src/main/javadoc/overview.html +++ b/monobank4j-jackson/src/main/javadoc/overview.html @@ -17,7 +17,7 @@

    Unofficial Java wrapper for
    
     <repositories>
       <repository>
    -    <id>monobank-api-maven</id>
    +    <id>monobank4j-maven</id>
         <url>https://gitlab.example.com/api/v4/projects/28690779/packages/maven</url>
       </repository>
     </repositories>
    @@ -25,8 +25,8 @@ 

    Unofficial Java wrapper for Please add dependency to your project:
    
     <dependency>
    -  <groupId>uk.bot-by.monobank</groupId>
    -  <artifactId>monobank-api-jackson</artifactId>
    +  <groupId>uk.bot-by.monobank4j</groupId>
    +  <artifactId>monobank4j-jackson</artifactId>
       <version>1.1.0</version>
     </dependency>
     
    diff --git a/monobank-api-jackson/src/main/javadoc/resources/monobank-api.css b/monobank4j-jackson/src/main/javadoc/resources/monobank-api.css similarity index 100% rename from monobank-api-jackson/src/main/javadoc/resources/monobank-api.css rename to monobank4j-jackson/src/main/javadoc/resources/monobank-api.css diff --git a/monobank-api-jackson/src/main/javadoc/resources/prism.css b/monobank4j-jackson/src/main/javadoc/resources/prism.css similarity index 100% rename from monobank-api-jackson/src/main/javadoc/resources/prism.css rename to monobank4j-jackson/src/main/javadoc/resources/prism.css diff --git a/monobank-api-jackson/src/main/javadoc/resources/prism.js b/monobank4j-jackson/src/main/javadoc/resources/prism.js similarity index 100% rename from monobank-api-jackson/src/main/javadoc/resources/prism.js rename to monobank4j-jackson/src/main/javadoc/resources/prism.js diff --git a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/CurrencyTest.java b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/CurrencyTest.java similarity index 99% rename from monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/CurrencyTest.java rename to monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/CurrencyTest.java index 049f7c5..9686076 100644 --- a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/CurrencyTest.java +++ b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/CurrencyTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import feign.Feign; import feign.FeignException; diff --git a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/JacksonTest.java b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/JacksonTest.java similarity index 99% rename from monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/JacksonTest.java rename to monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/JacksonTest.java index 1a6ffe2..bbcaac0 100644 --- a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/JacksonTest.java +++ b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/JacksonTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import feign.Feign; import feign.FeignException; diff --git a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/UnixTimeDeserializerTest.java b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/UnixTimeDeserializerTest.java similarity index 96% rename from monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/UnixTimeDeserializerTest.java rename to monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/UnixTimeDeserializerTest.java index 914f991..62f950c 100644 --- a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/UnixTimeDeserializerTest.java +++ b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/UnixTimeDeserializerTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; diff --git a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/UnixTimeSerializerTest.java b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/UnixTimeSerializerTest.java similarity index 97% rename from monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/UnixTimeSerializerTest.java rename to monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/UnixTimeSerializerTest.java index e52d7fd..c71e763 100644 --- a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/UnixTimeSerializerTest.java +++ b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/UnixTimeSerializerTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_jackson; +package uk.bot_by.monobank4j.api_jackson; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; diff --git a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/example/GetExchangeRates.java b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/example/GetExchangeRates.java similarity index 88% rename from monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/example/GetExchangeRates.java rename to monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/example/GetExchangeRates.java index bbcfb51..258dba8 100644 --- a/monobank-api-jackson/src/test/java/uk/bot_by/monobank/api_jackson/example/GetExchangeRates.java +++ b/monobank4j-jackson/src/test/java/uk/bot_by/monobank4j/api_jackson/example/GetExchangeRates.java @@ -1,8 +1,8 @@ -package uk.bot_by.monobank.api_jackson.example; +package uk.bot_by.monobank4j.api_jackson.example; import feign.FeignException; -import uk.bot_by.monobank.api_jackson.Currency; -import uk.bot_by.monobank.api_jackson.CurrencyInfo; +import uk.bot_by.monobank4j.api_jackson.Currency; +import uk.bot_by.monobank4j.api_jackson.CurrencyInfo; public class GetExchangeRates { diff --git a/monobank-api-jackson/src/test/resources/currency_rates/currency_rates.json b/monobank4j-jackson/src/test/resources/currency_rates/currency_rates.json similarity index 100% rename from monobank-api-jackson/src/test/resources/currency_rates/currency_rates.json rename to monobank4j-jackson/src/test/resources/currency_rates/currency_rates.json diff --git a/monobank-api-jackson/src/test/resources/missed_fields/currency_rates.json b/monobank4j-jackson/src/test/resources/missed_fields/currency_rates.json similarity index 100% rename from monobank-api-jackson/src/test/resources/missed_fields/currency_rates.json rename to monobank4j-jackson/src/test/resources/missed_fields/currency_rates.json diff --git a/monobank-api-jackson/src/test/resources/too_many_requests/message_pattern.txt b/monobank4j-jackson/src/test/resources/too_many_requests/message_pattern.txt similarity index 100% rename from monobank-api-jackson/src/test/resources/too_many_requests/message_pattern.txt rename to monobank4j-jackson/src/test/resources/too_many_requests/message_pattern.txt diff --git a/monobank-api-jackson/src/test/resources/too_many_requests/too_many_requests.json b/monobank4j-jackson/src/test/resources/too_many_requests/too_many_requests.json similarity index 100% rename from monobank-api-jackson/src/test/resources/too_many_requests/too_many_requests.json rename to monobank4j-jackson/src/test/resources/too_many_requests/too_many_requests.json diff --git a/monobank-api-json/pom.xml b/monobank4j-json/pom.xml similarity index 95% rename from monobank-api-json/pom.xml rename to monobank4j-json/pom.xml index 9b6db67..4e578c8 100644 --- a/monobank-api-json/pom.xml +++ b/monobank4j-json/pom.xml @@ -20,19 +20,19 @@ 4.0.0 - uk.bot-by.monobank - monobank-api + uk.bot-by.monobank4j + monobank4j ${revision}${sha1}${changelist} - monobank-api-json + monobank4j-json - Monobank API with JSON-java + Monobank4J with JSON-java Unofficial Java wrapper for [Monobank API](https://api.monobank.ua/docs): - get exchange rates (public), - get client info and statements, - set a webhook to receive transaction events (personal). - https://gitlab.com/bot-by/monobank-api + https://gitlab.com/bot-by/monobank4j 2021 bot-by diff --git a/monobank-api-json/readme.md b/monobank4j-json/readme.md similarity index 77% rename from monobank-api-json/readme.md rename to monobank4j-json/readme.md index da9aeed..e7030e8 100644 --- a/monobank-api-json/readme.md +++ b/monobank4j-json/readme.md @@ -1,4 +1,4 @@ -# Monobank API with JSON-java +# Monobank4J with JSON-java Unofficial Java wrapper for [Monobank API][monobank-api]: get exchange rates (public), get client info and statements and set a webhook to receive transaction @@ -19,7 +19,7 @@ Use project's GitLab repository instead, please: ```xml - monobank-api-maven + monobank4j-maven https://gitlab.example.com/api/v4/projects/28690779/packages/maven @@ -29,8 +29,8 @@ Please add dependency to your project: ```xml - uk.bot-by.monobank - monobank-api-json + uk.bot-by.monobank4j + monobank4j-json 1.1.0 ``` @@ -39,7 +39,7 @@ Please add dependency to your project: ### Currency -Create an instance of currency Monobank API using `Currency.getInstance()` +Create an instance of currency Monobank Currecny API using `Currency.getInstance()` or with [Feign][feign] manually, e.g. if you want to use custom client. ```java @@ -60,13 +60,13 @@ To run the example [GetExchangeRates][example]: 1. Build the whole project: `mvn` -2. Go to the **monobank-api-json** and get all dependencies: +2. Go to the **monobank4j-json** and get all dependencies: `mvn dependency:copy-dependencies` 3. Then go to **target/dependency** and run the following to get rates of pound and zloty: - - java -cp json-20210307.jar:feign-core-11.6.jar:feign-json-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_json.example.GetExchangeRates 826 - - java -cp json-20210307.jar:feign-core-11.6.jar:feign-json-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes uk.bot_by.monobank.api_json.example.GetExchangeRates 985 + - java -cp json-20210307.jar:feign-core-11.6.jar:feign-json-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 826 + - java -cp json-20210307.jar:feign-core-11.6.jar:feign-json-11.6.jar:feign-java11-11.6.jar:../classes:../test-classes GetExchangeRates 985 ## License @@ -75,6 +75,6 @@ To run the example [GetExchangeRates][example]: [monobank-api]: https://api.monobank.ua/docs/ "Monobank API to get statements and account balances" [json]: https://github.com/stleary/JSON-java "A reference implementation of a JSON package in Java" -[parent]: https://gitlab.com/bot-by/monobank-api/ "Java wrapper for Monobank API" +[parent]: https://gitlab.com/bot-by/monobank4j/ "Java wrapper for Monobank API" [feign]: https://github.com/OpenFeign/feign "Feign makes writing java http clients easier." [example]: src/test/java/uk/bot_by/monobank/api_json/example/GetExchangeRates.java diff --git a/monobank-api-json/src/main/java/uk/bot_by/monobank/api_json/Currency.java b/monobank4j-json/src/main/java/uk/bot_by/monobank4j/api_json/Currency.java similarity index 93% rename from monobank-api-json/src/main/java/uk/bot_by/monobank/api_json/Currency.java rename to monobank4j-json/src/main/java/uk/bot_by/monobank4j/api_json/Currency.java index fe9d066..d400aeb 100644 --- a/monobank-api-json/src/main/java/uk/bot_by/monobank/api_json/Currency.java +++ b/monobank4j-json/src/main/java/uk/bot_by/monobank4j/api_json/Currency.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_json; +package uk.bot_by.monobank4j.api_json; import feign.Feign; import feign.RequestLine; @@ -25,7 +25,7 @@ * *

    How to get currency rates

    *

    - * First create an instance of Monobank API. + * First create an instance of Monobank Currecny API. *

    * You can use static method {@linkplain #getInstance} or build it with * Feign manually, @@ -47,7 +47,7 @@ public interface Currency { /** - * Get an instance of currency Monobank API. + * Get an instance of currency Monobank Currecny API. * * @return a currency API instance */ diff --git a/monobank-api-json/src/main/java/uk/bot_by/monobank/api_json/package-info.java b/monobank4j-json/src/main/java/uk/bot_by/monobank4j/api_json/package-info.java similarity index 82% rename from monobank-api-json/src/main/java/uk/bot_by/monobank/api_json/package-info.java rename to monobank4j-json/src/main/java/uk/bot_by/monobank4j/api_json/package-info.java index fed4ee4..f30623c 100644 --- a/monobank-api-json/src/main/java/uk/bot_by/monobank/api_json/package-info.java +++ b/monobank4j-json/src/main/java/uk/bot_by/monobank4j/api_json/package-info.java @@ -7,4 +7,4 @@ *

  • currency rates
  • * */ -package uk.bot_by.monobank.api_json; +package uk.bot_by.monobank4j.api_json; diff --git a/monobank-api-json/src/main/javadoc/overview.html b/monobank4j-json/src/main/javadoc/overview.html similarity index 87% rename from monobank-api-json/src/main/javadoc/overview.html rename to monobank4j-json/src/main/javadoc/overview.html index 37ca724..b97497f 100644 --- a/monobank-api-json/src/main/javadoc/overview.html +++ b/monobank4j-json/src/main/javadoc/overview.html @@ -17,7 +17,7 @@

    Unofficial Java wrapper for
    
     <repositories>
       <repository>
    -    <id>monobank-api-maven</id>
    +    <id>monobank4j-maven</id>
         <url>https://gitlab.example.com/api/v4/projects/28690779/packages/maven</url>
       </repository>
     </repositories>
    @@ -25,8 +25,8 @@ 

    Unofficial Java wrapper for Please add dependency to your project:
    
     <dependency>
    -  <groupId>uk.bot-by.monobank</groupId>
    -  <artifactId>monobank-api-json</artifactId>
    +  <groupId>uk.bot-by.monobank4j</groupId>
    +  <artifactId>monobank4j-json</artifactId>
       <version>1.1.0</version>
     </dependency>
     
    diff --git a/monobank-api-json/src/main/javadoc/resources/monobank-api.css b/monobank4j-json/src/main/javadoc/resources/monobank-api.css similarity index 100% rename from monobank-api-json/src/main/javadoc/resources/monobank-api.css rename to monobank4j-json/src/main/javadoc/resources/monobank-api.css diff --git a/monobank-api-json/src/main/javadoc/resources/prism.css b/monobank4j-json/src/main/javadoc/resources/prism.css similarity index 100% rename from monobank-api-json/src/main/javadoc/resources/prism.css rename to monobank4j-json/src/main/javadoc/resources/prism.css diff --git a/monobank-api-json/src/main/javadoc/resources/prism.js b/monobank4j-json/src/main/javadoc/resources/prism.js similarity index 100% rename from monobank-api-json/src/main/javadoc/resources/prism.js rename to monobank4j-json/src/main/javadoc/resources/prism.js diff --git a/monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/CurrencyTest.java b/monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/CurrencyTest.java similarity index 98% rename from monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/CurrencyTest.java rename to monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/CurrencyTest.java index 3c44a4a..06cf270 100644 --- a/monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/CurrencyTest.java +++ b/monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/CurrencyTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_json; +package uk.bot_by.monobank4j.api_json; import feign.Feign; import feign.FeignException; diff --git a/monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/JsonTest.java b/monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/JsonTest.java similarity index 98% rename from monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/JsonTest.java rename to monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/JsonTest.java index 671e45b..ccf218b 100644 --- a/monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/JsonTest.java +++ b/monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/JsonTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_json; +package uk.bot_by.monobank4j.api_json; import feign.Feign; import feign.FeignException; diff --git a/monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/example/GetExchangeRates.java b/monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/example/GetExchangeRates.java similarity index 92% rename from monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/example/GetExchangeRates.java rename to monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/example/GetExchangeRates.java index 42ca2f3..4a58099 100644 --- a/monobank-api-json/src/test/java/uk/bot_by/monobank/api_json/example/GetExchangeRates.java +++ b/monobank4j-json/src/test/java/uk/bot_by/monobank4j/api_json/example/GetExchangeRates.java @@ -1,8 +1,8 @@ -package uk.bot_by.monobank.api_json.example; +package uk.bot_by.monobank4j.api_json.example; import feign.FeignException; import org.json.JSONObject; -import uk.bot_by.monobank.api_json.Currency; +import uk.bot_by.monobank4j.api_json.Currency; public class GetExchangeRates { diff --git a/monobank-api-json/src/test/resources/currency_rates/currency_rates.json b/monobank4j-json/src/test/resources/currency_rates/currency_rates.json similarity index 100% rename from monobank-api-json/src/test/resources/currency_rates/currency_rates.json rename to monobank4j-json/src/test/resources/currency_rates/currency_rates.json diff --git a/monobank-api-json/src/test/resources/too_many_requests/message_pattern.txt b/monobank4j-json/src/test/resources/too_many_requests/message_pattern.txt similarity index 100% rename from monobank-api-json/src/test/resources/too_many_requests/message_pattern.txt rename to monobank4j-json/src/test/resources/too_many_requests/message_pattern.txt diff --git a/monobank-api-json/src/test/resources/too_many_requests/too_many_requests.json b/monobank4j-json/src/test/resources/too_many_requests/too_many_requests.json similarity index 100% rename from monobank-api-json/src/test/resources/too_many_requests/too_many_requests.json rename to monobank4j-json/src/test/resources/too_many_requests/too_many_requests.json diff --git a/monobank-api-token/pom.xml b/monobank4j-token/pom.xml similarity index 92% rename from monobank-api-token/pom.xml rename to monobank4j-token/pom.xml index ce8c0dc..2bc3655 100644 --- a/monobank-api-token/pom.xml +++ b/monobank4j-token/pom.xml @@ -20,19 +20,19 @@ 4.0.0 - monobank-api - uk.bot-by.monobank + monobank4j + uk.bot-by.monobank4j ${revision}${sha1}${changelist} - monobank-api-token + monobank4j-token - Monobank API Token + Monobank4J Token Unofficial Java wrapper for [Monobank API](https://api.monobank.ua/docs): - get exchange rates (public), - get client info and statements, - set a webhook to receive transaction events (personal). - https://gitlab.com/bot-by/monobank-api + https://gitlab.com/bot-by/monobank4j 2021 bot-by diff --git a/monobank-api-token/src/main/java/uk/bot_by/monobank/api_token/TokenInterceptor.java b/monobank4j-token/src/main/java/uk/bot_by/monobank4j/api_token/TokenInterceptor.java similarity index 97% rename from monobank-api-token/src/main/java/uk/bot_by/monobank/api_token/TokenInterceptor.java rename to monobank4j-token/src/main/java/uk/bot_by/monobank4j/api_token/TokenInterceptor.java index ab0639e..2fd45a8 100644 --- a/monobank-api-token/src/main/java/uk/bot_by/monobank/api_token/TokenInterceptor.java +++ b/monobank4j-token/src/main/java/uk/bot_by/monobank4j/api_token/TokenInterceptor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.monobank.api_token; +package uk.bot_by.monobank4j.api_token; import feign.RequestInterceptor; import feign.RequestTemplate; diff --git a/monobank-api-token/src/main/java/uk/bot_by/monobank/api_token/package-info.java b/monobank4j-token/src/main/java/uk/bot_by/monobank4j/api_token/package-info.java similarity index 82% rename from monobank-api-token/src/main/java/uk/bot_by/monobank/api_token/package-info.java rename to monobank4j-token/src/main/java/uk/bot_by/monobank4j/api_token/package-info.java index be6c0af..9f237c2 100644 --- a/monobank-api-token/src/main/java/uk/bot_by/monobank/api_token/package-info.java +++ b/monobank4j-token/src/main/java/uk/bot_by/monobank4j/api_token/package-info.java @@ -7,4 +7,4 @@ *
  • token for Personal API
  • * */ -package uk.bot_by.monobank.api_token; +package uk.bot_by.monobank4j.api_token; diff --git a/monobank-api-token/src/test/java/uk/bot_by/monobank/api_token/TokenInterceptorTest.java b/monobank4j-token/src/test/java/uk/bot_by/monobank4j/api_token/TokenInterceptorTest.java similarity index 97% rename from monobank-api-token/src/test/java/uk/bot_by/monobank/api_token/TokenInterceptorTest.java rename to monobank4j-token/src/test/java/uk/bot_by/monobank4j/api_token/TokenInterceptorTest.java index 0a5048d..010d877 100644 --- a/monobank-api-token/src/test/java/uk/bot_by/monobank/api_token/TokenInterceptorTest.java +++ b/monobank4j-token/src/test/java/uk/bot_by/monobank4j/api_token/TokenInterceptorTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.monobank.api_token; +package uk.bot_by.monobank4j.api_token; import feign.RequestTemplate; import org.junit.jupiter.api.BeforeEach; diff --git a/pom.xml b/pom.xml index 42f1d50..a032178 100644 --- a/pom.xml +++ b/pom.xml @@ -19,8 +19,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - uk.bot-by.monobank - monobank-api + uk.bot-by.monobank4j + monobank4j ${revision}${sha1}${changelist} pom @@ -66,11 +66,11 @@ - monobank-api-gson - monobank-api-jackson - monobank-api-jackson-jr - monobank-api-json - monobank-api-token + monobank4j-gson + monobank4j-jackson + monobank4j-jackson-jr + monobank4j-json + monobank4j-token @@ -319,13 +319,13 @@ - Monobank API + Monobank4J Unofficial Java wrapper for [Monobank API](https://api.monobank.ua/docs): - get exchange rates (public), - get client info and statements, - set a webhook to receive transaction events (personal). - https://gitlab.com/bot-by/monobank-api + https://gitlab.com/bot-by/monobank4j 2021 bot-by @@ -351,17 +351,17 @@ - https://gitlab.com/bot-by/monobank-api - scm:git:https://gitlab.com/bot-by/monobank-api.git - scm:git:git@gitlab.com:bot-by/monobank-api.git + https://gitlab.com/bot-by/monobank4j + scm:git:https://gitlab.com/bot-by/monobank4j.git + scm:git:git@gitlab.com:bot-by/monobank4j.git GitLab - https://gitlab.com/bot-by/monobank-api/-/issues + https://gitlab.com/bot-by/monobank4j/-/issues GitLab - https://gitlab.com/bot-by/monobank-api/-/pipelines + https://gitlab.com/bot-by/monobank4j/-/pipelines @@ -595,7 +595,7 @@ true - + ]]> diff --git a/readme.md b/readme.md index e355326..a722ffd 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Monobank API +# Monobank4J [![English](https://img.shields.io/badge/%F0%9F%93%84-English-blue)](readme.md) [![Українська](https://img.shields.io/badge/%F0%9F%93%84-%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D0%BE%D1%8E-blue)](readme.uk.md) @@ -13,12 +13,12 @@ It implements: There are four implementations for different JSON libraries: -- [monobank-api-gson](monobank-api-gson) for [Google Gson][gson], with dependencies about 448K, -- [monobank-api-jackson](monobank-api-jackson) for [Jackson][jackson], with dependencies about 2.1M, -- [monobank-api-jackson-jr](monobank-api-jackson-jr) for [Jackson Jr.][jackson-jr], with dependencies about 672K, -- [monobank-api-json](monobank-api-json) for [JSON-java][json], with dependencies about 280K +- [monobank4j-gson](monobank4j-gson) for [Google Gson][gson], with dependencies about 448K, +- [monobank4j-jackson](monobank4j-jackson) for [Jackson][jackson], with dependencies about 2.1M, +- [monobank4j-jackson-jr](monobank4j-jackson-jr) for [Jackson Jr.][jackson-jr], with dependencies about 672K, +- [monobank4j-json](monobank4j-json) for [JSON-java][json], with dependencies about 280K -Another package [monobank-api-token](monobank-api-token) provides `TokenInterceptor` for Personal API. +Another package [monobank4j-token](monobank4j-token) provides `TokenInterceptor` for Personal API. ## Contributing diff --git a/readme.uk.md b/readme.uk.md index 9e53eaa..842b1f9 100644 --- a/readme.uk.md +++ b/readme.uk.md @@ -1,4 +1,4 @@ -# Monobank API +# Monobank4J [![English](https://img.shields.io/badge/%F0%9F%93%84-English-blue)](readme.md) [![Українською](https://img.shields.io/badge/%F0%9F%93%84-%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D0%BE%D1%8E-blue)](readme.uk.md) @@ -13,12 +13,12 @@ Існує чотири імплементації для різних JSON бібліотек -- [monobank-api-gson](monobank-api-gson) для [Google Gson][gson], з залежностями приблизно 448K, -- [monobank-api-jackson](monobank-api-jackson) для [Jackson][jackson], з залежностями приблизно 2.1M, -- [monobank-api-jackson-jr](monobank-api-jackson-jr) для [Jackson Jr.][jackson-jr], з залежностями приблизно 672K, -- [monobank-api-json](monobank-api-json) для [JSON-java][json], з залежностями приблизно 280K +- [monobank4j-gson](monobank4j-gson) для [Google Gson][gson], з залежностями приблизно 448K, +- [monobank4j-jackson](monobank4j-jackson) для [Jackson][jackson], з залежностями приблизно 2.1M, +- [monobank4j-jackson-jr](monobank4j-jackson-jr) для [Jackson Jr.][jackson-jr], з залежностями приблизно 672K, +- [monobank4j-json](monobank4j-json) для [JSON-java][json], з залежностями приблизно 280K -Інший пакет [monobank-api-token](monobank-api-token) надає `TokenInterceptor` для використання у персональному API. +Інший пакет [monobank4j-token](monobank4j-token) надає `TokenInterceptor` для використання у персональному API. ## Внесок