Constructor Summary
Public Constructor | ||
public |
constructor(options: *) |
Member Summary
Public Members | ||
public |
cumulative: * |
|
public get |
has_search: * |
|
public |
|
|
public get |
pages: int: * Total amount of pages
|
|
public |
query: * |
|
public get |
Wether the sort is reversed (descending) or not (ascending)
|
|
public |
|
|
public get |
Field name used for sorting
|
Method Summary
Public Methods | ||
public |
Fetch page from server.
|
|
public |
go_to_page(page: Number): Object Fetch a page given its index.
|
|
public |
Fetch the next page.
|
|
public |
on_fetched(data: *) |
|
public |
Fetch the previous page.
|
|
public |
Perform a server-side search
|
|
public |
Perform a server-side sort
|
Inherited Summary
From class Base | ||
public |
$pubsub: * |
|
public |
Call an API endpoint.
|
|
public |
Emit an event on this model instance
|
|
public |
Unregister a listener on an event.
|
|
public |
Register a listener on an event.
|
|
public |
Register once a listener on an event.
|
From class Model | ||
public |
$options: * |
|
public |
|
|
public |
Empty the model
|
|
public |
Empty or clear a data object based on a schema.
|
|
public |
on_fetched(data: *) |
|
public |
Perform a model validation given its schema
|
Public Constructors
public constructor(options: *) source
Override:
Model#constructorParams:
Name | Type | Attribute | Description |
options | * |
Public Members
public cumulative: * source
public get has_search: * source
public query: * source
Public Methods
public fetch(options: Object): Object source
Fetch page from server.
Params:
Name | Type | Attribute | Description |
options | Object | An optionnal query object |
public go_to_page(page: Number): Object source
Fetch a page given its index.
Params:
Name | Type | Attribute | Description |
page | Number | The page index to fetch. |
public nextPage(options: Object): Object source
Fetch the next page.
Params:
Name | Type | Attribute | Description |
options | Object | An optionnal query object for fetch. |
public on_fetched(data: *) source
Override:
Model#on_fetchedParams:
Name | Type | Attribute | Description |
data | * |