Skip to content

Scripting API / dashboard/retrievals/RetrievalApi

dashboard/retrievals/RetrievalApi

Modules

Module Description
External -

Classes

RetrievalApi

Methods

alsoRetrieveWhenRefreshed()

alsoRetrieveWhenRefreshed(settings): Promise<AlsoRetrieveApi>

Allows fetching additional data when this retrieval is refreshed without requiring a chart.

Parameters
Parameter Type Description
settings ChartWorkerRetrievalSettings[] A list of Retrieval Settings
Returns

Promise<AlsoRetrieveApi>

A list retrieval API. Bind to onRetrieved in order to use the fetched data.

getProperties()

getProperties(): Promise<RetrievalWorkerGet>

Gets the retrieval's properties

Returns

Promise<RetrievalWorkerGet>

onBeforeRetrieval()

onBeforeRetrieval(fn): ScriptEventSubscription

Bind a function to fire before a retrieval fetches data. preventDefault can be called on the event to prevent the retrieval from fetching data.

Parameters
Parameter Type Description
fn (event) => void The function to fire.
Returns

ScriptEventSubscription

ScriptEventSubscription

refresh()

refresh(): Promise<void>

Refreshes the entire retrieval.

Returns

Promise<void>

updateProperties()

updateProperties(newProps): Promise<void>

Updates the retrieval with new values.

Parameters
Parameter Type Description
newProps RetrievalWorkerUpdate Object with new properties to use
Returns

Promise<void>