https://github.com/openmf/fineract-client
Mifos Fineract Client is a Java based library that provides a simple interface to interact with the Apache Fineract 1.x Platform APIs
https://github.com/openmf/fineract-client
Last synced: about 1 year ago
JSON representation
Mifos Fineract Client is a Java based library that provides a simple interface to interact with the Apache Fineract 1.x Platform APIs
- Host: GitHub
- URL: https://github.com/openmf/fineract-client
- Owner: openMF
- License: mpl-2.0
- Created: 2020-08-18T14:45:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-26T16:00:36.000Z (over 1 year ago)
- Last Synced: 2025-03-26T17:21:46.670Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 4.17 MB
- Stars: 14
- Watchers: 3
- Forks: 15
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### 🚨 Deprecation Notice
The Fineract Client ([https://github.com/openMF/fineract-client](https://github.com/openMF/fineract-client/)) is now deprecated and will no longer receive updates or active support.
We recommend migrating to our new and improved, multiplatform-compatible client:
👉 Fineract Kotlin Multiplatform Client: [https://github.com/openMF/fineract-client-kmp](https://github.com/openMF/fineract-client-kmp)
# Fineract API Client Library [](https://travis-ci.com/openMF/fineract-client) [](https://jitpack.io/#openMF/fineract-client) [](https://opensource.org/licenses/MPL-2.0)
A **Java** and **Retrofit2** based **Fineract Client Library** that you can use to interact with the **Apache Fineract 1.x Platform**. This library is autogenerated using **Swagger Codegen**. It can be used in Android or any Java and Kotlin Project.
_This library duplicates & overlaps with the "official" [Apache Fineract client library](https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/chapters/sdk/client.adoc), see [#29](https://github.com/openMF/fineract-client/issues/29)._
## Add Dependency
### Gradle
To use library in your gradle project follow the steps below:
1. Add this in your root `build.gradle` at the end of repositories:
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
2. Add the dependency
```groovy
dependencies {
def client_Version = "2.02"
implementation "com.github.openMF:fineract-client:$client_Version"
}
```
### Maven
To use the library in your Maven project, follow the steps below:
1. Add the JitPack repository to your build file:
```xml
jitpack.io
https://jitpack.io
```
2. Add the dependency
```xml
com.github.openMF
fineract-client
2.0.2
```
## Usage
Example code to use the **Authentication API**:
```java
import io.reactivex.schedulers.Schedulers;
import org.apache.fineract.client.models.PostAuthenticationResponse;
import org.apache.fineract.client.util.FineractClient;
import org.reactivestreams.Subscriber;
public class Main {
public static void main(String[] args) {
FineractClient client = FineractClient.builder()
.basicAuth("mifos", "password")
.tenant("default")
.build();
PostAuthenticationRequest body = new PostAuthenticationRequest();
body.setUsername("mifos");
body.setPassword("password");
client.authentication.authenticate(body, false)
.observeOn(Schedulers.newThread()) // use scheduler based on different scenarios, in case of android use 'AndroidSchedulers.mainThread()'
.subscribeOn(Schedulers.io())
.subscribe(new Subscriber (){
@Override
public void onNext(PostAuthenticationResponse postAuthenticationResponse) {
// handle next events here
}
@Override
public void onError(Throwable t) {
// handle error events here
}
@Override
public void onComplete() {
// handle on completed events here
}
});
}
}
```
## Build Project
Clone the repository and import as Maven project in IntelliJ IDEA or Eclipse
Before building the project, make sure you have the following things installed.
- Maven
- Java 11
To install the API client library to your local Maven repository, simply execute:
```shell
mvn install
```
To build the library using Gradle, execute the following command
```shell
./gradlew build
```
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.