set_pushover_app() sets the Pushover application token to be used in subsequent commands, get_pushover_app() gets the application token that is currently set, and unset_pushover_app() unsets the token.

set_pushover_app(token = NULL, ask = is_interactive())

get_pushover_app(ask = is_interactive())

unset_pushover_app()

Arguments

token

The application token to be used. If none is provided, a prompt will request the token (interactive sessions only).

ask

Whether or not to ask for the token if none is provided. Note that this option only works in interactive sessions.

Value

get_pushover_app() returns a string containing the current application token. If the token is not set but ask is TRUE, the user will be prompted for a token.

Details

set_pushover_app() only sets the Pushover app token for the current session. If a different value is specified in .Renviron, that value will be used in future sessions. Similarly, unset_pushover_app() will only unset the app token for the current session.

To receive an application token, register a new application after logging in to your account at https://pushover.net/apps.

Examples

if (FALSE) {
set_pushover_app(token = "azGDORePK8gMaC0QOYAMyEEuzJnyUi")
}