Hey! Want to build awesome, scalable APIs like this one? Sign up with StdLib today and build
your own API or connect to others in seconds.
We hope you enjoy documentation for the
API on StdLib!
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.
Scripts querying Toggl and applying certain rules on Praqma's workspace
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
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.
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]
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.)