How to add a New EventΒΆ

  1. Add a new module in the src/slackly/events/ directory. Follow the below template:

    class AccountsChanged(BaseEvent):
            .. code-block:: json
                :caption: Example json response
                    "type": "accounts_changed"
        For more information see
        def schema(self):
            return {
                'type': types.String,
  2. Be sure of the following details:

    1. The event should be “registered” under the string found in event[‘type’] key
    2. The class subclasses from
    3. The class includes a rst json code-block with an example event json blob
    4. Although it is not 100% necessary, please include a schema property as shown
  3. Add an import in src/slackly/events/

    from .accounts_changed import AccountsChanged
  4. Add an example json file in tests/data/events/[YOUR EVENT]/example.json, where [YOUR EVENT] is the string you registered

  5. Run the test suite