From 9daf968674782a7e4c9d87ddf0a11b392548654d Mon Sep 17 00:00:00 2001 From: Marcos Defendi Date: Mon, 16 Apr 2018 10:24:09 -0300 Subject: [PATCH 1/2] Fix docs about chat.react endpoint, add parameter to endpoint --- developer-guides/rest-api/chat/react/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/developer-guides/rest-api/chat/react/README.md b/developer-guides/rest-api/chat/react/README.md index b520aface7..b6dcc7c822 100644 --- a/developer-guides/rest-api/chat/react/README.md +++ b/developer-guides/rest-api/chat/react/README.md @@ -12,6 +12,7 @@ Toggles the authenciated user's reaction to the provided message. | :--- | :--- | :--- | :--- | | `emoji` | `smile` | Required | The emoji to react with. | | `messageId` | `7aDSXtjMA3KPLxLjt` | Required | The message id to react to. | +| `shouldReact` | `7aDSXtjMA3KPLxLjt` | Optional: `true` or `false` | Parameter to make endpoint work like a toggle. | The `emoji` does not have to contain the `:`'s. However, the emoji *does* have to exist. @@ -22,7 +23,7 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ -H "X-User-Id: aobEdbYhXfu5hkeqG" \ -H "Content-type:application/json" \ http://localhost:3000/api/v1/chat.react \ - -d '{ "messageId": "7aDSXtjMA3KPLxLjt", "emoji": "smile" }' + -d '{ "messageId": "7aDSXtjMA3KPLxLjt", "emoji": "smile", "shouldReact": true }' ``` ## Example Result @@ -37,5 +38,6 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | Version | Description | | :--- | :--- | +| 0.64.0 | Added parameter "shouldReact" to make endpoint work like a toggle | | 0.63.0 | Emoji has to exist now | | 0.62.2 | Added | From fb435617ac18815d33d06ceefcbe852bb6115eb0 Mon Sep 17 00:00:00 2001 From: Marcos Defendi Date: Tue, 17 Apr 2018 15:52:55 -0300 Subject: [PATCH 2/2] Fix the explanation about chat.react ednpoint --- developer-guides/rest-api/chat/react/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer-guides/rest-api/chat/react/README.md b/developer-guides/rest-api/chat/react/README.md index b6dcc7c822..6b1a42a31f 100644 --- a/developer-guides/rest-api/chat/react/README.md +++ b/developer-guides/rest-api/chat/react/README.md @@ -12,7 +12,7 @@ Toggles the authenciated user's reaction to the provided message. | :--- | :--- | :--- | :--- | | `emoji` | `smile` | Required | The emoji to react with. | | `messageId` | `7aDSXtjMA3KPLxLjt` | Required | The message id to react to. | -| `shouldReact` | `7aDSXtjMA3KPLxLjt` | Optional: `true` or `false` | Parameter to make endpoint work like a toggle. | +| `shouldReact` | `7aDSXtjMA3KPLxLjt` | Optional: `true` or `false` | Parameter to specify if the reaction should be added or removed. | The `emoji` does not have to contain the `:`'s. However, the emoji *does* have to exist. @@ -38,6 +38,6 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | Version | Description | | :--- | :--- | -| 0.64.0 | Added parameter "shouldReact" to make endpoint work like a toggle | +| 0.64.0 | Added parameter "shouldReact" to make endpoint work like a setter | | 0.63.0 | Emoji has to exist now | | 0.62.2 | Added |