Mixin: LocationDatumUrlHelperMixin

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( [locationId] [, startDate] [, endDate])

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

Parameters:
Name Type Argument Description
locationId number <optional>

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

startDate Date <optional>

a start date to limit the search to

endDate Date <optional>

an end date to limit the search to

Returns:

the URL

Type
string

listDatumUrl(datumFilter [, sorts] [, pagination])

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:
Name Type Argument Description
datumFilter module:domain~DatumFilter

the search criteria

sorts Array.<module:domain~SortDescriptor> <optional>

optional sort settings to use

pagination module:domain~Pagination <optional>

optional pagination settings to use

Returns:

the URL

Type
string

mostRecentDatumUrl(datumFilter [, sorts] [, pagination])

Generate a URL for querying for the most recent datum.

Parameters:
Name Type Argument Description
datumFilter module:domain~DatumFilter

the search criteria

sorts Array.<module:domain~SortDescriptor> <optional>

optional sort settings to use

pagination module:domain~Pagination <optional>

optional pagination settings to use

Returns:

the URL

Type
string

reportableIntervalUrl( [locationId] [, sourceId])

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:
Name Type Argument Description
locationId number <optional>

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

sourceId string <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