public class VisualRecognition extends WatsonService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION_DATE_2016_05_20
The Constant VERSION_DATE_2016_05_20.
|
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
VisualRecognition(java.lang.String versionDate)
Instantiates a new `VisualRecognition`.
|
VisualRecognition(java.lang.String versionDate,
java.lang.String apiKey)
Instantiates a new `VisualRecognition` with API Key.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<ClassifiedImages> |
classify(ClassifyOptions classifyOptions)
Classify images.
|
ServiceCall<Classifier> |
createClassifier(CreateClassifierOptions createClassifierOptions)
Create a classifier.
|
ServiceCall<java.lang.Void> |
deleteClassifier(DeleteClassifierOptions deleteClassifierOptions)
Delete a custom classifier.
|
ServiceCall<DetectedFaces> |
detectFaces(DetectFacesOptions detectFacesOptions)
Detect faces in an image.
|
ServiceCall<Classifier> |
getClassifier(GetClassifierOptions getClassifierOptions)
Retrieve information about a custom classifier.
|
ServiceCall<Classifiers> |
listClassifiers(ListClassifiersOptions listClassifiersOptions)
Retrieve a list of custom classifiers.
|
protected void |
setAuthentication(okhttp3.Request.Builder builder)
Sets the authentication.
|
ServiceCall<Classifier> |
updateClassifier(UpdateClassifierOptions updateClassifierOptions)
Update a classifier.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setDefaultHeaders, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public static final java.lang.String VERSION_DATE_2016_05_20
public VisualRecognition(java.lang.String versionDate)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.public VisualRecognition(java.lang.String versionDate, java.lang.String apiKey)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.apiKey
- the API Keyprotected void setAuthentication(okhttp3.Request.Builder builder)
WatsonService
setAuthentication
in class WatsonService
builder
- the new authenticationpublic ServiceCall<ClassifiedImages> classify(ClassifyOptions classifyOptions)
classifyOptions
- the ClassifyOptions
containing the options for the callClassifiedImages
with the responsepublic ServiceCall<DetectedFaces> detectFaces(DetectFacesOptions detectFacesOptions)
detectFacesOptions
- the DetectFacesOptions
containing the options for the callDetectedFaces
with the responsepublic ServiceCall<Classifier> createClassifier(CreateClassifierOptions createClassifierOptions)
createClassifierOptions
- the CreateClassifierOptions
containing the options for the callClassifier
with the responsepublic ServiceCall<java.lang.Void> deleteClassifier(DeleteClassifierOptions deleteClassifierOptions)
deleteClassifierOptions
- the DeleteClassifierOptions
containing the options for the callpublic ServiceCall<Classifier> getClassifier(GetClassifierOptions getClassifierOptions)
getClassifierOptions
- the GetClassifierOptions
containing the options for the callClassifier
with the responsepublic ServiceCall<Classifiers> listClassifiers(ListClassifiersOptions listClassifiersOptions)
listClassifiersOptions
- the ListClassifiersOptions
containing the options for the callClassifiers
with the responsepublic ServiceCall<Classifier> updateClassifier(UpdateClassifierOptions updateClassifierOptions)
updateClassifierOptions
- the UpdateClassifierOptions
containing the options for the callClassifier
with the response