Commit 062deebe authored by Matija Obreza's avatar Matija Obreza

[maven-release-plugin] prepare release genesys-client-api-1.2

parent 21cde930
Pipeline #3007 passed with stage
in 52 seconds
# Genesys Client API changelog
## Release 1.2
October 2017
- 4aeb301 Logging
- 4c12425 Upgraded to scribe-java:4.2.0
......@@ -2,22 +2,25 @@
**genesys-client-api** library aims to ease integration of your existing accession management software in Java with [Genesys PGR portal]( "Visit Genesys PGR").
## Using the API client
### Initializing the client
## Initializing the client
GenesysClient genesysClient = new GenesysClient();
// Set the Scribe OAuth API implementation
genesysClient.setGenesysApi(new GenesysApi());
// Set server URL
// Specify clientKey, secret and the callback URL as registered on the server
genesysClient.connect(clientKey, clientSecret, callbackUrl);
String baseUrl = "";
String clientId = "theClientId@genesys";
String clientSecret = "thesecret";
String callbackUrl = "oob";
String scope = "write"; // write scope is required to manage data on Genesys
GenesysClient genesysClient = new GenesysClient(baseUrl, clientId, clientSecret, callbackUrl, scope);
// Ask end user to navigate to Genesys server and authorize your access to their resources
String authorizationUrl = genesysClient.getAuthorizationUrl(GenesysClient.EMPTY_TOKEN);
// Open this URL in browser, login and allow us to access your resources and come back with the code
### Authentication
// Authenticate the user
String authorizationUrl = genesysClient.getAuthorizationUrl();
// The user must now open the authorizationUrl in the browser and approve the
// request on Genesys website. User gets the verifierCode.
String verifierCode = null; // whatever user provides
......@@ -25,8 +28,24 @@ genesysClient.authenticate(verifierCode);;
// Tokens are now accessible. The refreshToken must be **safely** stored for future use.
// genesysClient.getTokens().getAccessToken();
// genesysClient.getTokens().getRefreshToken();
### Re-using tokens
If you have existing tokens you can provide the access and refresh tokens when
initializing the client:
GenesysTokens genesysTokens = new GenesysTokens();
## Using the API client
Updating data:
......@@ -54,7 +73,7 @@ try {
......@@ -64,7 +83,7 @@ Or for the development version:
......@@ -77,6 +96,6 @@ Or for the development version:
### Your new project
- Create a new Maven project in Eclipse, if starting from scratch
- Add dependency on `org.genesys-pgr:genesys-client-api` artefact to your `pom.xml`
- Add dependency on `org.genesys-pgr:genesys-client-api` artifact to your `pom.xml`
- Create your integration project
- Contact for assistance if required
<project xmlns="" xmlns:xsi=""
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<name>Genesys API client library</name>
......@@ -21,7 +20,7 @@
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment