The ctx object
The ctx
object provides some useful functions and variables for developing your monitor.
Available methods are the following:
Name | Description |
---|---|
getToken | Get an access token |
refreshToken | Refresh access token and return it |
askForAuthorization | Ask the user to authenticate again |
setTable | Set table data |
setScoreboard | Set scoreboard data |
showMessage | Show message to the user |
The available variables are the following:
Name | Description |
---|---|
params | Parameters entered by the user, which were defined by the developer |
monitorID | Monitor ID |
instanceID | Instance ID |
messages.RECHECK_PARAMETERS | "Please recheck your parameters." |
messages.RETRY | "Something wrong happened, please try again." |
messages.NODATA | "Still working on your data..." |