org.genesys.glis.v1.api.GenesysApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glis-client-resteasy Show documentation
Show all versions of glis-client-resteasy Show documentation
API client for the Global Information System for plant genetic resources for food and agriculture (PGRFA) with RESTeasy
The newest version!
package org.genesys.glis.v1.api;
import org.genesys.glis.v1.invoker.ApiException;
import org.genesys.glis.v1.invoker.ApiClient;
import org.genesys.glis.v1.invoker.Configuration;
import org.genesys.glis.v1.invoker.Pair;
import javax.ws.rs.core.GenericType;
import org.genesys.glis.v1.model.UpdateTargets;
import org.genesys.glis.v1.model.UpdatedTarget;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-26T22:59:00.232Z")
public class GenesysApi {
private ApiClient apiClient;
public GenesysApi() {
this(Configuration.getDefaultApiClient());
}
public GenesysApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Add Genesys as target URL to specified DOIs
* We'll have fun!
* @param targets Registers Genesys as a target URL for specified DOIs (optional)
* @return List
* @throws ApiException if fails to make API call
*/
public List registerGenesysAsTarget(UpdateTargets targets) throws ApiException {
Object localVarPostBody = targets;
// create path and map variables
String localVarPath = "/glis/genesys/addtarget".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "easySmta" };
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}