public abstract class AlchemyService extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ENDPOINT |
protected static String |
JSONP |
protected static String |
OUTPUT_MODE |
MESSAGE_CODE, MESSAGE_ERROR, VERSION| Constructor and Description |
|---|
AlchemyService()
Instantiates a new alchemy service.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getInputFormat(Map<String,Object> params,
String... acceptedFormats)
Returns the first non-null accepted format from the parameter map.
|
protected <T> T |
processServiceCall(ResponseConverter<T> converter,
okhttp3.Response response)
Process service call.
|
protected void |
setAuthentication(okhttp3.Request.Builder builder)
Sets the authentication.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, setApiKey, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringprotected static final String ENDPOINT
protected static final String JSONP
protected static final String OUTPUT_MODE
protected <T> T processServiceCall(ResponseConverter<T> converter, okhttp3.Response response)
WatsonServiceprocessServiceCall in class WatsonServiceT - the generic typeconverter - the converterresponse - the responseprotected String getInputFormat(Map<String,Object> params, String... acceptedFormats)
params - the request parametersacceptedFormats - the accepted formatsprotected void setAuthentication(okhttp3.Request.Builder builder)
WatsonServicesetAuthentication in class WatsonServicebuilder - the new authenticationCopyright © 2015–2016. All rights reserved.