Skip to content

Android library to interact with Ravimoshark Piece API. It is generated with swagger code generator.

Notifications You must be signed in to change notification settings

patoperpetua/ravimoshark-apis-piece-libs-android

Repository files navigation

RAVIMOSHARK - APIS - PIECE - LIBS - ANDROID

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 Piece 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 piece database. This API allow to create, modify and delete pieces and products (cards, details and key points).

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

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API piece 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.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.ravimoshark.apis</groupId>
  <artifactId>piece</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.ravimoshark.apis:piece:3.0.13"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/piece-3.0.13.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.ravimoshark.apis.piece.*;
import com.ravimoshark.apis.piece.auth.*;
import com.ravimoshark.apis.piece.model.*;
import com.ravimoshark.apis.piece.calls.CategoriesApi;

import java.io.File;
import java.util.*;

public class CategoriesApiExample {

    public static void main(String[] args) {

        CategoriesApi apiInstance = new CategoriesApi();
        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)
        Categories category = new Categories(); // Categories | category of desired product.
        try {
            InlineResponse200 result = apiInstance.getCategories(skip, limit, orderBy, filterBy, deleted, metadata, category);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CategoriesApi#getCategories");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost:8003

Class Method HTTP request Description
CategoriesApi getCategories GET /categories Get all categories.
PiecesApi getPieceById GET /pieces/{refArticle} Get one piece.
PiecesApi getPieces GET /pieces Get all pieces.
ProductsApi getProductById GET /products/{refArticle} Get one product.
ProductsApi getProducts GET /products Get all products.

Documentation for Models

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 multi-threaded environment to avoid any potential issues.

Generate

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.

About

Android library to interact with Ravimoshark Piece API. It is generated with swagger code generator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published