HabitRPG/habitrpg — pull request #4185 by lefnire (2014-10-25 20:49:47+00:00)
Title: Webhooks

## Don't merge!
Add webhooks to `user.preferences` (API settings) so we can POST to external services (eg, Beeminder). Initial proof-of-concept, will need lots of attention before it's ready - just wanted to see if we all like the general setup (@Alys, @dreeves, etc).

One big question, do we only care about sending push notifs for task-scoring operations? That's the most obvious place, and if it's the *only* place then that makes life much simpler. If we want it for other things, we'll have to introduce some middleware at the end of requests and possibly just send along the request object. However, there are often cases where the result of the operation is important too (eg, here the `delta` variable is important) - so that might not work, and we'd instead have to tie into each pertinent route individually. 'Course, we could just start with task-scoring and work from there