Constructor
new Usages()
- Since:
- Source:
Extends
Members
model :Backbone.Model
The class/model that is contained in this collection.
Type:
- Source:
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:
- Source:
A reference to a Quota model that this collection of Usages is associated with.
Type:
- Source:
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 |
- Source:
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.
- Source:
parse() → {JSON}
Parses the fetch() of this collection. Bookkeeper returns JSON already, so there
isn't much parsing to do.
- Source:
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 |
- Source:
Returns:
The URL string
-
Type
-
string