This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dev:api:calendar [2014/06/11 15:44] vikki created |
dev:api:calendar [2015/01/16 15:24] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== AOS Calendar API commands ===== | + | [[: |
- | [[: | + | |
+ | ====== AOS Calendar API commands - RFC ====== | ||
+ | |||
+ | \\ | ||
Date: 4 April 2001\\ | Date: 4 April 2001\\ | ||
Last Revision: 9 April 2001\\ | Last Revision: 9 April 2001\\ | ||
Line 13: | Line 15: | ||
------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ||
- | Description | + | **Description**\\ |
- | Retrieve calendar raw data and performing editing tasks. Use dir.cal.mms is find out the list of calendar available, use view.cal.mms to download the calendar data and ed.cal.mms to peform update. | + | Retrieve calendar raw data and performing editing tasks. Use dir.cal.mms is find out the list of calendar available, use view.cal.mms to download the calendar data and ed.cal.mms to peform update.\\ |
- | Index | + | |
- | 1. dir.cal.mms Obtain calendar files list | + | **Index**\\ |
- | 2. view.cal.mms Obtain calendar raw data | + | 1. [[dev: |
- | 3. ed.cal.mms edit calendar item | + | 2. [[dev: |
- | 4. crnew.cal.mms Create new calendar | + | 3. [[dev: |
- | 5. delcfn.cal.mms Delete calendar | + | 4. [[dev: |
+ | 5. [[dev: | ||
------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ||
+ | |||
+ | **Revision 1 (9 April 2001)**\\ | ||
+ | Add " | ||
+ | |||
+ | ------------------------------------------------------------------------------------------ | ||
+ | |||
+ | ==== dir.cal.mms ==== | ||
+ | **Command: | ||
+ | Use: Obtain calendar files 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 calendar file name\\ | ||
+ | |||
+ | **Parameters: | ||
+ | API = only 1 argument accepted: " | ||
+ | |||
+ | ------------------------------------------------------------------------------------------ | ||
+ | |||
+ | ==== view.cal.mms ==== | ||
+ | **Command: | ||
+ | Use: Obtain calendar 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: " | ||
+ | |y |No |The year of the calendar |2001| | ||
+ | |m |No |The month of the calendar, integer. " | ||
+ | |d |No |The day of the calendar, not effective here since the result returned will be always in chunk of month. |1| | ||
+ | |f |No |The calendar file to view |Main| | ||
+ | |||
+ | **Result: | ||
+ | Multiple-lines records, with DEL (ASCII 8) as fields separator.\\ | ||
+ | First field of each of the line (record) is a dataKey.\\ | ||
+ | |||
+ | **DataKey**\\ | ||
+ | DataKey describe the record. Each record (line) starts with a dataKey which is typically looks like: 1,1,1 or 1,email\\ | ||
+ | |||
+ | **Predefined (Permanent) dataKeys:** | ||
+ | ^dataKey ^Description^ | ||
+ | |0 |total of calendar loaded| | ||
+ | |0, | ||
+ | |0, | ||
+ | |0, | ||
+ | |0, | ||
+ | |0, | ||
+ | |||
+ | **Event record dataKey**\\ | ||
+ | AVO calendar are sharable, and therefore calendar data return by the API are multidimensional (aka complex). Event record dataKey has 3 column: x,y,z\\ | ||
+ | All columns are always integer. Each column seperated by a comma. The first column of an event record dataKey is the calendar number. Calendar 1 is always the first calendar specified by the " | ||
+ | 2nd column of the event record dataKey represent the day in a calendar, and 3rd column represent the event number in the day.\\ | ||
+ | E.g.: 1,7,1 = 1st event record in day 7 of calendar 1\\ | ||
+ | |||
+ | **Event record structure: | ||
+ | ^Field No. ^Type ^Format ^Description ^Sample^ | ||
+ | |1 |DataKey |String |Calendar raw data are returned as array, this is the key locate the data |1, | ||
+ | |2 |Rsrvd |- |Reserved |-| | ||
+ | |3 |Rsrvd |- |Reserved |-| | ||
+ | |4 |longRef |Real |The event item unique reference |986269618.53469| | ||
+ | |5 |ts |Long |Date and time of the event item, in seconds |Main| | ||
+ | |6 |dura |Long |Duration of the event, in seconds |3600| | ||
+ | |7 |title |String |Title of the event |Weekly meeting| | ||
+ | |8 |desc |String |Description of the event. If description has more than one line, line break escape as " | ||
+ | |9 |rmdTs |Long |Reminder data and time, in seconds |986356200| | ||
+ | |10 |rmdRef |Long |Reference number for the Reminder |59177477046| | ||
+ | |11 |rmdMethod |String |Reminding method, " | ||
+ | |12 |rmdVal |int |Reminding value, use this value to multiply with rmdUnit, and get result in seconds (Number of seconds before the event) |10| | ||
+ | |13 |rmdUnit |int |Reminding value unit |60| | ||
+ | |14 |rmdMail |String |Send reminding event to this email |support@afteroffice.com| | ||
+ | |15 |repeat |- |Repeat the reminder (not supported) |N/ | ||
+ | |16 |showBusy |- |Show as busy |checked| | ||
+ | |||
+ | **Special dataKey**\\ | ||
+ | For each calendar, there are special dataKey that describe the calendar in more detail:\\ | ||
+ | Eg: 1,email or 1,0\\ | ||
+ | ^dataKey ^Description^ | ||
+ | |x, | ||
+ | |x,0 |Up bound (day) of the calendar (x). E.g.: User has events until day 8 of the month, this value will be 8.| | ||
+ | |x,y,0 |Up bound (event) of the day (y) in calendar (x). E.g.: User has 2 events in the day, this value will be 2, and therefore x,y,1 and x,y,2 contains valid event record.| | ||
+ | |||
+ | **URL Sample:**\\ | ||
+ | http:// | ||
+ | |||
+ | ------------------------------------------------------------------------------------------ | ||
+ | |||
+ | ==== ed.cal.mms ==== | ||
+ | **Command: | ||
+ | Use: Update, create or delete event.\\ | ||
+ | Access: HTTP\\ | ||
+ | Method: POST and GET\\ | ||
+ | Parameters case sensitive: NO\\ | ||
+ | Where: [SID] = the user login session ID\\ | ||
+ | |||
+ | **Result:** < | ||
+ | |||
+ | **Parameters: | ||
+ | ^Key ^Mandatory ^Description ^Sample^ | ||
+ | |api |Yes |Indicate the http query is for API, only 1 argument accepted: " | ||
+ | |f |Yes |Calendar file name |Main| | ||
+ | |y |No |Event original Year. Required if you try to update or delete an event. |2001| | ||
+ | |m |No |Event original Month. Required if you try to update or delete an event. |1| | ||
+ | |d |No |Event original Day. Required if you try to update or delete an event. |1| | ||
+ | |r |No |Event longRef (reference) number. Required if you try to update or delete an event. If this key is not specify, new event record will be created. |986269618.53469| | ||
+ | |title |No |Event title |Meeting| | ||
+ | |desc |No |Event description |Weekly| | ||
+ | |dhour |No |Event duration in hour |1| | ||
+ | |dmin |No |Event duration in minute. To specify an event which is 3:30 hour, set dhour to 3 and dmin to 30. |20| | ||
+ | |rmd |No |Turn on reminder. " | ||
+ | |rmdVal |No |Reminding value before the event invoke, use this value to multiply with rmdUnit, and get result in seconds (Number of seconds before the event) |10| | ||
+ | |rmdUnit |No |Reminding value unit, in second. To specify 10 minutes, set rmdVal to 10 and rmdUnit to 60. To specify 1 hours, set rmdVal to 1 and rmdUnit to 3600 (or rmdVal to 60 and rmdUnit to 60) |60| | ||
+ | |rmdMail |No |Send reminding event to this email |name@abc.com| | ||
+ | |rmdMethod |No |Reminding method, " | ||
+ | |th |Yes |Event time (hour) |12| | ||
+ | |tm |Yes |Event time (minute) |30| | ||
+ | |tap |Yes |Event time (AM or PM) |AM| | ||
+ | |year |Yes |Event year |2001| | ||
+ | |month |Yes |Event month |1| | ||
+ | |day |Yes |Event day |1| | ||
+ | |del |No |Delete the event. Specify a non-empty value to indicate delete the event instead of update. |del| | ||
+ | |||
+ | ------------------------------------------------------------------------------------------ | ||
+ | |||
+ | ==== crnew.cal.mms ==== | ||
+ | **Command: | ||
+ | Use: Create new calendar.\\ | ||
+ | Access: HTTP\\ | ||
+ | Method: POST and GET\\ | ||
+ | Parameters case sensitive: NO\\ | ||
+ | Where: [SID] = the user login session ID\\ | ||
+ | |||
+ | **Result:** < | ||
+ | |||
+ | **Parameters: | ||
+ | ^Key ^Mandatory ^Description ^Sample^ | ||
+ | |api |Yes |Indicate the http query is for API, only 1 argument accepted: " | ||
+ | |n |Yes |The new calendar name. 27 chars max. |my calendar| | ||
+ | |||
+ | ------------------------------------------------------------------------------------------ | ||
+ | |||
+ | === crnew.cal.mms === | ||
+ | **Command: | ||
+ | Use: Delete calendar file.\\ | ||
+ | Access: HTTP\\ | ||
+ | Method: POST and GET\\ | ||
+ | Parameters case sensitive: NO\\ | ||
+ | Where: [SID] = the user login session ID\\ | ||
+ | |||
+ | **Result:** < | ||
+ | |||
+ | **Parameters: | ||
+ | ^Key ^Mandatory ^Description ^Sample^ | ||
+ | |api |Yes |Indicate the http query is for API, only 1 argument accepted: " | ||
+ | |c |Yes |The calendar file to delete |my calendar| |