This is an old revision of the document!
Date: 5 Jun 2001
Available: 11 Jun 2001
Status: Draft
Revision: 0
Compliant to AOS API Version: AOS 2.0b1
Web: http://www.afteroffice.com/dev/api/chat.html
By fui@afteroffice.com
Description
Retrieve topics in chat room, get posted messages and post message into chat room topic.
Index
1. topic.chat.mms - Obtain topic list
2. view.chat.mms - Obtain messages raw data
3. cpost.chat.mms - Post message into a topic
Command: [SID].topic.chat.mms
Use: Obtain topic list
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID
Result:
Multiple-lines records, each line is the name of a topic in chat room
Parameters:
API = only 1 argument accepted: “LC”
URL Sample:
http://afteroffice.com/SIDxxx.topic.chat.mms?api=lc
Command: [SID].view.chat.mms
Use: Obtain messages raw data
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID
Parameters:
Key | Mandatory | Description |
---|---|---|
api | Yes | Indicate the http query is for API, only 1 argument accepted: “LC” |
l | No | Number of messages to retrieve from the topic |
t | Yes | The topic name |
Result:
Multiple-lines records, with Tab as fields separator.
Record structure:
Field No. | Type | Description |
---|---|---|
1 | Integer | Message posted time stamp |
2 | DataStruct | User information data structure |
3 | String | Message |
User information data structure
User data is at field 2 of the chat message record, using DEL (ASC 8) as field separator.
Field No. | Type | Description |
---|---|---|
1 | String | User name |
2 | String | User host |
3 | String | User full name |
4 | String | User color |
5 | String | User icon (face) |
URL Sample:
http://afteroffice.com/SIDxxx.view.chat.mms?api=lc&t=Lobby
Command: [SID].cpost.chat.mms
Use: Post message into topic.
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID
Result: boolean
Parameters:
Key | Mandatory | Description |
---|---|---|
api | Yes | Indicate the http query is for API, only 1 argument accepted: “LC” |
t | Yes | The topic to post the message into |
txt | Yes | |
f | No | Message font size N, deploy on <font size=N> |
s1 | No | Message style (1). “B” for bold, “I” for italic |
s2 | No | Message style (2). “B” for bold, “I” for italic |
URL Sample:
http://afteroffice.com/SIDxxx.cpost.chat.mms?api=lc&t=Lobby&txt=Hi%20there%21