Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

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
roomIDnumber  Required. ID of the room we want to poll
contactIDnumber  Required. If >0 then join this contact ID to the conversation (eg new member)
keystring  Required. A key associated with this contactID. The key is the value returned in the 'join' request and must match.
msgIDnumber  Required. Last message ID acknowledged. Only return messages with higher ID
maxRowsnumber  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.

Whitebeam release 1.3.36
(loadtime : 68ms)