MetafoldClient

MetafoldClient

Metafold REST API client.

Constructor

new MetafoldClient(accessToken, projectIDopt, baseURLopt)

Create a client.
Source:
Parameters:
Name Type Attributes Description
accessToken string Metafold API secret key.
projectID string <optional>
ID of the project to make API calls against.
baseURL string <optional>
Metafold API URL. Used for internal testing.

Members

assets :Assets

Endpoint for managing asset resources.
Source:
Type:

axios

Underlying HTTP client.
Source:

jobs :Jobs

Endpoint for managing job resources.
Source:
Type:

projects :Projects

Endpoint for querying user information.
Source:
Type:

workflows :Workflows

Endpoint for managing workflow resources.
Source:
Type:

Methods

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 Workflow status url.
timeout number <optional>
12000 Time in seconds to wait for a result.
every number <optional>
1 Frequency in seconds.
Returns:
HTTP response.