Calendar

Creating an event

Here are the invocation attributes you use to open a calendar card to create an event:

Attribute Value
Target ID

sys.pim.calendar.viewer.eventcreate

Action

bb.action.CREATE

MIME type

text/calendar

Description Data
Account ID of the event unsigned int accountId
Folder ID of the event unsigned int folderId

List of participant email addresses

"participants":["email1@xyz.com","email2@xyz.com"]
Subject of the event "subject":"<text>"
Body of the event "body":"<text>"
Start time of the event String startTime
Location of the event QString location
Duration of the event int duration

Picking an existing event

Here are the invocation attributes you use to open a calendar card to pick an existing event:

Attribute Value
Target ID

sys.pim.calendar.viewer.nav

Action

bb.calendar.PICK

MIME type

text/calendar

Here's the card response that you receive:

Reason Data Description
Done Event data in VCS format This response is returned when the user picks an event, after which the card closes.

Editing an existing event

Here are the invocation attributes you use to open a calendar card to edit an existing event:

Attribute Value
Target ID

sys.pim.calendar.viewer.eventcreate

Action

bb.calendar.EDIT

MIME type

text/calendar

Description Data
Account ID of the existing event unsigned int accountId
Folder ID of the event (optional) unsigned int folderId
Event ID unsigned int eventID
Start time of the event (optional) QString startTime

The start time lets you differentiate between any two or more recurring events that have the same eventID.

Viewing an .ics file

Here are the invocation attributes you use to launch a calendar card to view an .ics file:

Attribute Value
Target ID

sys.pim.calendar.viewer.ics

Action

bb.action.OPEN

MIME type

text/calendar

URI

file:///path/to/my/file/filename.ics

If you want to open the .ics file for a specific account, you can set an account ID in the data attribute of the invocation request.

Description Data
Account ID of the existing event unsigned int accountId

Opening the calendar app

Here are the invocation attributes you use to open the calendar app:

Attribute Value
Action bb.calendar.OPEN
MIME type text/calendar
Data

"data":"file:///path/to/file.txt"

Query name Query value Description
view
  • monthly
  • agenda
  • people
  • schedule
  • weekly
Opens a specific view of the calendar app (for example, monthly view).
calendars
  • <account-id>-<folderId>
  • <account-id>-<syncId>
Opens the calendar app with only the specified calendars visible. You can enable multiple calendars by providing comma-separated list of <account-id>-<folderId> and <account-id>-<syncId>.
date Date must be in the following format: Wed Jun 13 2012 Opens the calendar view for the specified date.

Viewing an existing event

Here are the invocation attributes you use to launch a calendar card to view an existing event:

Attribute Value
Target ID

sys.pim.calendar.viewer.ics

Action

bb.calendar.OPEN

MIME type

text/calendar

Description Data
Account ID of the existing event unsigned int accountId
Event ID of the existing event unsigned int eventId
Start time of the existing event. You can use this attribute to distinguish between any recurring events that have the same event ID.

The start time string should be in the following format: "yyyy-MM-dd HH:mm:ss"

Type "event"

Here are the invocation attributes you use to open the calendar app to view an existing event:

Attribute Value
Action bb.calendar.VIEW
MIME type text/calendar
Data

"data":"file:///path/to/file.txt"

Query name Query value Description
accountId <account-id> Account ID of the event.
eventId <event-id> Event ID of the event.
date The start time must be in the following format: 2012-06-13 09:39:56 The start time of the event. This attribute is required only for recurring events to identify which of the events in a recurring event should be opened.
Type "event" The type of the event. This attribute is required for opening an existing event with the calendar app.

To learn more about invoking calendar cards and read code samples, see the API documentation on calendar event composer and calendar event picker cards.

Last modified: 2014-12-04



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus