Commit 1692d229 authored by Matija Obreza's avatar Matija Obreza
Browse files

How to use Test or Production GLIS

parent 7d9811fc
......@@ -24,6 +24,31 @@ Add this dependency to your project's build file:
```groovy
compile "org.genesys-pgr:glis-client:1.0-SNAPSHOT"
```
## Test and Production GLIS environment
To change the base URL of the GLIS api server (i.e. switch between production and testing environments) you must change the `ApiClient` setting:
```java
ApiClient client = // ...
client.setBasePath("https://glis.planttreaty.org/glisapi/v1")
```
This can be done either on the `Configuration.getDefaultApiClient()` singleton object:
```java
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://glis.planttreaty.org/glisapi/v1")
```
... or when creating a new API instance:
```java
ApiClient client =new ApiClient();
client.setBasePath("https://glis.planttreaty.org/glisapi/v1");
PgrfaApi api = new PgrfaApi(client);
```
## Getting Started
Please follow the [installation](#installation) instruction and execute the following Java code:
......@@ -122,7 +147,7 @@ Class | Method | HTTP request | Description
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
# Development
# Development of the library
1. Updarte `glis.yml` definition
2. Generate code using swagger with `mvn generate-sources`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment