Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
Rename to Monobank4J, close #7
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalijr2 committed Oct 12, 2021
1 parent 4543577 commit 44507bf
Show file tree
Hide file tree
Showing 83 changed files with 198 additions and 160 deletions.
10 changes: 5 additions & 5 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
monobank-api
monobank4j
Copyright 2021 Witalij Berdinskich

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
6 changes: 3 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
10 changes: 5 additions & 5 deletions monobank-api-gson/pom.xml → monobank4j-gson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>monobank-api</artifactId>
<groupId>uk.bot-by.monobank</groupId>
<artifactId>monobank4j</artifactId>
<groupId>uk.bot-by.monobank4j</groupId>
<version>${revision}${sha1}${changelist}</version>
</parent>
<artifactId>monobank-api-gson</artifactId>
<artifactId>monobank4j-gson</artifactId>

<name>Monobank API with Gson</name>
<name>Monobank4J with Gson</name>
<description>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).
</description>
<url>https://gitlab.com/bot-by/monobank-api</url>
<url>https://gitlab.com/bot-by/monobank4j</url>
<inceptionYear>2021</inceptionYear>
<organization>
<name>bot-by</name>
Expand Down
18 changes: 9 additions & 9 deletions monobank-api-gson/readme.md → monobank4j-gson/readme.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,7 +19,7 @@ Use project's GitLab repository instead, please:
```xml
<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>
Expand All @@ -29,8 +29,8 @@ Please add dependency to your project:

```xml
<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>
```
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package uk.bot_by.monobank4j.api_gson;

public class ClientInfo {
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,7 +26,7 @@
*
* <h3>How to get currency rates</h3>
* <p>
* First create an instance of Monobank API.
* First create an instance of Monobank Currency API.
* <p>
* You can use static method {@linkplain #getInstance} or build it with
* <a href="https://github.com/OpenFeign/feign">Feign</a> manually,
Expand All @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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);

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* <li>currency rates</li>
* </ul>
*/
package uk.bot_by.monobank.api_gson;
package uk.bot_by.monobank4j.api_gson;
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ <h3>Unofficial Java wrapper for
<pre><code class="language-xml">
&lt;repositories&gt;
&lt;repository&gt;
&lt;id&gt;monobank-api-maven&lt;/id&gt;
&lt;id&gt;monobank4j-maven&lt;/id&gt;
&lt;url&gt;https://gitlab.example.com/api/v4/projects/28690779/packages/maven&lt;/url&gt;
&lt;/repository&gt;
&lt;/repositories&gt;
</code></pre>
Please add dependency to your project:
<pre><code class="language-xml">
&lt;dependency&gt;
&lt;groupId&gt;uk.bot-by.monobank&lt;/groupId&gt;
&lt;artifactId&gt;monobank-api-gson&lt;/artifactId&gt;
&lt;groupId&gt;uk.bot-by.monobank4j&lt;/groupId&gt;
&lt;artifactId&gt;monobank4j-gson&lt;/artifactId&gt;
&lt;version&gt;1.1.0&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.bot_by.monobank.api_gson;
package uk.bot_by.monobank4j.api_gson;

import feign.Feign;
import feign.FeignException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.bot_by.monobank.api_gson;
package uk.bot_by.monobank4j.api_gson;

import feign.Feign;
import feign.FeignException;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>monobank-api</artifactId>
<groupId>uk.bot-by.monobank</groupId>
<artifactId>monobank4j</artifactId>
<groupId>uk.bot-by.monobank4j</groupId>
<version>${revision}${sha1}${changelist}</version>
</parent>
<artifactId>monobank-api-jackson-jr</artifactId>
<artifactId>monobank4j-jackson-jr</artifactId>

<name>Monobank API with Jackson Jr.</name>
<name>Monobank4J with Jackson Jr.</name>
<description>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).
</description>
<url>https://gitlab.com/bot-by/monobank-api</url>
<url>https://gitlab.com/bot-by/monobank4j</url>
<inceptionYear>2021</inceptionYear>
<organization>
<name>bot-by</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,7 +19,7 @@ Use project's GitLab repository instead, please:
```xml
<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>
Expand All @@ -29,8 +29,8 @@ Please add dependency to your project:

```xml
<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>
```
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +28,7 @@
*
* <h3>How to get currency rates</h3>
* <p>
* First create an instance of Monobank API.
* First create an instance of Monobank Currency API.
* <p>
* You can use static method {@linkplain #getInstance} or build it with
* <a href="https://github.com/OpenFeign/feign">Feign</a> manually,
Expand Down Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 44507bf

Please sign in to comment.