Home > Development
  Developer Reference

   Home : Developer Reference

AOS Calendar API commands - RFC
Home : Developer Reference : AOS API Document : Calendar

Date: 4 April 2001
Last Revision: 9 April 2001
Available: 9 April 2001
Status: Draft
Revision: 1
Compliant to AOS API Version: AOS 2.0b1
Web: http://www.afteroffice.com/dev/api/calendar.html
By fui@afteroffice.com


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.

Index


Revision 1 (9 April 2001)
Add "showBusy" flag in the Event record structure


Command: [SID].dir.cal.mms
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: "LC"

###


Command: [SID].view.cal.mms
Use: Obtain calendar raw data
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID

Parameters:
KeyMandatoryDescriptionSample
apiYesIndicate the http query is for API, only 1 argument accepted: "LC"lc
yNoThe year of the calendar2001
mNoThe month of the calendar, integer. "Next" and "Prev" can be used.12
dNoThe day of the calendar, not effective here since the result returned will be always in chunk of month.1
fNoThe calendar file to viewMain

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:

dataKeyDescription
0total of calendar loaded
0,dircalendar file list
0,filecurrent calendar file
0,daycurrent day
0,monthcurrent month
0,yearcurrent year

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 "f" key. Calendar 2 and so on are usually the shared calendar or the cascading calendar ("View also" calendar in AVO).
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.TypeFormatDescriptionSample
1DataKeyStringCalendar raw data are returned as array, this is the key locate the data1,1,1
2Rsrvd-Reserved-
3Rsrvd-Reserved-
4longRefRealThe event item unique reference986269618.53469
5tsLongDate and time of the event item, in secondsMain
6duraLongDuration of the event, in seconds3600
7titleStringTitle of the eventWeekly meeting
8descStringDescription of the event. If description has more than one line, line break escape as "\r".Agenda required
9rmdTsLongReminder data and time, in seconds986356200
10rmdRefLongReference number for the Reminder59177477046
11rmdMethodStringReminding method, "mail", "SMS","mailsms" and "othermail"mail
12rmdValintReminding value, use this value to multiply with rmdUnit, and get result in seconds (Number of seconds before the event)10
13rmdUnitintReminding value unit60
14rmdMailStringSend reminding event to this emailsupport@afteroffice.com
15repeat-Repeat the reminder (not supported)N/A
16showBusy-Show as busychecked

Special dataKey
For each calendar, there are special dataKey that describe the calendar in more detail:
Eg: 1,email or 1,0

dataKeyDescription
x,emailThe calendar (x) name and email (HTML escaped) of the shared calendar owner. If this calendar is belong to the user, it will be the name of the calendar.
x,0Up bound (day) of the calendar (x). E.g.: User has events until day 8 of the month, this value will be 8.
x,y,0Up 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://afteroffice.com/SIDxxx.view.cal.mms?api=lc

####


Command: [SID].ed.cal.mms
Use: Update, create or delete event.
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID
Result: <boolean><tab><description>

Parameters:

KeyMandatoryDescriptionSample
apiYesIndicate the http query is for API, only 1 argument accepted: "LC"lc
fYesCalendar file nameMain
yNoEvent original Year. Required if you try to update or delete an event.2001
mNoEvent original Month. Required if you try to update or delete an event.1
dNoEvent original Day. Required if you try to update or delete an event.1
rNoEvent 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
titleNoEvent titleMeeting
descNoEvent descriptionWeekly
dhourNoEvent duration in hour1
dminNoEvent duration in minute. To specify an event which is 3:30 hour, set dhour to 3 and dmin to 30.20
rmdNoTurn on reminder. "Checked" to turn on, empty to turn offChecked
rmdValNoReminding value before the event invoke, use this value to multiply with rmdUnit, and get result in seconds (Number of seconds before the event)10
rmdUnitNoReminding 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
rmdMailNoSend reminding event to this emailname@abc.com
rmdMethodNoReminding method, "mail", "SMS","mailsms" and "othermail"mail
thYesEvent time (hour)12
tmYesEvent time (minute)30
tapYesEvent time (AM or PM)AM
yearYesEvent year2001
monthYesEvent month1
dayYesEvent day1
delNoDelete the event. Specify a non-empty value to indicate delete the event instead of update.del

####

Command: [SID].crnew.cal.mms
Use: Create new calendar.
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID
Result: <boolean><tab><description>

Parameters:

KeyMandatoryDescriptionSample
apiYesIndicate the http query is for API, only 1 argument accepted: "LC"lc
nYesThe new calendar name. 27 chars max.my calendar

####


Command: [SID].crnew.cal.mms
Use: Delete calendar file.
Access: HTTP
Method: POST and GET
Parameters case sensitive: NO
Where: [SID] = the user login session ID
Result: <boolean><tab><description>

Parameters:

KeyMandatoryDescriptionSample
apiYesIndicate the http query is for API, only 1 argument accepted: "LC"lc
cYesThe calendar file to deletemy calendar

####