getChatMessages
Description
Gets a list of chat messages
Example request
https://www.rundowncreator.com/channel4news/API.php ?APIKey=edharken &APIToken=HNe2ADG0nBTiC8Q8WiVfsxeG5ip51A &Action=getChatMessages
Example response
[ { "ChatMessageID": 1, "To": { "UserID": 2, "Username": "ronburgundy", "FirstName": "Ron", "LastName": "Burgundy" }, "From": { "UserID": 1, "Username": "edharken", "FirstName": "Ed", "LastName": "Harken" }, "Message": "@ronburgundy Ron, are you in the building?" }, { "ChatMessageID": 2, "To": { "UserID": 0, "Username": "", "FirstName": "", "LastName": "" }, "From": { "UserID": 1, "Username": "edharken", "FirstName": "Ed", "LastName": "Harken" }, "Message": "Has anyone seen Ron today?" } ]
Required parameters
None
Optional parameters
LastChatMessageID | integer | if set, only chat messages sent after the chat message with the ChatMessageID specified will be returned |
GetTimestamps | boolean | if set to true, the date/time that the chat message was sent will be included in the response returned in the DateCreated field. If set to false, it will not. Defaults to false |
Descending | boolean | if set to true, the results in the response returned will be sorted in descending order. Defaults to false |
Returns
ChatMessageID | integer | the chat message's unique ID |
DateCreated | integer | the date/time that the chat message was sent. Only returned if GetTimestamps is set to true |
To.UserID | integer | the unique ID of the user the chat message was sent to. 0 if it was sent to everyone |
To.Username | string | the username of the user the chat message was sent to. Blank if it was sent to everyone |
To.FirstName | string | the first name of the user the chat message was sent to. Blank if it was sent to everyone |
To.LastName | string | the last name of the user the chat message was sent to. Blank if it was sent to everyone |
From.UserID | integer | the unique ID of the user who sent the chat message |
From.Username | string | the username of the user who sent the chat message |
From.FirstName | string | the first name of the user who sent the chat message |
From.LastName | string | the last name of the user who sent the chat message |
Message | string | the chat message |