public final class Algorithm
extends java.lang.Object
Constructor and Description |
---|
Algorithm(HttpClient client,
AlgorithmRef algoRef) |
Modifier and Type | Method and Description |
---|---|
AlgoResponse |
pipe(java.lang.Object input)
Calls the Algorithmia API for a given input.
|
FutureAlgoResponse |
pipeAsync(java.lang.Object input)
Calls the Algorithmia API asynchronously for a given input.
|
AlgoResponse |
pipeJson(java.lang.String inputJson)
Calls the Algorithmia API for given input that will be treated as JSON
|
FutureAlgoResponse |
pipeJsonAsync(java.lang.String inputJson)
Calls the Algorithmia API asynchronously for given input that will be treated as JSON
The future response will complete when the algorithm has completed or errored
|
public Algorithm(HttpClient client, AlgorithmRef algoRef)
public AlgoResponse pipe(java.lang.Object input) throws APIException
input
- algorithm input, will automatically be converted into JSONAPIException
- if there is a problem communication with the Algorithmia API.public FutureAlgoResponse pipeAsync(java.lang.Object input)
input
- algorithm input, will automatically be converted into JSONpublic AlgoResponse pipeJson(java.lang.String inputJson) throws APIException
inputJson
- json input valueAPIException
- if there is a problem communication with the Algorithmia API.public FutureAlgoResponse pipeJsonAsync(java.lang.String inputJson)
inputJson
- json input value