mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Add documentation about questActivity and userActivity webhooks
This commit is contained in:
@@ -35,8 +35,8 @@ const api = {};
|
|||||||
* @apiParam (Body) {String} [label] A label to remind you what this webhook does
|
* @apiParam (Body) {String} [label] A label to remind you what this webhook does
|
||||||
* @apiParam (Body) {Boolean} [enabled=true] If the webhook should be enabled
|
* @apiParam (Body) {Boolean} [enabled=true] If the webhook should be enabled
|
||||||
* @apiParam (Body) {String="taskActivity","groupChatReceived",
|
* @apiParam (Body) {String="taskActivity","groupChatReceived",
|
||||||
"userActivity"} [type="taskActivity"] The webhook's type.
|
"userActivity","questActivity"} [type="taskActivity"] The webhook's type.
|
||||||
* @apiParam (Body) {Object} [options] The webhook's options. Wil differ depending on type.
|
* @apiParam (Body) {Object} [options] The webhook's options. Will differ depending on type.
|
||||||
* Required for `groupChatReceived` type.
|
* Required for `groupChatReceived` type.
|
||||||
* If a webhook supports options, the default values
|
* If a webhook supports options, the default values
|
||||||
* are displayed in the examples below
|
* are displayed in the examples below
|
||||||
@@ -63,6 +63,30 @@ const api = {};
|
|||||||
* "groupId": "required-uuid-of-group"
|
* "groupId": "required-uuid-of-group"
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
|
* @apiParamExample {json} User Activity Example
|
||||||
|
* {
|
||||||
|
* "enabled": true,
|
||||||
|
* "url": "http://some-webhook-url.com",
|
||||||
|
* "label": "My Activity Webhook",
|
||||||
|
* "type": "userActivity",
|
||||||
|
* "options": { // set at least one to true
|
||||||
|
* "petHatched": false, // default
|
||||||
|
* "mountRaised": false, // default
|
||||||
|
* "leveledUp": false, // default
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* @apiParamExample {json} Quest Activity Example
|
||||||
|
* {
|
||||||
|
* "enabled": true,
|
||||||
|
* "url": "http://some-webhook-url.com",
|
||||||
|
* "label": "My Quest Webhook",
|
||||||
|
* "type": "questActivity",
|
||||||
|
* "options": { // set at least one to true
|
||||||
|
* "questStarted": false, // default
|
||||||
|
* "questFinished": false, // default
|
||||||
|
* "questInvited": false, // default
|
||||||
|
* }
|
||||||
|
* }
|
||||||
* @apiParamExample {json} Minimal Example
|
* @apiParamExample {json} Minimal Example
|
||||||
* {
|
* {
|
||||||
* "url": "http://some-webhook-url.com"
|
* "url": "http://some-webhook-url.com"
|
||||||
@@ -131,8 +155,9 @@ api.getWebhook = {
|
|||||||
* @apiParam (Body) {String} [url] The webhook's URL
|
* @apiParam (Body) {String} [url] The webhook's URL
|
||||||
* @apiParam (Body) {String} [label] A label to remind you what this webhook does
|
* @apiParam (Body) {String} [label] A label to remind you what this webhook does
|
||||||
* @apiParam (Body) {Boolean} [enabled] If the webhook should be enabled
|
* @apiParam (Body) {Boolean} [enabled] If the webhook should be enabled
|
||||||
* @apiParam (Body) {String="taskActivity","groupChatReceived"} [type] The webhook's type.
|
* @apiParam (Body) {String="taskActivity","groupChatReceived",
|
||||||
* @apiParam (Body) {Object} [options] The webhook's options. Wil differ depending on type.
|
* "userActivity","questActivity"} [type] The webhook's type.
|
||||||
|
* @apiParam (Body) {Object} [options] The webhook's options. Will differ depending on type.
|
||||||
* The options are enumerated in the
|
* The options are enumerated in the
|
||||||
* [add webhook examples](#api-Webhook-UserAddWebhook).
|
* [add webhook examples](#api-Webhook-UserAddWebhook).
|
||||||
* @apiParamExample {json} Update Enabled and Type Properties
|
* @apiParamExample {json} Update Enabled and Type Properties
|
||||||
|
|||||||
Reference in New Issue
Block a user