Open
Description
Currently one can update a widget either using a job or HTTP POST to /widgets/:id
.
We could also allow settings hooks for easier integration with external services.
Example usage with GitHub webhooks:
# File: hooks/github.exs
hook :github_issues do
issue = body |> Poison.decode!
# Other, heavier processing can be added here
broadcast! :github_issues,
%{user: issue |> get_in(["sender", "login"]),
title: issue |> get_in(["issue", "title"])}
end
Kitto with the above hook definition would pass the request context and handling of POST /hooks/github_issues
to the code in the hook.