-
Notifications
You must be signed in to change notification settings - Fork 31
Example HTTP API Messages
Mike Angstadt edited this page Aug 2, 2017
·
14 revisions
Method: POST
URI: /chats/ROOM_ID/events
Parameters:
| Name | Value |
|---|---|
| mode | Always set to "messages" (without quotes) |
| msgCount | The number of messages to retrieve. |
| fkey | The fkey |
Response example
{
"events" : [
{
"event_type" : 1,
"time_stamp" : 1501615302,
"content" : "<b>hello</b> world",
"user_id" : 1064310,
"user_name" : "Tristan Wiley",
"room_id" : 1,
"message_id" : 38442657,
"message_stars" : 1
},
{
"event_type" : 1,
"time_stamp" : 1501636568,
"content" : "two",
"user_id" : 13379,
"user_name" : "Michael",
"room_id" : 1,
"message_id" : 38446507,
"message_edits" : 1
},
{
"event_type" : 1,
"time_stamp" : 1501636756,
"content" : "three",
"user_id" : 13379,
"user_name" : "Michael",
"room_id" : 1,
"message_id" : 38446514
}
],
"time" : 77918739,
"sync" : 1501636602,
"ms" : 0
}Notes
- Events are sorted by timestamp.
- The "message_edits" field is only present if the message has been edited.
- The "message_stars" field is only present if the message has been starred.