net~ NodeDatumUrlHelperMixin

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

Methods

availableSourcesUrl(datumFilter, withNodeIds) → {string}

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

Parameters:
NameTypeDescription
datumFiltermodule:domain~DatumFilter

the search criteria, which can define nodeId, startDate, endDate, and metadataFilter properties to limit the results to; if nodeId not provided the nodeIds property of this class will be used

withNodeIdsboolean

if true then force the response to include node IDs along with source IDs, instead of just source IDs

Returns:

the URL

Type: 
string

datumFilter() → {module:domain~DatumFilter}

Get a new module:domain~DatumFilter configured with properties of this instance.

This will configure the following properties:

  • nodeIds
  • sourceIds
Returns:

the filter

Type: 
module:domain~DatumFilter

datumReadingUrl(datumFilter, readingType, toleranceopt, sortsopt, paginationopt) → {string}

Generate a URL for querying for datum reading values.

The datumFilter must provide the required date(s) to use for the reading type. If the reading type only requires one date, then the module:domain~DatumFilter#startDate or module:domain~DatumFilter#endDate value should be provided.

Parameters:
NameTypeAttributesDescription
datumFiltermodule:domain~DatumFilter

the search criteria

readingTypemodule:domain~DatumReadingType

the type of reading to find

tolerancestring<optional>

optional query tolerance to use

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

optional sort settings to use

paginationmodule:domain~Pagination<optional>

optional pagination settings to use

Returns:

the URL

Type: 
string

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

Generate a URL for querying for 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(nodeIdopt, sourceIdsopt) → {string}

Generate a URL for the "reportable interval" for a node, optionally limited to a specific set of source IDs.

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

Parameters:
NameTypeAttributesDescription
nodeIdnumber<optional>

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

sourceIdsArray.<string><optional>

an array of source IDs to limit query to; if not provided the sourceIds property of this class will be used

Returns:

the URL

Type: 
string

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

Generate a URL for querying for stream 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

streamReadingUrl(datumFilter, readingType, toleranceopt, sortsopt, paginationopt) → {string}

Generate a URL for querying for stream reading values.

The datumFilter must provide the required date(s) to use for the reading type. If the reading type only requires one date, then the module:domain~DatumFilter#startDate or module:domain~DatumFilter#endDate value should be provided.

Parameters:
NameTypeAttributesDescription
datumFiltermodule:domain~DatumFilter

the search criteria

readingTypemodule:domain~DatumReadingType

the type of reading to find

tolerancestring<optional>

optional query tolerance to use

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

optional sort settings to use

paginationmodule:domain~Pagination<optional>

optional pagination settings to use

Returns:

the URL

Type: 
string