Fuselage
Get Pinned Messages
Retrieve pinned messages from a room. It supports ONLY the Offset and Count Query Parameters
URL
Requires Auth
HTTP Method
/api/v1/chat.getPinnedMessages
yes
GET

Query Parameters

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required
The room id
offset
0
Optional
count
1
Optional

Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/chat.getPinnedMessages?roomId=ByehQjC44FwMeiLbX
Copied!
1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/chat.getPinnedMessages?roomId=ByehQjC44FwMeiLbX&count=2&offset=0
Copied!

Example Result

1
{
2
"messages": [
3
{
4
"_id": "Srhca3mgthgjkEisJ",
5
"rid": "ByehQjC44FwMeiLbX",
6
"msg": "I pinned this message",
7
"ts": "2019-03-23T00:53:24.388Z",
8
"u": {
9
"_id": "aobEdbYhXfu5hkeqG",
10
"username": "user",
11
"name": "User"
12
},
13
"mentions": [],
14
"channels": [],
15
"_updatedAt": "2019-03-23T00:53:28.813Z",
16
"pinned": true,
17
"pinnedAt": "2019-03-23T00:53:28.813Z",
18
"pinnedBy": {
19
"_id": "aobEdbYhXfu5hkeqG",
20
"username": "user"
21
}
22
},
23
{
24
"_id": "m3AZcKrvayKEZSKJN",
25
"rid": "GENERAL",
26
"msg": "Ola",
27
"ts": "2019-03-23T00:53:50.974Z",
28
"u": {
29
"_id": "aobEdbYhXfu5hkeqG",
30
"username": "user",
31
"name": "user"
32
},
33
"mentions": [],
34
"channels": [],
35
"_updatedAt": "2019-03-23T00:53:53.649Z",
36
"pinned": true,
37
"pinnedAt": "2019-03-23T00:53:53.649Z",
38
"pinnedBy": {
39
"_id": "aobEdbYhXfu5hkeqG",
40
"username": "user"
41
}
42
}
43
],
44
"count": 2,
45
"offset": 0,
46
"total": 2,
47
"success": true
48
}
Copied!

Change Log

Version
Description
2.0.0
Added
Export as PDF
Copy link
Edit on GitHub