Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.38 KB

README.md

File metadata and controls

43 lines (31 loc) · 1.38 KB

GBIF Registry WS Client

This project provides the WS client to the registry web services. It implements the GBIF Registry API.

Internally the module uses OpenFeign and Spring Cloud OpenFeign.

Common classes and configuration for clients can be found in the project gbif-common-ws, branch registry-spring-boot-integration.

The registry-ws client can be configured in the following ways:

Read-only mode

Example:

// set this to the web service URL.  It might be localhost:8080 for local development
String wsUrl = "http://api.gbif.org/v1/";
ClientFactory clientFactory = new ClientFactory(wsUrl);
DatasetServcie datasetClient = clientFactory.newInstance(DatasetClient.class);

Read-write mode

This includes authentication functionality. Make sure you are using right properties wsUrl, appKey and secretKey. Example:

// set this to the web service URL.  It might be localhost:8080 for local development
String wsUrl = "http://api.gbif.org/v1/";
String appKey = "app.key";
String secretKey = "secret-key";
String username = "username";
ClientFactory clientFactory = new ClientFactory(username, wsUrl, appKey, secretKey);
DatasetServcie datasetClient = clientFactory.newInstance(DatasetClient.class);

Parent