Private
_apiPrivate
_appStatic
prefixedThe express application used by webhook. You can use it to add unencapsulated custom operations
Rest
...args: any[]Optional
context: anyOptional
fn: ((...args) => void)Rest
...args: any[]Optional
context: anyOptional
once: booleanIt is triggered when discourse sends an webhook event.
Example
api.webhook.on("post", (post, res) => {
console.log(post.raw);
res.json({"text": "200 ok"});
})
Specially, the "default"
event will be triggered when the incoming event is not registered in any on
function.
And the "all"
event will be triggered in every webhook event.
Add a one-time listener for a given event.
Rest
...args: any[]Optional
context: anyRemove all listeners, or those of the specified event.
Optional
event: string | symbolRemove the listeners of a given event.
Optional
fn: ((...args) => void)Rest
...args: any[]Optional
context: anyOptional
once: booleanGenerated using TypeDoc
A simple receiver that receives webhooks sent from discourse