|
Whitebeam Template Reference Documentation
|
Chat Template
poll()
Return poll data
Syntax
string = rb.chat.poll(roomID, contactID, key, msgID, maxRows)
Parameters
The 'poll' method takes 5 parameters:
Name | Type/Value | Range/Length | Description | roomID | number | | Required. ID of the room we want to poll | contactID | number | | Required. If >0 then join this contact ID to the conversation (eg new member) | key | string | | Required. A key associated with this contactID. The key is the value returned in the 'join' request and must match. | msgID | number | | Required. Last message ID acknowledged. Only return messages with higher ID | maxRows | number | | Required. The maximum number of rows to return. Values greater than the chat room maxCache are capped. The default is maxCache rows |
Results
The 'poll' method returns string:
Type/Value | Range/Length | Description |
string |
  |
Return recent conversation data
|
Remarks This request polls for recent changes to the conversation. This method is intended to be
fast and to be called frequently. The method returns both recent messages *and*
a list of people that are part of this conversation. The data is returned as a JavaScript string representation ready to be passed to 'eval'.
Data is returned in this format so that it can be transferred directly to the browser
where it can be decoded there rather than on the server. |
|
(loadtime : 160ms) |