Members
model :Backbone.Model
The class/model that is contained in this collection.
Type:
- Backbone.Model
queryParams :Array.<string>
A list of query parameters that are supported by the Bookkeeper Usages API. These
query parameters can be passed to Usages#fetch in the `options` object, and they
will be used during the fetch.
Type:
- Array.<string>
quota :Quota
A reference to a Quota model that this collection of Usages is associated with.
Type:
Methods
fetch(optionsopt)
Fetches a list of Usages from the DataONE Bookkeeper service, parses them, and
stores them on this collection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Properties:
Name | Type | Description |
---|---|---|
options.quotaType |
string | The Usage quotaType to fetch |
options.subscriber |
string | The user or group subject associated with these Usages |
mergeCollections()
Merges another collection of models with this collection by matching instanceId to seriesId/id.
A reference to the model from the otherCollection is stored in the corresponding Usage model.
parse() → {JSON}
Parses the fetch() of this collection. Bookkeeper returns JSON already, so there
isn't much parsing to do.
Returns:
The collection data in JSON form
- Type
- JSON
url(optionsopt) → {string}
Constructs a URL string for fetching this collection and returns it
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Properties:
Name | Type | Description |
---|---|---|
options.quotaType |
string | The Usage quotaType to fetch |
options.subscriber |
string | The user or group subject associated with these Usages |
Returns:
The URL string
- Type
- string