Class Endpoint

Endpoint for a product (OTS or Custom).

Hierarchy

  • BaseEndpoint
    • Endpoint

Constructors

Properties

owner: string

Account owning the product.

settings: ApiSettings

Settings relating to the API.

urlName: string

URL of a product.

urlRoot: string

Entire root of the URL for API calls.

version: string

Product's version, as a string.

Asynchronous Methods

  • Requests the results of a queued document from the API. Throws an error if the server's response contains one.

    Returns

    a Promise containing the parsed result.

    Parameters

    • queueId: string

      The document's ID in the queue.

    Returns Promise<EndpointResponse>

  • Enqueues a prediction to the API. Throws an error if the server's response contains one.

    Returns

    a Promise containing queue data.

    Parameters

    • params: PredictParams

      parameters relating to prediction options.

    Returns Promise<EndpointResponse>

Other Methods

  • Reads a response from the API and processes it.

    Returns

    the processed request.

    Parameters

    Returns ClientRequest

Synchronous Methods

  • Sends a prediction to the API and parses out the result. Throws an error if the server's response contains one.

    Returns

    a Promise containing parsing results.

    Parameters

    • params: PredictParams

      parameters relating to prediction options.

    Returns Promise<EndpointResponse>

Generated using TypeDoc