Developer Reference / AOS API Document / Chat
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 | Sample |
---|---|---|---|
api | Yes | Indicate the http query is for API, only 1 argument accepted: “LC” | lc |
l | No | Number of messages to retrieve from the topic | 10 |
t | Yes | The topic name | Lobby |
Result:
Multiple-lines records, with Tab as fields separator.
Record structure:
Field No. | Type | Description | Sample |
---|---|---|---|
1 | Integer | Message posted time stamp | 99055055 |
2 | DataStruct | User information data structure | |
3 | String | Message | Hi there! |
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 | Sample |
---|---|---|---|
1 | String | User name | john |
2 | String | User host | acme.com |
3 | String | User full name | KC John |
4 | String | User color | blue |
5 | String | User icon (face) | FirstAid.gif |
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 | Sample |
---|---|---|---|
api | Yes | Indicate the http query is for API, only 1 argument accepted: “LC” | lc |
t | Yes | The topic to post the message into | Lobby |
txt | Yes | The message | Hi there! |
f | No | Message font size N, deploy on <font size=N> | +1 |
s1 | No | Message style (1). “B” for bold, “I” for italic | B |
s2 | No | Message style (2). “B” for bold, “I” for italic | I |
URL Sample:
http://afteroffice.com/SIDxxx.cpost.chat.mms?api=lc&t=Lobby&txt=Hi%20there%21