Skip to content
Permalink
Browse files
add clients to project
  • Loading branch information
Nasser Kaze committed Aug 6, 2021
1 parent 9027505 commit 3d58ea4b0c4f0f2ea63703148abf97ca8c9c37ff
Showing 37 changed files with 7,621 additions and 0 deletions.
@@ -0,0 +1,146 @@
# credit-scorecard-java-client

Fineract Credit Scorecard
- API version: 1.0.0

An API module for credit risk assessment


*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*


## Requirements

Building the API client library requires:
1. Java 1.8+
2. Maven/Gradle

## Installation

To install the API client library to your local Maven repository, simply execute:

```shell
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```shell
mvn clean deploy
```

Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.

### Maven users

Add this dependency to your project's POM:

```xml
<dependency>
<groupId>org.apache.fineract.cn</groupId>
<artifactId>credit-scorecard-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
```

### Gradle users

Add this dependency to your project's build file:

```groovy
compile "org.apache.fineract.cn:credit-scorecard-java-client:1.0.0"
```

### Others

At first generate the JAR by executing:

```shell
mvn clean package
```

Then manually install the following JARs:

* `target/credit-scorecard-java-client-1.0.0.jar`
* `target/lib/*.jar`

## Getting Started

Please follow the [installation](#installation) instruction and execute the following Java code:

```java
// Import classes:
import org.apache.fineract.credit.scorecard.ApiClient;
import org.apache.fineract.credit.scorecard.ApiException;
import org.apache.fineract.credit.scorecard.Configuration;
import org.apache.fineract.credit.scorecard.models.*;
import org.apache.fineract.credit.scorecard.services.AlgorithmsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://127.0.0.1:8000");
AlgorithmsApi apiInstance = new AlgorithmsApi(defaultClient);
Algorithm algorithm = new Algorithm(); // Algorithm |
try {
Algorithm result = apiInstance.algorithmsCreate(algorithm);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AlgorithmsApi#algorithmsCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

## Documentation for API Endpoints

All URIs are relative to *http://127.0.0.1:8000*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AlgorithmsApi* | [**algorithmsCreate**](docs/AlgorithmsApi.md#algorithmsCreate) | **POST** /api/v1/algorithms |
*AlgorithmsApi* | [**algorithmsDestroy**](docs/AlgorithmsApi.md#algorithmsDestroy) | **DELETE** /api/v1/algorithms/{id} |
*AlgorithmsApi* | [**algorithmsList**](docs/AlgorithmsApi.md#algorithmsList) | **GET** /api/v1/algorithms |
*AlgorithmsApi* | [**algorithmsPartialUpdate**](docs/AlgorithmsApi.md#algorithmsPartialUpdate) | **PATCH** /api/v1/algorithms/{id} |
*AlgorithmsApi* | [**algorithmsPredict**](docs/AlgorithmsApi.md#algorithmsPredict) | **POST** /api/v1/algorithms/predict |
*AlgorithmsApi* | [**algorithmsRetrieve**](docs/AlgorithmsApi.md#algorithmsRetrieve) | **GET** /api/v1/algorithms/{id} |
*AlgorithmsApi* | [**algorithmsUpdate**](docs/AlgorithmsApi.md#algorithmsUpdate) | **PUT** /api/v1/algorithms/{id} |
*DatasetsApi* | [**datasetsList**](docs/DatasetsApi.md#datasetsList) | **GET** /api/v1/datasets |
*DatasetsApi* | [**datasetsRetrieve**](docs/DatasetsApi.md#datasetsRetrieve) | **GET** /api/v1/datasets/{id} |
*RequestsApi* | [**requestsCreate**](docs/RequestsApi.md#requestsCreate) | **POST** /api/v1/requests |
*RequestsApi* | [**requestsDestroy**](docs/RequestsApi.md#requestsDestroy) | **DELETE** /api/v1/requests/{id} |
*RequestsApi* | [**requestsList**](docs/RequestsApi.md#requestsList) | **GET** /api/v1/requests |
*RequestsApi* | [**requestsPartialUpdate**](docs/RequestsApi.md#requestsPartialUpdate) | **PATCH** /api/v1/requests/{id} |
*RequestsApi* | [**requestsRetrieve**](docs/RequestsApi.md#requestsRetrieve) | **GET** /api/v1/requests/{id} |
*RequestsApi* | [**requestsUpdate**](docs/RequestsApi.md#requestsUpdate) | **PUT** /api/v1/requests/{id} |


## Documentation for Models

- [Algorithm](docs/Algorithm.md)
- [Dataset](docs/Dataset.md)
- [PredictionRequest](docs/PredictionRequest.md)
- [PredictionResponse](docs/PredictionResponse.md)


## Documentation for Authorization

All endpoints do not require authorization.
Authentication schemes defined for the API:

## Recommendation

It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.

## Author



@@ -0,0 +1,114 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'

group = 'org.apache.fineract.cn'
version = '1.0.0'

buildscript {
repositories {
maven { url "https://repo1.maven.org/maven2" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

repositories {
jcenter()
}
sourceSets {
main.java.srcDirs = ['src/main/java']
}

if(hasProperty('target') && target == 'android') {

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}

dependencies {
provided 'javax.annotation:javax.annotation-api:1.3.2'
}
}

afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

} else {

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

install {
repositories.mavenInstaller {
pom.artifactId = 'credit-scorecard-java-client'
}
}

task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
}

dependencies {
implementation 'io.swagger:swagger-annotations:1.5.24'
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation 'com.squareup.okhttp3:okhttp:3.14.7'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'io.gsonfire:gson-fire:1.8.4'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
testImplementation 'junit:junit:4.13.1'
}

javadoc {
options.tags = [ "http.response.details:a:Http Response Details" ]
}
@@ -0,0 +1,20 @@


# Algorithm


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Integer** | | [readonly]
**classifier** | **String** | |
**description** | **String** | | [optional]
**version** | **String** | |
**status** | **String** | |
**createdAt** | **OffsetDateTime** | | [readonly]
**createdBy** | **String** | |
**dataset** | **String** | | [optional]



0 comments on commit 3d58ea4

Please sign in to comment.