net~ LocationDatumUrlHelperMixin

A mixin class that adds SolarLocation datum query support to module:net~UrlHelper.

This mixin is commonly mixed with the module:net~QueryUrlHelperMixin to pick up support for the SolarQuery base URL.

This mixin is commonly mixed with the module:net~LocationUrlHelperMixin to pick up support for `locationId` and `sourceId` properties.

Methods

availableSourcesUrl(locationIdopt, startDateopt, endDateopt) → {string}

Generate a URL for finding the available source IDs for a location or metadata filter.

Parameters:
NameTypeAttributesDescription
locationIdnumber<optional>

a specific location ID to use; if not provided the locationId property of this class will be used

startDateDate<optional>

a start date to limit the search to

endDateDate<optional>

an end date to limit the search to

Returns:

the URL

Type: 
string

listDatumUrl(datumFilter, sortsopt, paginationopt) → {string}

Generate a URL for querying for location datum, in either raw or aggregate form.

If the datumFilter has an aggregate value set, then aggregate results will be returned by SolarNet.

Parameters:
NameTypeAttributesDescription
datumFiltermodule:domain~DatumFilter

the search criteria

sortsArray.<module:domain~SortDescriptor><optional>

optional sort settings to use

paginationmodule:domain~Pagination<optional>

optional pagination settings to use

Returns:

the URL

Type: 
string

mostRecentDatumUrl(datumFilter, sortsopt, paginationopt) → {string}

Generate a URL for querying for the most recent datum.

Parameters:
NameTypeAttributesDescription
datumFiltermodule:domain~DatumFilter

the search criteria

sortsArray.<module:domain~SortDescriptor><optional>

optional sort settings to use

paginationmodule:domain~Pagination<optional>

optional pagination settings to use

Returns:

the URL

Type: 
string

reportableIntervalUrl(locationIdopt, sourceIdopt) → {string}

Generate a URL for the "reportable interval" for a location, optionally limited to a specific source ID.

If no source IDs are provided, then the reportable interval query will return an interval for all available sources.

Parameters:
NameTypeAttributesDescription
locationIdnumber<optional>

a specific location ID to use; if not provided the locationId property of this class will be used

sourceIdstring<optional>

a specific source ID to limit query to; if not provided the sourceId property of this class will be used; if null the sourceId property of this class will be ignored

Returns:

the URL

Type: 
string