Documentation for your first returned item: VCalendar
Once you imported the iCal-library library, you can use either the client
or CacheCLient
to get a VCalendar
object.
This page explains all the functions and attributes of the VCalendar
object.
VCalendar
Bases: Component
This class represents the VCALENDAR component specified in RFC 5545 in '3.6. Calendar Components'.
The "VCALENDAR" component consists of a sequence of calendar properties and one or more calendar components. The calendar properties are attributes that apply to the calendar object as a whole. The calendar components are collections of properties that express a particular calendar semantic. For example, the calendar component can specify an event, a to-do, a journal entry, time zone information, free/busy time information, or an alarm.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prodid |
Optional[ProdID]
|
The ProdID property. Required and must occur exactly once. |
None
|
version |
Optional[Version]
|
The Version property. Required and must occur exactly once. |
None
|
calscale |
Optional[CalScale]
|
The CalScale property. Optional, but may occur at most once. |
None
|
method |
Optional[Method]
|
The Method property. Optional, but may occur at most once. |
None
|
events |
Optional[List[VEvent]]
|
Optional list of VEvent components. Each component may occur multiple times. |
None
|
todos |
Optional[List[VToDo]]
|
Optional list of VToDo components. Each component may occur multiple times. |
None
|
journals |
Optional[List[VJournal]]
|
Optional list of VJournal components. Each component may occur multiple times. |
None
|
free_busy_list |
Optional[List[VFreeBusy]]
|
Optional list of VFreeBusy components. Each component may occur multiple times. |
None
|
time_zones |
Optional[List[VTimeZone]]
|
Optional list of VTimeZone components. Each component may occur multiple times. |
None
|
Source code in ical_library/ical_components/v_calendar.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
calendar_scale: str
property
Return the calendar scale according to RFC 5545.
prodid: ProdID
property
writable
A getter to ensure the required property is set.
timeline: Timeline
property
Return a timeline of VEvents from 1970-00-00T00:00:00 to 2100-00-00T00:00:00.
version: Version
property
writable
A getter to ensure the required property is set.
get_aware_dt_for_timezone(dt, tzid)
Return the timezone aware DateTime object for a given TimeZone identifier.
Source code in ical_library/ical_components/v_calendar.py
110 111 112 |
|
get_limited_timeline(start, end)
Return a timeline of VEvents limited by start and end
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start |
Optional[DateTime]
|
Only include events in the timeline with a starting date later than this value. |
required |
end |
Optional[DateTime]
|
Only include events in the timeline with a starting date earlier than this value. |
required |
Source code in ical_library/ical_components/v_calendar.py
121 122 123 124 125 126 127 128 129 130 |
|
get_original_ical_text(start_line, end_line)
Get the original iCAL text for your property from the RAW string list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_line |
int
|
The starting line index for the component you wish to show. |
required |
end_line |
int
|
The ending line index for the component you wish to show. |
required |
Returns:
Type | Description |
---|---|
str
|
The complete string, as it was in the RAW string list, for the component you wish to show. |
Source code in ical_library/ical_components/v_calendar.py
142 143 144 145 146 147 148 149 150 151 152 |
|
get_timezone(tzid)
Get the corresponding VTimeZone object based on the given timezone identifier.
Source code in ical_library/ical_components/v_calendar.py
103 104 105 106 107 108 |
|
parse_component(lines, line_number)
Parse a new component in the RAW string list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lines |
List[str]
|
A list of all the lines in the iCalendar file. |
required |
line_number |
int
|
The line number at which this component starts. |
required |
Returns:
Type | Description |
---|---|
int
|
The line number at which this component ends. |
Source code in ical_library/ical_components/v_calendar.py
132 133 134 135 136 137 138 139 140 |
|