Calendar component


The Calendar component is an object consists of a sequence of iCalendar properties that are used to set up global information. Following properties are available:

Property Key Definition Mandatory Type
Product identifier product_id Identifier for the product that created the calendar No string
Method method iCalendar object method No string
Description description Description of the calendar No array
Name name Name of the calendar No array
Last modification last_modification Date and time of the last revision of the calendar No string
URL url Uniform Resource Locator (URL) associated with a detailed version of the calendar No string
Color color Color used for displaying the event No string
Source source Uniform Resource Locator (URL) associated with the calendar No string
Refresh interval refresh_interval Refresh interval No array

Product identifier

This property defines the identifier for the product that created the iCalendar object. This attribute must be set as a string.

This example show how to set a product identifier for an event request:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[product_id]=-//ABC Corporation//My Product//EN' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

Method

This property defines the iCalendar object method associated with the calendar object. This property must be a string. Allowed values depend on the calendar component:

Method Event To-do Journal
request Yes Yes Yes
publish Yes Yes No
add Yes Yes No
cancel Yes Yes Yes
counter Yes Yes Yes
decline-counter Yes Yes No
refresh Yes Yes No
reply Yes Yes No

{info} If method is not set, the request method is set by default.

Description

This property specifies a description of the calendar. This property must be set as an array with children attributes:

Attribute Key Definition Mandatory Type
Value value Value of description Yes string
Language language ISO 639-1 language code for value No string
Alternate alternate URI that points to an alternate representation for the value No string

The following example shows how to set the description of the calendar for an event request:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[description][value]=Personal calendar' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

Name

This property specifies a name of the calendar. This property must be set as an array with children attributes:

Attribute Key Definition Mandatory Type
Value value Value of description Yes string
Language language ISO 639-1 language code for value No string
Alternate alternate URI that points to an alternate representation for the value No string

The following example shows how to set the name of the calendar for an event request:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[name][value]=My calendar' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

Last modification

This property specifies the date and time that the information associated with the calendar was last revised. This property must be set as an array with children attributes:

Attribute Key Definition Mandatory Type
Date date End date and time Yes string

{warning} The date attribute must be specified as an English textual datetime.

The following example shows how to set the last modification date of an event:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[last_modification][date]=04/26/2019 08:00 PM' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

URL

This property may be to convey a location where a more dynamic rendition of the calendar information can be found. This property must be set as a string.

{warning} The value of this attribute must be a valid URI following RFC 3986.

The following example shows how to set the URL of an event request:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[url]=https://www.domain.com/full-calendar.ics' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

Color

This property specifies a color used for displaying the calendar. This property must be a string and should be a valid CSS3 color name.

The following example shows how to create a calendar that will be displayed in red:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[color]=red' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

Source

This property identifies a URI where calendar data can be refreshed from. This property must be set as a string.

{warning} The value of this attribute must be a valid URI following RFC 3986.

The following example shows how to set the URL of an event request:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'calendar[source]=https://www.domain.com/calendar.ics' \
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[end][date]=04/26/2019 11:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'

Refresh interval

This property specifies a suggested minimum interval for polling for changes of the calendar data from the original source of that data. This property must be set as an array with children attributes:

Attribute Key Definition Mandatory Type
Days days Duration in days No int
Weeks weeks Duration in weeks No int
Hours hours Duration in hours No int
Minutes minutes Duration in minutes No int
Seconds seconds Duration in seconds No int

The following example shows how to set the refresh interval of a calendar:

curl https://convier.me/api/event \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d 'event[refresh_interval][hours]=1'
-d 'event[start][date]=04/26/2019 09:00 PM' \
-d 'event[organizer][name]=Tony Stark' \
-d 'event[organizer][email]=ironman@avengers.com' \
-d 'event[summary][value]=Endgame premiere' \
-d 'event[description][value]=Bring the popcorn.' \
-d 'event[attendees][0][email]=USER_EMAIL'