Skip to content

Commit b62c300

Browse files
Marcos Spessatto Defendisampaiodiego
authored andcommitted
Docs for starred messages endpoint (RocketChat#1442)
* Docs for starred messages endpoint * fix lint
1 parent f96caf8 commit b62c300

File tree

5 files changed

+63
-0
lines changed

5 files changed

+63
-0
lines changed

_data/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@
314314
- getMessage
315315
- getMessageReadReceipts
316316
- getPinnedMessages
317+
- getStarredMessages
317318
- getThreadMessages
318319
- getThreadsList
319320
- pinMessage

contributing/documentation/documentation-map/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ Here you can also find what articles are incomplete and missing.
309309
- getMessage
310310
- getMessageReadReceipts
311311
- getPinnedMessages
312+
- getStarredMessages
312313
- getThreadMessages
313314
- getThreadsList
314315
- pinMessage

developer-guides/rest-api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
169169
| `/api/v1/chat.getMessage` | Retrieves a single chat message. | [Link](chat/getmessage/) |
170170
| `/api/v1/chat.getMessageReadReceipts` | Retrieves message read receipts. | [Link](chat/getmessagereadreceipts/) |
171171
| `/api/v1/chat.getPinnedMessages` | Retrieve pinned messages from a room. | [Link](chat/getpinnedmessages/) |
172+
| `/api/v1/chat.getStarredMessages` | Retrieves starred messages. | [Link](chat/getstarredmessages/) |
172173
| `/api/v1/chat.getThreadMessages` | Retrieves thread's messages. | [Link](chat/getthreadmessages/) |
173174
| `/api/v1/chat.getThreadsList` | Retrieves channel's threads. | [Link](chat/getthreadslist/) |
174175
| `/api/v1/chat.ignoreUser` | Ignores an user from a chat. | [Link](chat/ignoreuser/) |

developer-guides/rest-api/chat/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
| `/api/v1/chat.getMessage` | Retrieves a single chat message. | [Link](getmessage/) |
1010
| `/api/v1/chat.getMessageReadReceipts` | Retrieves message read receipts. | [Link](getmessagereadreceipts/) |
1111
| `/api/v1/chat.getPinnedMessages` | Retrieve pinned messages from a room. | [Link](getpinnedmessages/) |
12+
| `/api/v1/chat.getStarredMessages` | Retrieves the starred messages. | [Link](getstarredmessages/) |
1213
| `/api/v1/chat.getThreadMessages`| Retrieves thread's messages. | [Link](getthreadmessages/) |
1314
| `/api/v1/chat.getThreadsList` | Retrieves channel's threads. | [Link](getthreadslist/) |
1415
| `/api/v1/chat.ignoreUser` | Ignores an user from a chat. | [Link](ignoreuser/) |
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Get Starred Messages
2+
3+
Retrieve starred messages. It supports the [Offset, Count, and Sort Query Parameters](../../offset-and-count-and-sort-info/).
4+
5+
| URL | Requires Auth | HTTP Method |
6+
| :--- | :--- | :--- |
7+
| `/api/v1/chat.getStarredMessages` | `yes` | `GET` |
8+
9+
## Query Parameters
10+
11+
| Argument | Example | Required | Description |
12+
| :--- | :--- | :--- | :--- |
13+
| `roomId` | `ByehQjC44FwMeiLbX` | Required | The room id |
14+
15+
## Example Call
16+
17+
```bash
18+
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
19+
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
20+
http://localhost:3000/api/v1/chat.getStarredMessages?roomId=ByehQjC44FwMeiLbX
21+
```
22+
23+
## Example Result
24+
25+
```json
26+
{
27+
"messages": [
28+
{
29+
"_id": "ePeoiJQ3Qfc4556TW",
30+
"rid": "GENERAL",
31+
"msg": "fsdfs",
32+
"ts": "2019-10-09T19:17:21.883Z",
33+
"u": {
34+
"_id": "rocketchat.internal.admin.test",
35+
"username": "rocketchat.internal.admin.test",
36+
"name": "RocketChat Internal Admin Test"
37+
},
38+
"_updatedAt": "2019-10-09T19:17:25.196Z",
39+
"mentions": [],
40+
"channels": [],
41+
"starred": [
42+
{
43+
"_id": "rocketchat.internal.admin.test"
44+
}
45+
]
46+
}
47+
],
48+
"count": 2,
49+
"offset": 0,
50+
"total": 2,
51+
"success": true
52+
}
53+
```
54+
55+
## Change Log
56+
57+
| Version | Description |
58+
| :---- | :---- |
59+
| 2.2.0 | Added |

0 commit comments

Comments
 (0)