The main repository is hosted in gitlab.com/ravimosharksas but it is automatically mirrored to github.com/RavimoShark, gitlab.com/singletonsd, github.com/singletonsd, github.com/patoperpetua and to gitlab.com/patoperpetua. If you are in the Github page it may occur that is not updated to the last version.
Ravimoshark Client API
- API version: 1.0.0
- Build date: 2019-10-23T10:35:25.141+02:00[Europe/Paris]
This is an API to interact with Ravimoshark client database. # Introduction This API allow to create, modify and delete addresses and clients. # User Authentication This API does not contain any kind of user validation but It request to have a valid authentication user to interact with it. For more information about user Authentication, please refer to Ravimoshark User Authentication.
For more information, please visit http://ravimoshark.com/contact
Automatically generated by the Swagger Codegen
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.ravimoshark.apis</groupId>
<artifactId>client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.ravimoshark.apis:client:3.0.13"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/client-3.0.13.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.ravimoshark.apis.client.*;
import com.ravimoshark.apis.client.auth.*;
import com.ravimoshark.apis.client.model.*;
import com.ravimoshark.apis.client.calls.AddressesApi;
import java.io.File;
import java.util.*;
public class AddressesApiExample {
public static void main(String[] args) {
AddressesApi apiInstance = new AddressesApi();
Addresses body = new Addresses(); // Addresses |
try {
Addresses result = apiInstance.addAddress(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressesApi#addAddress");
e.printStackTrace();
}
}
}
import com.ravimoshark.apis.client.*;
import com.ravimoshark.apis.client.auth.*;
import com.ravimoshark.apis.client.model.*;
import com.ravimoshark.apis.client.calls.AddressesApi;
import java.io.File;
import java.util.*;
public class AddressesApiExample {
public static void main(String[] args) {
AddressesApi apiInstance = new AddressesApi();
Long id = 789L; // Long | id to delete or search
try {
IdInteger result = apiInstance.deleteAddress(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressesApi#deleteAddress");
e.printStackTrace();
}
}
}
import com.ravimoshark.apis.client.*;
import com.ravimoshark.apis.client.auth.*;
import com.ravimoshark.apis.client.model.*;
import com.ravimoshark.apis.client.calls.AddressesApi;
import java.io.File;
import java.util.*;
public class AddressesApiExample {
public static void main(String[] args) {
AddressesApi apiInstance = new AddressesApi();
Addresses body = new Addresses(); // Addresses |
try {
Addresses result = apiInstance.editAddress(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressesApi#editAddress");
e.printStackTrace();
}
}
}
import com.ravimoshark.apis.client.*;
import com.ravimoshark.apis.client.auth.*;
import com.ravimoshark.apis.client.model.*;
import com.ravimoshark.apis.client.calls.AddressesApi;
import java.io.File;
import java.util.*;
public class AddressesApiExample {
public static void main(String[] args) {
AddressesApi apiInstance = new AddressesApi();
Long id = 789L; // Long | id to delete or search
Deleted deleted = new Deleted(); // Deleted | Get all, deleted, not deleted data. Default not deleted.
try {
Addresses result = apiInstance.getAddressById(id, deleted);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressesApi#getAddressById");
e.printStackTrace();
}
}
}
import com.ravimoshark.apis.client.*;
import com.ravimoshark.apis.client.auth.*;
import com.ravimoshark.apis.client.model.*;
import com.ravimoshark.apis.client.calls.AddressesApi;
import java.io.File;
import java.util.*;
public class AddressesApiExample {
public static void main(String[] args) {
AddressesApi apiInstance = new AddressesApi();
Integer skip = 56; // Integer | number of item to skip
Integer limit = 56; // Integer | max records to return
String orderBy = "orderBy_example"; // String | order by property.
String filterBy = "filterBy_example"; // String | filter data.
Deleted deleted = new Deleted(); // Deleted | Get all, deleted, not deleted data. Default not deleted.
Boolean metadata = true; // Boolean | If metadata is needed (for pagination controls)
String refClient = "refClient_example"; // String | Data from a desired client
try {
InlineResponse200 result = apiInstance.getAddresses(skip, limit, orderBy, filterBy, deleted, metadata, refClient);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressesApi#getAddresses");
e.printStackTrace();
}
}
}
All URIs are relative to http://localhost:8000
Class | Method | HTTP request | Description |
---|---|---|---|
AddressesApi | addAddress | POST /addresses | Add one address. |
AddressesApi | deleteAddress | DELETE /addresses/{id} | Delete one address. |
AddressesApi | editAddress | PUT /addresses | Edit one address. |
AddressesApi | getAddressById | GET /addresses/{id} | Get one address. |
AddressesApi | getAddresses | GET /addresses | Get all addresses. |
ClientsApi | addClient | POST /clients | Add one client. |
ClientsApi | deleteClient | DELETE /clients/{refClient} | Delete one client. |
ClientsApi | editClient | PUT /clients | Edit one client. |
ClientsApi | getClientById | GET /clients/{refClient} | Get one client. |
ClientsApi | getClients | GET /clients | Get all clients. |
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multi-threaded environment to avoid any potential issues.
To regenerate the library from spec, first create a .env file with the following content:
SWAGGER_API_SPEC="" #Default value: ../../documentation/dist/openapi.yaml
SWAGGER_GROUP="" #MANDATORY FIELD
SWAGGER_ARTIFACT="" #MANDATORY FIELD
And then just execute the following script:
mkdir -p scripts && \
curl -o scripts/swagger_binaries_downloader.sh -L https://singletonsd.gitlab.io/scripts/swagger/latest/swagger_binaries_downloader.sh && \
curl -o scripts/swagger_generate_android.sh -L https://singletonsd.gitlab.io/scripts/swagger/latest/swagger_generate_android.sh && \
chmod +x scripts/swagger_binaries_downloader.sh scripts/swagger_generate_android.sh && \
./scripts/swagger_generate_android.sh
© Singleton SD, France, 2019.