public class Ameto
extends java.lang.Object
| Constructor and Description |
|---|
Ameto(java.lang.String url,
java.lang.String apiKey)
Initializes an Ameto client for the specified URL using the specified API key.
|
| Modifier and Type | Method and Description |
|---|---|
Asset |
add(java.io.InputStream assetContent,
java.lang.String name)
Uploads the specified asset content.
|
Asset |
add(java.nio.file.Path file)
Uploads the file under the specified path to Ameto.
|
Pipeline |
add(java.lang.String name,
Operator firstOperator,
Operator... operators)
Deprecated.
Please use
addPipeline(String) to create Pipelines. |
Pipeline.Builder |
addPipeline(java.lang.String name)
Starts a pipeline build process.
|
java.util.Set<Asset> |
getAssets()
Returns Assets that have been uploaded to Ameto.
|
java.util.List<Job> |
getJobs()
Returns a list of all jobs.
|
java.util.Set<Pipeline> |
getPipelines()
Returns a collection of all pipelines.
|
void |
remove(Asset asset)
Removes the specified asset from Ameto.
|
void |
remove(ProcessedAsset asset)
Removes the specified processed asset from Ameto.
|
public Ameto(java.lang.String url,
java.lang.String apiKey)
url - URL to the Ameto API endpointapiKey - API access key from your Ameto accountpublic Pipeline.Builder addPipeline(java.lang.String name)
name - Pipeline name@Deprecated public Pipeline add(java.lang.String name, Operator firstOperator, Operator... operators)
addPipeline(String) to create Pipelines.name - Pipeline namefirstOperator - First processing stepoperators - Subsequent processing stepsAmetoException - if communication with the API was not possible or the response returned an error.public java.util.Set<Pipeline> getPipelines()
AmetoException - if communication with the API was not possible or the response returned an error.public java.util.Set<Asset> getAssets()
AmetoException - if the asset list could not be retrievedpublic Asset add(java.nio.file.Path file)
file - File to be uploadedAmetoException - if the specified path cannot be readpublic Asset add(java.io.InputStream assetContent, java.lang.String name)
assetContent - Binary content of the assetname - Name of the asset.AmetoException - if an error occurs during asset uploadpublic void remove(Asset asset)
asset - Asset to be deletedAmetoException - if the specified asset could not be deleted.public void remove(ProcessedAsset asset)
asset - Processed asset to be deletedAmetoException - if the specified processed asset could not be deletedpublic java.util.List<Job> getJobs()
AmetoException - if the request could not be sent