Skip to main content

The ctx object

The ctx object provides some useful functions and variables for developing your monitor.

Available methods are the following:

getTokenGet an access token
refreshTokenRefresh access token and return it
askForAuthorizationAsk the user to authenticate again
setTableSet table data
setScoreboardSet scoreboard data
showMessageShow message to the user

The available variables are the following:

paramsParameters entered by the user, which were defined by the developer
monitorIDMonitor ID
instanceIDInstance ID
messages.RECHECK_PARAMETERS"Please recheck your parameters."
messages.RETRY"Something wrong happened, please try again."
messages.NODATA"Still working on your data..."