Comment on page
Get Pinned Messages
Retrieve pinned messages from a room. It supports only the offset and count parameter for Pagination.
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/chat.getPinnedMessages | yes | GET |
Argument | Example | Required | Description |
---|---|---|---|
roomId | ByehQjC44FwMeiLbX | Required | The room id |
offset | 0 | Optional | |
count | 1 | Optional |
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/chat.getPinnedMessages?roomId=ByehQjC44FwMeiLbX
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/chat.getPinnedMessages?roomId=ByehQjC44FwMeiLbX&count=2&offset=0
{
"messages": [
{
"_id": "Srhca3mgthgjkEisJ",
"rid": "ByehQjC44FwMeiLbX",
"msg": "I pinned this message",
"ts": "2019-03-23T00:53:24.388Z",
"u": {
"_id": "aobEdbYhXfu5hkeqG",
"username": "user",
"name": "User"
},
"mentions": [],
"channels": [],
"_updatedAt": "2019-03-23T00:53:28.813Z",
"pinned": true,
"pinnedAt": "2019-03-23T00:53:28.813Z",
"pinnedBy": {
"_id": "aobEdbYhXfu5hkeqG",
"username": "user"
}
},
{
"_id": "m3AZcKrvayKEZSKJN",
"rid": "GENERAL",
"msg": "Ola",
"ts": "2019-03-23T00:53:50.974Z",
"u": {
"_id": "aobEdbYhXfu5hkeqG",
"username": "user",
"name": "user"
},
"mentions": [],
"channels": [],
"_updatedAt": "2019-03-23T00:53:53.649Z",
"pinned": true,
"pinnedAt": "2019-03-23T00:53:53.649Z",
"pinnedBy": {
"_id": "aobEdbYhXfu5hkeqG",
"username": "user"
}
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}
Version | Description |
---|---|
2.0.0 | Added |
Last modified 5mo ago