Classes
Methods
(async) get(id)
Get a job.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
string
|
ID of job to get. |
Returns:
Job resource.
(async) list(paramsopt)
List jobs.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object
|
<optional> |
Optional list parameters.
|
Returns:
List of job resources.
poll(url, timeoutopt, everyopt)
Poll the given URL every one second.
Helpful for waiting on job results given a status URL.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
string
|
Job status url. | ||
timeout |
number
|
<optional> |
12000 | Time in seconds to wait for a result. |
every |
number
|
<optional> |
1 | Frequency in seconds. |
Returns:
HTTP response.
(async) run(type, params, nameopt, timeoutopt)
Dispatch a new job and wait for the result.
See Metafold API docs for the full list of jobs.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type |
string
|
Job type. | ||
params |
Object
|
Job parameters. | ||
name |
string
|
<optional> |
Job name. | |
timeout |
number
|
<optional> |
12000 | Time in seconds to wait for a result. |
Returns:
Completed job resource.
(async) runStatus(type, params, nameopt) → {string}
Dispatch a new job and return immediately without waiting for result.
See Metafold API docs for the full list of jobs.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string
|
Job type. | |
params |
Object
|
Job parameters. | |
name |
string
|
<optional> |
Job name. |
Returns:
- Type:
-
string
Job status url.
(async) update(id, paramsopt)
Update a job.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
id |
string
|
ID of job to update. | |||||||||
params |
Object
|
<optional> |
Optional update parameters.
|
Returns:
Updated job resource.