This shows you the differences between two versions of the page.
dev:api:chat [2014/05/27 17:42] vikki created |
dev:api:chat [2015/01/16 15:24] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== AOS Chat API commands - RFC ===== | ||
- | Date: 5 Jun 2001\\ | ||
- | Available: 11 Jun 2001\\ | ||
- | Status: Draft\\ | ||
- | Revision: 0\\ | ||
- | Compliant to AOS API Version: AOS 2.0b1\\ | ||
- | Web: http:// | ||
- | By fui@afteroffice.com | ||
- | |||
- | -------------------------------------------------------------------------- | ||
- | |||
- | **Description**\\ | ||
- | Retrieve topics in chat room, get posted messages and post message into chat room topic.\\ | ||
- | |||
- | **Index**\\ | ||
- | 1. [[dev: | ||
- | 2. [[dev: | ||
- | 3. [[dev: | ||
- | |||
- | -------------------------------------------------------------------------- | ||
- | |||
- | ==== topic.chat.mms ==== | ||
- | **Command: | ||
- | 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: " | ||
- | **URL Sample:**\\ | ||
- | http:// | ||
- | |||
- | -------------------------------------------------------------------------- | ||
- | |||
- | ==== view.chat.mms ==== | ||
- | **Command: | ||
- | 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: " | ||
- | |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:// | ||
- | |||
- | -------------------------------------------------------------------------- | ||
- | |||
- | ==== cphost.chat.mms ==== | ||
- | **Command: | ||
- | 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: " | ||
- | |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> | ||
- | |s1 |No |Message style (1). " | ||
- | |s2 |No |Message style (2). " | ||
- | |||
- | **URL Sample:**\\ | ||
- | http:// |