swagger-android-client
Requirements
Building the API client library requires Maven to be installed.
Installation
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Maven users
Add this dependency to your project's POM:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-android-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Gradle users
Add this dependency to your project's build file:
compile "io.swagger:swagger-android-client:1.0.0"
Others
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/swagger-android-client-1.0.0.jar
- target/lib/*.jar
Getting Started
Please follow the installation instruction and execute the following Java code:
import io.swagger.client.api.BrandsApi;
public class BrandsApiExample {
public static void main(String[] args) {
BrandsApi apiInstance = new BrandsApi();
Brand brand = new Brand(); // Brand | Brand to add to the store
try {
InlineResponse201 result = apiInstance.addBrands(brand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BrandsApi#addBrands");
e.printStackTrace();
}
}
}
Documentation for API Endpoints
All URIs are relative to https://api.facestore.local/v1
Class | Method | HTTP request | Description |
---|---|---|---|
BrandsApi | addBrands | POST /brands | |
BrandsApi | deleteBrandById | DELETE /brands/{id}/ | |
BrandsApi | getBrandById | GET /brands/{id}/ | |
BrandsApi | getBrands | GET /brands | |
BrandsApi | updateCategoryById | PUT /brands/{id}/ | |
BrandsApi | updateCategoryById_0 | PATCH /brands/{id}/ | |
CategoriesApi | addCategories | POST /categories | |
CategoriesApi | deleteCategoryById | DELETE /categories/{id}/ | |
CategoriesApi | getCategories | GET /categories | |
CategoriesApi | getCategoryById | GET /categories/{id}/ | |
CategoriesApi | updateCategoryById | PUT /categories/{id}/ | |
CustomersApi | getCustomerById | GET /customers/{id}/ | |
CustomersApi | getCustomers | GET /customers | |
OrdersApi | getOrderById | GET /orders/{id}/ | |
OrdersApi | getOrders | GET /orders | |
PaymentsApi | getPaymentById | GET /payments/{id}/ | |
PaymentsApi | getPayments | GET /payments | |
ProductsApi | addProduct | POST /products | |
ProductsApi | deleteProductById | DELETE /products/{id}/ | |
ProductsApi | getProductById | GET /products/{id}/ | |
ProductsApi | getProducts | GET /products | |
ProductsApi | updateProductById | PUT /products/{id}/ | |
ProductsApi | updateProductById_0 | PATCH /products/{id}/ | |
ProductsAttributesApi | addProductsAttributes | POST /attributes | |
ProductsAttributesApi | deleteProductAttributeById | DELETE /attributes/{id}/ | |
ProductsAttributesApi | getProductAttributeById | GET /attributes/{id}/ | |
ProductsAttributesApi | getProductsAttributes | GET /attributes | |
ProductsAttributesApi | updateProductAttributeById | PUT /attributes/{id}/ | |
ShippingsApi | addShipping | POST /shippings | |
ShippingsApi | deleteShippingById | DELETE /shippings/{id}/ | |
ShippingsApi | getShippingById | GET /shippings/{id}/ | |
ShippingsApi | getShippings | GET /shippings | |
ShippingsApi | updateShippingById | PUT /shippings/{id}/ | |
ShippingsApi | updateShippingById_0 | PATCH /shippings/{id}/ | |
TaxesApi | addTaxes | POST /taxes | |
TaxesApi | deleteTaxById | DELETE /taxes/{id}/ | |
TaxesApi | getTaxById | GET /taxes/{id}/ | |
TaxesApi | getTaxes | GET /taxes | |
TaxesApi | updateTaxById | PUT /taxes/{id}/ | |
TaxesApi | updateTaxById_0 | PATCH /taxes/{id}/ |
Documentation for Models
- Attribute
- AttributeOptions
- Brand
- Category
- Customer
- DefaultResponse
- I18n
- I18nProduct
- I18nProductSeo
- InlineResponse200
- InlineResponse2001
- InlineResponse2001Meta
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse201
- InlineResponse2011
- InlineResponse2012
- InlineResponse2013
- InlineResponse2014
- MetaPartialResponse
- NotFoundResponse
- Options
- Order
- Payment
- Product
- Shipping
- Tax
Documentation for Authorization
Authentication schemes defined for the API:
APIKeyHeader
- Type: API key
- API key parameter name: APIToken
- Location: HTTP header
Recommendation
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.