FetchRequest

@maynoothuniversity/caching-json-databridge~ FetchRequest

A class representing a request to fetch data from a datasource.

Constructor

Fcnew FetchRequest(bridge, source, fetchOptions, fetcherPath, fetcherParams, timestamp)

Parameters:
Name Type Description
bridge Databridge

a reference to the databridge the request was submitted to.

source Datasource

the datasource the request was submitted on.

fetchOptions Object

the options passed to the databridge when initiating the request.

fetcherPath Array.<DatabridgeName>

the path to the fetcher function within the datasource. Should be an empty array for datasources with just one data fetcher.

fetcherParams Array

the parameters for the fetcher function.

timestamp ISO8601

the time the request was submitted to the databridge at as an ISO8601 string.

Throws:

a validation error is thrown if parameter validation fails.

Type
external:validateParams.ValidationError

Members

Vbridge

An alias for .databridge().

See:
  • {FetchRequest#databridge}

Voptions

An alias for .fetchOptions().

See:
  • {FetchRequest#fetchOptions}

Vparams

An alias for .fetcherParams().

See:
  • {FetchRequest#fetcherParams}

Vpath

An alias for .fetcherPath().

See:
  • {FetchRequest#fetcherPath}

Vsource

An alias for .datasource().

See:
  • {FetchRequest#datasource}

Methods

Fdatabridge() → {Databridge}

A read-only accessor for a reference to the databridge the request was submitted to.

Returns:
Type:
Databridge

Fdatasource() → {Datasource}

A read-only accessor for a reference to the datasource the request was submitted to.

Returns:
Type:
Datasource

FfetcherParams() → {Array}

A read-only accessor for a reference to the parameters passed to the data fetcher callback.

Returns:
Type:
Array

FfetcherPath() → {Array}

A read-only accessor for a reference to the data fethcher path within the datasource for use within this request.

Returns:
Type:
Array

FfetchOptions() → {Object}

A read-only accessor for a reference to the options passed to the databridge's fetch function.

Returns:
Type:
Object

Ftimestamp() → {ISO8601}

A read-only accessor for the time the request was made at as an ISO8601 string.

Returns:
Type:
ISO8601