Mixin: base

base

This provides methods used by resources that have no relationships with other resources. It's not meant to be used directly.

Methods

(static) count(paramsopt) → {Promise}

Counts the number of records.
Parameters:
Name Type Attributes Description
params Object <optional>
Query parameters
Returns:
Promise that resolves with the result
Type
Promise

(static) create(params) → {Promise}

Creates a new record.
Parameters:
Name Type Description
params Object Record properties
Returns:
Promise that resolves with the result
Type
Promise

(static) delete(id) → {Promise}

Deletes a record.
Parameters:
Name Type Description
id Number Record ID
Returns:
Promise that resolves with the result
Type
Promise

(static) get(id, paramsopt) → {Promise}

Gets a single record by its ID.
Parameters:
Name Type Attributes Description
id Number Record ID
params Object <optional>
Query parameters
Returns:
Promise that resolves with the result
Type
Promise

(static) list(params) → {Promise}

Gets a list of records.
Parameters:
Name Type Description
params Object Query parameters
Returns:
Promise that resolves with the result
Type
Promise

(static) update(id, params) → {Promise}

Updates a record.
Parameters:
Name Type Description
id Number Record ID
params Object Record properties
Returns:
Promise that resolves with the result
Type
Promise