AerisApiClientCollection
Summary
A subset of an AerisApiCollection, which may be manipulated on the client side, without effecting models retrieved from the server.
For example, a ClientCollection will filter models based on provided filter params, without removing models from the AerisApiCollection. Since we saved previously stored models, the filter can be changed or removed without needed to request new data from the server.
Constructor
aeris.api.collections.AerisApiClientCollection
Syntax
aeris.api.collections.AerisApiClientCollection
-
opt_models -
opt_options -
clientLimit -
clientFilter
Summary
Item Index
Methods
Methods
addFilter
Syntax
addFilter
-
filter -
opt_options
Summary
Add a filter to the Aeris API request. Filters will also be applied client-side, if possible.
addQuery
Syntax
addQuery
-
query -
opt_options
Summary
Add a query term to Aeris API request.
applyClientFilters_
Syntax
applyClientFilters_
-
filterCollection
Summary
Parameters:
-
filterCollectionFilterCollection
bindClientFilters_
Syntax
bindClientFilters_
()
private
Summary
createSourceCollection_
Syntax
createSourceCollection_
-
opt_models -
options
Summary
Parameters:
-
opt_modelsArray.<Model> -
optionsObject=Options to pass to the source collection.
-
SourceCollectionTypefunction():AerisApiCollectionsource collection constructor.
-
getApiFilters_
Syntax
Summary
Get the filters used to query the AerisAPI
Returns:
getParams
Syntax
Summary
Returns the params object used to fetch collection data.
Returns:
getQuery
Syntax
Summary
Returns the query for the Aeris API request.
Returns:
removeClientFilter
Syntax
removeClientFilter
()
Summary
Remove all client-side filters from the collection.
removeClientLimit
Syntax
removeClientLimit
()
Summary
removeFilter
Syntax
removeFilter
-
filter -
opt_options
Summary
Remove a filter from the Aeris API request. Filters will also be applied client-side, if possible.
removeQuery
Syntax
removeQuery
-
query -
opt_options
Summary
Remove a query from the Aeris API request
resetFilter
Syntax
resetFilter
-
opt_filter -
opt_options
Summary
Reset a filter from the Aeris API request. Filters will also be applied client-side, if possible.
resetQuery
Syntax
resetQuery
-
opt_query -
opt_options
Summary
Resets the query for the Aeris API request.
setClientFilter
Syntax
setClientFilter
-
filter -
opt_ctx
Summary
Apply a client-side filter to the collection.
setParams
Syntax
setParams
-
key -
value
Summary
Updates the requests params included with API requests.
updateClientFilters_
Syntax
updateClientFilters_
()
private
Summary
Events
'request'
Syntax
'request'
Summary
A request has been made to fetch data from the Aeris API.
Event Payload:
-
objectaeris.api.mixins.AerisApiBehaviorData object making the request.
-
promiseaeris.PromisePromise to fetch data. Resolves with raw data.
-
requestOptionsObject
'sync'
Syntax
'sync'
Summary
The AerisAPI has responsed to a request, and the data object has updated with fetched data.
Event Payload:
-
objectaeris.api.mixins.AerisApiBehaviorData object which made the request.
-
respObjectRaw response data from the AerisAPI.
-
requestOptionsObject