GData.ContactsGroup

g GData.ContactsGroup GData.ContactsGroup GData.Entry GData.Entry GData.Entry->GData.ContactsGroup 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)

get_edited ()

get_extended_properties ()

get_extended_property (name)

get_system_group_id ()

is_deleted ()

set_extended_property (name, value)

Virtual Methods

Inherited:

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

Properties

Inherited:

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

Name

Type

Flags

Short Description

deleted

bool

r

Whether the entry has been deleted.

edited

int

r

The last time the group was edited.

system-group-id

str

r

The system group ID for this group, if it’s a system group.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Entry

r

Class Details

class GData.ContactsGroup(**kwargs)
Bases:

GData.Entry

Abstract:

No

Structure:

GData.ContactsGroupClass

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

New in version 0.7.0.

classmethod new(id)
Parameters:

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

Returns:

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

Return type:

GData.ContactsGroup

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

New in version 0.7.0.

get_edited()
Returns:

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

Return type:

int

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

New in version 0.7.0.

get_extended_properties()
Returns:

a GLib.HashTable of extended properties

Return type:

{object: object}

Gets the full list of extended properties of the group; a hash table mapping property name to value.

New in version 0.7.0.

get_extended_property(name)
Parameters:

name (str) – the property name; an arbitrary, unique string

Returns:

the property’s value, or None

Return type:

str

Gets the value of an extended property of the group. Each group can have up to 10 client-set extended properties to store data of the client’s choosing.

New in version 0.7.0.

get_system_group_id()
Returns:

the group’s system group ID, or None

Return type:

str

Gets the GData.ContactsGroup :system-group-id property. If the group is not a system group, None will be returned.

New in version 0.7.0.

is_deleted()
Returns:

True if the group has been deleted, False otherwise

Return type:

bool

Returns whether the group has recently been deleted. This will always return False unless GData.ContactsQuery :show-deleted has been set to True for the query which returned the group; then this function will return True only if the group has been deleted.

If a group has been deleted, no other information is available about it. This is designed to allow groups to be deleted from local address books using incremental updates from the server (e.g. with GData.Query :updated-min and GData.ContactsQuery :show-deleted).

New in version 0.7.0.

set_extended_property(name, value)
Parameters:
  • name (str) – the property name; an arbitrary, unique string

  • value (str or None) – the property value, or None

Returns:

True if the property was updated or deleted successfully, False otherwise

Return type:

bool

Sets the value of a group’s extended property. Extended property names are unique (but of the client’s choosing), and reusing the same property name will result in the old value of that property being overwritten.

To unset a property, set value to None or an empty string.

A group may have up to 10 extended properties, and each should be reasonably small (i.e. not a photo or ringtone). For more information, see the

online documentation. False will be returned if you attempt to add more than 10 extended properties.

New in version 0.7.0.

Property Details

GData.ContactsGroup.props.deleted
Name:

deleted

Type:

bool

Default Value:

False

Flags:

READABLE

Whether the entry has been deleted.

New in version 0.7.0.

GData.ContactsGroup.props.edited
Name:

edited

Type:

int

Default Value:

-1

Flags:

READABLE

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

For more information, see the Atom Publishing Protocol specification.

New in version 0.7.0.

GData.ContactsGroup.props.system_group_id
Name:

system-group-id

Type:

str

Default Value:

None

Flags:

READABLE

The system group ID for this group, if it’s a system group. If the group is not a system group, this is None. Otherwise, it is one of the four system group IDs: GData.CONTACTS_GROUP_CONTACTS, GData.CONTACTS_GROUP_FRIENDS, GData.CONTACTS_GROUP_FAMILY and GData.CONTACTS_GROUP_COWORKERS.

If this is non-None, the group name stored in GData.Entry :title will not be localised, so clients should provide localised group names of their own for each of the system groups. Whether a group is a system group should be detected solely on the basis of the value of this property, not by comparing the group name (GData.Entry :title) or entry ID (GData.Entry :id). The entry ID is not the same as the system group ID.

New in version 0.7.0.