Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webhook parser #90

Closed
jacobtomlinson opened this issue Jan 31, 2017 · 1 comment
Closed

Add webhook parser #90

jacobtomlinson opened this issue Jan 31, 2017 · 1 comment

Comments

@jacobtomlinson
Copy link
Member

It should be possible to trigger skills via a webhook. This could be implemented as a matcher and parser to allow users to directly decorate their skills to be called by a webhook.

To implement the RESTful API Flask could be incorporated into opsdroid and run at startup.

An example skill could look like

Skill

from opsdroid.matchers import match_webhook

@match_webhook("mywebhook", "POST")
async def webhook_skill(opsdroid, config, message):
  pass

Config

skills:
  - name: webhookskill

This skill could then be triggered with a POST request to http://host:port/skill/webhookskill/mywebhook.

Responding to the message could return the body to the webhook caller and the message passed into the skill could have a property of data which contains the POST or GET data if there is any.

@jacobtomlinson
Copy link
Member Author

Closed by #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant