GData.CalendarEvent

g GData.CalendarEvent GData.CalendarEvent GData.Entry GData.Entry GData.Entry->GData.CalendarEvent GData.Parsable GData.Parsable GData.Parsable->GData.Entry GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

GData.Entry (24), GData.Parsable (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id)

add_person (who)

add_place (where)

add_time (when)

get_anyone_can_add_self ()

get_edited ()

get_guests_can_invite_others ()

get_guests_can_modify ()

get_guests_can_see_guests ()

get_original_event_details ()

get_people ()

get_places ()

get_primary_time ()

get_recurrence ()

get_sequence ()

get_status ()

get_times ()

get_transparency ()

get_uid ()

get_visibility ()

is_exception ()

set_anyone_can_add_self (anyone_can_add_self)

set_guests_can_invite_others (guests_can_invite_others)

set_guests_can_modify (guests_can_modify)

set_guests_can_see_guests (guests_can_see_guests)

set_recurrence (recurrence)

set_sequence (sequence)

set_status (status)

set_transparency (transparency)

set_uid (uid)

set_visibility (visibility)

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7)

Properties

Inherited:

GData.Entry (10), GData.Parsable (1)

Name

Type

Flags

Short Description

anyone-can-add-self

bool

r/w

Indicates whether anyone can invite themselves to the event.

edited

int

r

The last time the event was edited.

guests-can-invite-others

bool

r/w

Indicates whether attendees may invite others.

guests-can-modify

bool

r/w

Indicates whether attendees may modify the original event.

guests-can-see-guests

bool

r/w

Indicates whether attendees can see other people invited.

original-event-id

str

r

The event ID for the original event.

original-event-uri

str

r

The event URI for the original event.

recurrence

str

r/w

Represents the dates and times when a recurring event takes place.

sequence

int

r/w

The revision sequence number of the event.

status

str

r/w

The scheduling status of the event.

transparency

str

r/w

How the event is marked as consuming time on a calendar.

uid

str

r/w

The globally unique identifier (UID) of the event.

visibility

str

r/w

The event’s visibility to calendar users.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Entry

r

Class Details

class GData.CalendarEvent(**kwargs)
Bases:

GData.Entry

Abstract:

No

Structure:

GData.CalendarEventClass

All the fields in the GData.CalendarEvent structure are private and should never be accessed directly.

classmethod new(id)
Parameters:

id (str or None) – the event’s ID, or None

Returns:

a new GData.CalendarEvent; unref with GObject.Object.unref()

Return type:

GData.CalendarEvent

Creates a new GData.CalendarEvent with the given ID and default properties.

add_person(who)
Parameters:

who (GData.GDWho) – a GData.GDWho to add

Adds the person who to the event as a guest (attendee, organiser, performer, etc.), and increments its reference count.

Duplicate people will not be added to the list.

add_place(where)
Parameters:

where (GData.GDWhere) – a GData.GDWhere to add

Adds the place where to the event as a location and increments its reference count.

Duplicate places will not be added to the list.

add_time(when)
Parameters:

when (GData.GDWhen) – a GData.GDWhen to add

Adds when to the event as a time period when the event happens, and increments its reference count.

Duplicate times will not be added to the list.

Note: GData.CalendarEvent.add_time() and GData.CalendarEvent.set_recurrence() are mutually exclusive, as the server doesn’t support positive exceptions to recurrence rules. If recurrences are required, use GData.CalendarEvent.set_recurrence(). Note that this means reminders cannot be set for the event, as they are only supported by GData.GDWhen. No checks are performed for these forbidden conditions, as to do so would break libgdata’s API; if both a recurrence is set and a specific time is added, the server will return an error when the GData.CalendarEvent is inserted using GData.Service.insert_entry().

New in version 0.2.0.

get_anyone_can_add_self()
Returns:

True if anyone can add themselves as an attendee to the event, False otherwise

Return type:

bool

Gets the GData.CalendarEvent :anyone-can-add-self property.

get_edited()
Returns:

the UNIX timestamp for the time the event was last edited, or -1

Return type:

int

Gets the GData.CalendarEvent :edited property. If the property is unset, -1 will be returned.

get_guests_can_invite_others()
Returns:

True if attendees can invite others to the event, False otherwise

Return type:

bool

Gets the GData.CalendarEvent :guests-can-invite-others property.

get_guests_can_modify()
Returns:

True if attendees can modify the original event, False otherwise

Return type:

bool

Gets the GData.CalendarEvent :guests-can-modify property.

get_guests_can_see_guests()
Returns:

True if attendees can see who’s attending the event, False otherwise

Return type:

bool

Gets the GData.CalendarEvent :guests-can-see-guests property.

get_original_event_details()
Returns:

event_id:

return location for the original event’s ID, or None

event_uri:

return location for the original event’s URI, or None

Return type:

(event_id: str, event_uri: str)

Gets details of the original event, if this event is an exception to a recurring event. The original event’s ID and the URI of the event’s XML are returned in event_id and event_uri, respectively.

If this event is not an exception to a recurring event, event_id and event_uri will be set to None. See GData.CalendarEvent.is_exception() to determine more simply whether an event is an exception to a recurring event.

If both event_id and event_uri are None, this function is a no-op. Otherwise, they should both be freed with GLib.free().

New in version 0.3.0.

get_people()
Returns:

a GLib.List of GData.GDWhos, or None

Return type:

[GData.GDWho]

Gets a list of the people attending the event.

New in version 0.2.0.

get_places()
Returns:

a GLib.List of GData.GDWheres, or None

Return type:

[GData.GDWhere]

Gets a list of the locations associated with the event.

New in version 0.2.0.

get_primary_time()
Returns:

True if there is only one time period associated with the event, False otherwise

start_time:

a #gint64 for the start time, or None

end_time:

a #gint64 for the end time, or None

when:

a GData.GDWhen for the primary time structure, or None

Return type:

(bool, start_time: int, end_time: int, when: GData.GDWhen)

Gets the first time period associated with the event, conveniently returning just its start and end times if required.

If there are no time periods, or more than one time period, associated with the event, False will be returned, and the parameters will remain unmodified.

New in version 0.2.0.

get_recurrence()
Returns:

the event recurrence patterns, or None

Return type:

str

Gets the GData.CalendarEvent :recurrence property.

New in version 0.3.0.

get_sequence()
Returns:

the event’s sequence number

Return type:

int

Gets the GData.CalendarEvent :sequence property.

get_status()
Returns:

the event status, or None

Return type:

str

Gets the GData.CalendarEvent :status property.

New in version 0.2.0.

get_times()
Returns:

a GLib.List of GData.GDWhens, or None

Return type:

[GData.GDWhen]

Gets a list of the time periods associated with the event.

New in version 0.2.0.

get_transparency()
Returns:

the event transparency, or None

Return type:

str

Gets the GData.CalendarEvent :transparency property.

get_uid()
Returns:

the event’s UID, or None

Return type:

str

Gets the GData.CalendarEvent :uid property.

get_visibility()
Returns:

the event visibility, or None

Return type:

str

Gets the GData.CalendarEvent :visibility property.

is_exception()
Returns:

True if the event is an exception, False otherwise

Return type:

bool

Determines whether the event is an exception to a recurring event. If it is, details of the original event can be retrieved using GData.CalendarEvent.get_original_event_details().

New in version 0.3.0.

set_anyone_can_add_self(anyone_can_add_self)
Parameters:

anyone_can_add_self (bool) – True if anyone can add themselves as an attendee to the event, False otherwise

Sets the GData.CalendarEvent :anyone-can-add-self property to anyone_can_add_self.

set_guests_can_invite_others(guests_can_invite_others)
Parameters:

guests_can_invite_others (bool) – True if attendees can invite others to the event, False otherwise

Sets the GData.CalendarEvent :guests-can-invite-others property to guests_can_invite_others.

set_guests_can_modify(guests_can_modify)
Parameters:

guests_can_modify (bool) – True if attendees can modify the original event, False otherwise

Sets the GData.CalendarEvent :guests-can-modify property to guests_can_modify.

set_guests_can_see_guests(guests_can_see_guests)
Parameters:

guests_can_see_guests (bool) – True if attendees can see who’s attending the event, False otherwise

Sets the GData.CalendarEvent :guests-can-see-guests property to guests_can_see_guests.

set_recurrence(recurrence)
Parameters:

recurrence (str or None) – a new event recurrence, or None

Sets the GData.CalendarEvent :recurrence property to the new recurrence, recurrence.

Set recurrence to None to unset the property in the event.

Note: GData.CalendarEvent.add_time() and GData.CalendarEvent.set_recurrence() are mutually exclusive. See the documentation for GData.CalendarEvent.add_time() for details.

New in version 0.3.0.

set_sequence(sequence)
Parameters:

sequence (int) – a new sequence number, or 0

Sets the GData.CalendarEvent :sequence property to the new sequence number, sequence.

set_status(status)
Parameters:

status (str or None) – a new event status, or None

Sets the GData.CalendarEvent :status property to the new status, status.

Set status to None to unset the property in the event.

New in version 0.2.0.

set_transparency(transparency)
Parameters:

transparency (str or None) – a new event transparency, or None

Sets the GData.CalendarEvent :transparency property to the new transparency, transparency.

Set transparency to None to unset the property in the event.

set_uid(uid)
Parameters:

uid (str or None) – a new event UID, or None

Sets the GData.CalendarEvent :uid property to the new UID, uid.

Set uid to None to unset the property in the event.

set_visibility(visibility)
Parameters:

visibility (str or None) – a new event visibility, or None

Sets the GData.CalendarEvent :visibility property to the new visibility, visibility.

Set visibility to None to unset the property in the event.

Property Details

GData.CalendarEvent.props.anyone_can_add_self
Name:

anyone-can-add-self

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates whether anyone can invite themselves to the event, by adding themselves to the attendee list.

GData.CalendarEvent.props.edited
Name:

edited

Type:

int

Default Value:

-1

Flags:

READABLE

The last time the event was edited. If the event has not been edited yet, the content indicates the time it was created.

For more information, see the Atom Publishing Protocol specification.

GData.CalendarEvent.props.guests_can_invite_others
Name:

guests-can-invite-others

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates whether attendees may invite others to the event.

For more information, see the GData specification.

GData.CalendarEvent.props.guests_can_modify
Name:

guests-can-modify

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates whether attendees may modify the original event, so that changes are visible to organizers and other attendees. Otherwise, any changes made by attendees will be restricted to that attendee’s calendar.

For more information, see the

GData specification.

GData.CalendarEvent.props.guests_can_see_guests
Name:

guests-can-see-guests

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates whether attendees can see other people invited to the event.

For more information, see the

GData specification.

GData.CalendarEvent.props.original_event_id
Name:

original-event-id

Type:

str

Default Value:

None

Flags:

READABLE

The event ID for the original event, if this event is an exception to a recurring event.

New in version 0.3.0.

GData.CalendarEvent.props.original_event_uri
Name:

original-event-uri

Type:

str

Default Value:

None

Flags:

READABLE

The event URI for the original event, if this event is an exception to a recurring event.

New in version 0.3.0.

GData.CalendarEvent.props.recurrence
Name:

recurrence

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Represents the dates and times when a recurring event takes place. The returned string is in iCal format, as a list of properties.

For more information, see the GData specification.

Note: GData.CalendarEvent.add_time() and GData.CalendarEvent.set_recurrence() are mutually exclusive. See the documentation for GData.CalendarEvent.add_time() for details.

New in version 0.3.0.

GData.CalendarEvent.props.sequence
Name:

sequence

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The revision sequence number of the event as defined in Section 4.8.7.4 of RFC 2445.

GData.CalendarEvent.props.status
Name:

status

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The scheduling status of the event. For example: GData.GD_EVENT_STATUS_CANCELED or GData.GD_EVENT_STATUS_CONFIRMED.

For more information, see the GData specification.

New in version 0.2.0.

GData.CalendarEvent.props.transparency
Name:

transparency

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

How the event is marked as consuming time on a calendar. For example: GData.GD_EVENT_TRANSPARENCY_OPAQUE or GData.GD_EVENT_TRANSPARENCY_TRANSPARENT.

For more information, see the GData specification.

GData.CalendarEvent.props.uid
Name:

uid

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The globally unique identifier (UID) of the event as defined in Section 4.8.4.7 of RFC 2445.

GData.CalendarEvent.props.visibility
Name:

visibility

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The event’s visibility to calendar users. For example: GData.GD_EVENT_VISIBILITY_PUBLIC or GData.GD_EVENT_VISIBILITY_DEFAULT.

For more information, see the GData specification.