This shows you the differences between two versions of the page.
dev:api:im [2014/05/27 18:13] vikki |
dev:api:im [2015/01/16 15:24] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== AOS IM API commands - RFC ===== | ||
- | [[: | ||
- | |||
- | Date: 10 Oct. 2000\\ | ||
- | Available: 11 Oct. 2000\\ | ||
- | Status: Draft\\ | ||
- | Compliant to AOS API Version: AOS 2.0b1\\ | ||
- | Revision: 1 (1 Jan. 2001)\\ | ||
- | Web: http:// | ||
- | By fui@afteroffice.com | ||
- | |||
- | ---------------------------------------------------------------------------------------------- | ||
- | |||
- | **Description**\\ | ||
- | This API covered online IM retrieving and sending interface, and related online users information.\\ | ||
- | |||
- | **Index**\\ | ||
- | [[dev: | ||
- | [[dev: | ||
- | [[dev: | ||
- | [[dev: | ||
- | |||
- | ---------------------------------------------------------------------------------------------- | ||
- | |||
- | ==== eventnext.user.mms ==== | ||
- | **Command: | ||
- | Use: Obtain status of new email and IM.\\ | ||
- | Access: HTTP\\ | ||
- | Method: POST and GET\\ | ||
- | Parameters case sensitive: NO\\ | ||
- | Where: [SID] = the user login session ID\\ | ||
- | |||
- | **Result: | ||
- | Line 1: <1 for new email available, 0 for none>\\ | ||
- | Line 2: <1 for new IM available, 0 for none>\\ | ||
- | |||
- | **Parameters: | ||
- | API = only 1 argument accepted: " | ||
- | |||
- | **URL Sample:**\\ | ||
- | http:// | ||
- | |||
- | ---------------------------------------------------------------------------------------------- | ||
- | |||
- | ==== eventlist.user.mms ==== | ||
- | **Command: | ||
- | Use: Obtain list of new IM.\\ | ||
- | Access: HTTP\\ | ||
- | Method: POST and GET\\ | ||
- | Parameters case sensitive: NO\\ | ||
- | Where: [SID] = the user login session ID\\ | ||
- | |||
- | **Result:** Multiple lines result.\\ | ||
- | <Date and Time>< | ||
- | |||
- | **Note:** < | ||
- | 1. CR has been replaced with "< | ||
- | 2. TAB has been replaced with " | ||
- | You may want to reverse the < | ||
- | |||
- | **MetaTalk sample:**\\ | ||
- | replace "< | ||
- | replace " | ||
- | |||
- | **Parameters: | ||
- | API = only 1 argument accepted: " | ||
- | |||
- | **URL Sample:**\\ | ||
- | http:// | ||
- | |||
- | ---------------------------------------------------------------------------------------------- | ||
- | |||
- | ==== user.chat.mms ==== | ||
- | **Command: | ||
- | Use: Obtain online users list.\\ | ||
- | Access: HTTP\\ | ||
- | Method: POST and GET\\ | ||
- | Parameters case sensitive: NO\\ | ||
- | Date: 28 August 2000\\ | ||
- | Available: 1 Sept. 2000\\ | ||
- | Where: [SID] = the user login session ID\\ | ||
- | |||
- | **Result: | ||
- | Line 1: <Number of user online> | ||
- | Line 2 .. x: <User host>< | ||
- | |||
- | **Parameters: | ||
- | API = only 1 argument accepted: " | ||
- | |||
- | **URL Sample:**\\ | ||
- | http:// | ||
- | |||
- | ---------------------------------------------------------------------------------------------- | ||
- | |||
- | ==== sqNotify.user.mms ==== | ||
- | **Command: | ||
- | Use: Send IM (message) to user.\\ | ||
- | Method: POST and GET\\ | ||
- | Parameters case sensitive: NO\\ | ||
- | Date: 28 August 2000\\ | ||
- | Available: 1 Sept. 2000\\ | ||
- | |||
- | **Parameters: | ||
- | from=[sender email]\\ | ||
- | Must be a valid AOS user. MIME email compatible eg:\\ | ||
- | " | ||
- | only 1st sender identity allow.\\ | ||
- | |||
- | to=[recipient email]\\ | ||
- | Can be any recipient with valid email.\\ | ||
- | MIME email compatible eg:\\ | ||
- | " | ||
- | multiple email allow. Multiple email address may use ";" | ||
- | fui@afteroffice.com; | ||
- | If the recipient is not a AOS user, method will be defaulted to " | ||
- | |||
- | subject=[notify subject]\\ | ||
- | single line\\ | ||
- | |||
- | body=[notify body]\\ | ||
- | Allow multiple lines. Line separator can be unix cr, or crlf, or " | ||
- | |||
- | method=[optional, | ||
- | Value: " | ||
- | Default: " | ||
- | Set the method for delivering of the notification. When this is set to " | ||
- | |||
- | header=[optional, | ||
- | Extra MIME header to insert in mail. Valid only if method=mail. Eg:\\ | ||
- | Reply-to: support@afteroffice.com\\ | ||
- | |||
- | **Return result:**\\ | ||
- | sqNotify returns none empty, multi-line result (unix cr line separator) with the first line as boolean.\\ | ||
- | |||
- | If sqNotify failed, the first line is " | ||
- | |||
- | If the command successful, first line is " | ||
- | If you send notify to the following users:\\ | ||
- | fui@afteroffice.com\\ | ||
- | "pojen ng" < | ||
- | fui2@afteroffice.com\\ | ||
- | other@otherdomain.com\\ | ||
- | |||
- | Presumed fui@afteroffice.com is online, and pojen@afteroffice.com is not.\\ | ||
- | Possible result:\\ | ||
- | true\\ | ||
- | fui@afteroffice.com IM\\ | ||
- | pojen@afteroffice.com MAIL\\ | ||
- | fui2@afteroffice.com MAIL\\ | ||
- | other@otherdomain.com MAIL\\ | ||
- | |||
- | Note that fui2@afteroffice.com is not a valid user, sqNotify failed to verify as a valid AOS user, and thus sent the notify as mail. The sender will then receive a return email because fui2@afteroffice.com doesn' | ||
- | |||
- | ---------------------------------------------------------------------------------------------- | ||
- | |||
- | **Different from last draft:**\\ | ||
- | 1. method=schedule is dropped and so to sData and sTime related fields.\\ | ||
- | 2. keepcopy is dropped. | ||