bc3cb package

Submodules

bc3cb.core module

The nuts and bolts of bc3cb

bc3cb.core.commandworker(request)

Called by the Flask app when a command comes in. Glues together the behavior of bc3cb.

Parameters:request – The blob of json that Basecamp POSTS to the webapp, parsed into a dictionary
bc3cb.core.executeuserfunction(func, commandline, post_json_blob)

Runs the bot user’s specified command if it exists

bc3cb.creatorprivate module

bc3cb.log module

bc3cb.receiver module

bc3cb.respond module

This is in a separate file so that bot creators can call the respond function

bc3cb.respond.respond(response, callback_url)

POSTs our response back to Basecamp.

Parameters:
  • response – The message that we should POST. Format it in Basecamp’s version of html as described in the chatbot docs.
  • callback_url – The URL where we should POST

bc3cb.usercommands module

Bot Creator-defined commands. See docs/usercommands/usercommands.py for more.

bc3cb.usercommands.handle_errors()

TODO: Allow the user to handle their own defined errors

bc3cb.usercommands.ping(commandline, commandinfo)

Usage: !bot ping Returns ‘pong’.

bc3cb.usercommands.testcommand(commandline, commandinfo)

Usage: !bot testcommand some stuff

A command used for testing. Returns some of the info you send, formatted as a string

Module contents

A chatbot base that makes it super easy to interface with Basecamp Campfires