praqma API
toggl-bot public
0
Node
JavaScript
Python beta
Ruby beta
Shell
curl
Hey! Want to build awesome, scalable APIs like this one?
Sign up with Standard Library today and build your own API or connect to others in seconds.
We hope you enjoy documentation for the praqma toggl-bot API on Standard Library! This API can be used via the command line (shell), Node, Ruby, Python or as a generic HTTP call in any language. Check the code examples on the right associated with each API method for how to use this API in your language of choice.
API Description
Scripts querying Toggl and applying certain rules on Praqma's workspace
The "Add to Slack" landing page for your app. To modify the template, check out /pages/index.ejs.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Slack Actions (Interactive Messages) Response Handler This function receives actions (interactive messages) from Slack and dispatches the appropriate handler. You should use this function as the endpoint for all actions, and place action handlers in /functions/actions/NAME.js, where NAME is the name of your action. You can test from the command line using: lib .actions.NAME [username] [channel name] For more about interactive messages and how to respond to them, see Slack's documentation: https://api.slack.com/docs/message-buttons
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
example.js Basic example action handler. Called in response to an input from an interactive message. All Actions in response to interactive messages use this template, simply create additional files with different names to add actions. See https://api.slack.com/docs/message-buttons for more details.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
user
required
string
The user id of the user that invoked this command (name is usable as well)
current value set to
enter a test value
channel
required
string
The channel id the command was executed in (name is usable as well)
current value set to
enter a test value
action
object
The full Slack action object
optional, default value is
{}
optional, current value set to
enter a test value
botToken
string
The bot token for the Slack bot you have activated
optional, default value is
null
optional, current value set to
enter a test value
Authorization HTML page to grant Slack App OAuth Permission To modify the template, check out /pages/auth.ejs.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
code
string
Slack-provided authorization code
optional, default value is
null
optional, current value set to
enter a test value
error
string
Slack-provided error
optional, default value is
""
optional, current value set to
enter a test value
Slack Slash Command Handler: This function receives slash commands from Slack and dispatches the appropriate handler. You should use this function as the endpoint for all commands, and place commands in /functions/commands/NAME.js, where NAME is the name of your command. You can test individual slash commands from the command line with: $ lib .commands.NAME [username] [channel] [text]
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
/hello Basic "Hello World" command. All Commands use this template, simply create additional files with different names to add commands. See https://api.slack.com/slash-commands for more details.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
user
required
string
The user id of the user that invoked this command (name is usable as well)
current value set to
enter a test value
channel
required
string
The channel id the command was executed in (name is usable as well)
current value set to
enter a test value
text
string
The text contents of the command
optional, default value is
""
optional, current value set to
enter a test value
command
object
The full Slack command object
optional, default value is
{}
optional, current value set to
enter a test value
botToken
string
The bot token for the Slack bot you have activated
optional, default value is
null
optional, current value set to
enter a test value
/invoices See https://api.slack.com/slash-commands for more details.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
user
required
string
The user id of the user that invoked this command (name is usable as well)
current value set to
enter a test value
channel
required
string
The channel id the command was executed in (name is usable as well)
current value set to
enter a test value
text
string
The text contents of the command
optional, default value is
""
optional, current value set to
enter a test value
command
object
The full Slack command object
optional, default value is
{}
optional, current value set to
enter a test value
botToken
string
The bot token for the Slack bot you have activated
optional, default value is
null
optional, current value set to
enter a test value
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
channel
string
(no description)
optional, default value is
""
optional, current value set to
enter a test value
isEveningReminder
boolean
(no description)
optional, default value is
false
optional, current value set to
enter a test value
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Slack Event Handler: This function receives events from Slack and dispatches the appropriate handler. If an event has no subtype, it will invoke /functions/events/TYPE.js or /functions/events/TYPE/__main__.js, otherwise it will invoke /functions/events/TYPE/SUBTYPE.js. You can test individual events from the command line with: $ lib .events.TYPE.SUBTYPE [username] [channel] [text] The "@bg params" line below tells StdLib that when this function is invoked as a background function over HTTP it should just respond with whatever parameters were passed in as a JSON object. (This handles Slack's "challenge" parameter.)
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
message event All events use this template, simply create additional files with different names to add event responses See https://api.slack.com/events-api for more details.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
user
required
string
The user id of the user that invoked this event (name is usable as well)
current value set to
enter a test value
channel
required
string
The channel id the event was executed in (name is usable as well)
current value set to
enter a test value
text
string
The text contents of the event
optional, default value is
""
optional, current value set to
enter a test value
event
object
The full Slack event object
optional, default value is
{}
optional, current value set to
enter a test value
botToken
string
The bot token for the Slack bot you have activated
optional, default value is
null
optional, current value set to
enter a test value
channel_join event See https://api.slack.com/events-api for more details.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
user
required
string
The user id of the user that invoked this event (name is usable as well)
current value set to
enter a test value
channel
required
string
The channel id the event was executed in (name is usable as well)
current value set to
enter a test value
text
string
The text contents of the event
optional, default value is
""
optional, current value set to
enter a test value
event
object
The full Slack event object
optional, default value is
{}
optional, current value set to
enter a test value
botToken
string
The bot token for the Slack bot you have activated
optional, default value is
null
optional, current value set to
enter a test value
/invoices See https://api.slack.com/slash-commands for more details.
Authenticated   |   Pricing  ·  Free   |   Limit  ·  no rate limit
Unauthenticated   |   Limit  ·  no rate limit
Parameters
token
required
string
(no description)
current value set to
enter a test value
text
string
(no description)
optional, default value is
""
optional, current value set to
enter a test value
response_url
required
string
(no description)
current value set to
enter a test value
Made with by the praqma team with the help of Standard Library.