GData.ContactsService¶
- Subclasses:
None
Methods¶
- Inherited:
GData.Service (27), GObject.Object (37), GData.Batchable (1)
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class GData.ContactsService(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All the fields in the
GData.ContactsServicestructure are private and should never be accessed directly.New in version 0.2.0.
- classmethod get_primary_authorization_domain()¶
- Returns:
the service’s authorization domain
- Return type:
The primary
GData.AuthorizationDomainfor interacting with Google Contacts. This will not normally need to be used, as it’s used internally by theGData.ContactsServicemethods. However, if using the plainGData.Servicemethods to implement custom queries or requests which libgdata does not support natively, then this domain may be needed to authorize the requests.The domain never changes, and is interned so that pointer comparison can be used to differentiate it from other authorization domains.
New in version 0.9.0.
- classmethod new(authorizer)¶
- Parameters:
authorizer (
GData.AuthorizerorNone) – aGData.Authorizerto authorize the service’s requests, orNone- Returns:
a new
GData.ContactsService, orNone; unref withGObject.Object.unref()- Return type:
Creates a new
GData.ContactsServiceusing the givenGData.Authorizer. If authorizer isNone, all requests are made as an unauthenticated user.New in version 0.9.0.
- insert_contact(contact, cancellable)¶
- Parameters:
contact (
GData.ContactsContact) – theGData.ContactsContactto insertcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
an updated
GData.ContactsContact, orNone; unref withGObject.Object.unref()- Return type:
Inserts contact by uploading it to the online contacts service.
For more details, see
GData.Service.insert_entry().New in version 0.2.0.
- insert_contact_async(contact, cancellable, callback, *user_data)¶
- Parameters:
contact (
GData.ContactsContact) – theGData.ContactsContactto insertcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when insertion is finisheduser_data (
objectorNone) – data to pass to the callback function
Inserts contact by uploading it to the online contacts service. self and contact are both reffed when this function is called, so can safely be unreffed after this function returns.
callback should call
GData.Service.insert_entry_finish() to obtain aGData.ContactsContactrepresenting the inserted contact and to check for possible errors.For more details, see
GData.ContactsService.insert_contact(), which is the synchronous version of this function, andGData.Service.insert_entry_async(), which is the base asynchronous insertion function.New in version 0.7.0.
- insert_group(group, cancellable)¶
- Parameters:
group (
GData.ContactsGroup) – aGData.ContactsGroupto create on the servercancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
the inserted
GData.ContactsGroup; unref withGObject.Object.unref()- Return type:
Inserts a new contact group described by group. The user must be authenticated to use this function.
New in version 0.7.0.
- insert_group_async(group, cancellable, callback, *user_data)¶
- Parameters:
group (
GData.ContactsGroup) – theGData.ContactsGroupto insertcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when insertion is finisheduser_data (
objectorNone) – data to pass to the callback function
Inserts a new contact group described by group. The user must be authenticated to use this function. self and group are both reffed when this function is called, so can safely be unreffed after this function returns.
callback should call
GData.Service.insert_entry_finish() to obtain aGData.ContactsGrouprepresenting the inserted group and to check for possible errors.For more details, see
GData.ContactsService.insert_group(), which is the synchronous version of this function, andGData.Service.insert_entry_async(), which is the base asynchronous insertion function.New in version 0.7.0.
- query_contacts(query, cancellable, progress_callback, *progress_user_data)¶
- Parameters:
query (
GData.QueryorNone) – aGData.Querywith the query parameters, orNonecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNoneprogress_callback (
GData.QueryProgressCallbackorNone) – aGData.QueryProgressCallbackto call when an entry is loaded, orNoneprogress_user_data (
objectorNone) – data to pass to the progress_callback function
- Raises:
- Returns:
a
GData.Feedof query results; unref withGObject.Object.unref()- Return type:
Queries the service to return a list of contacts matching the given query.
For more details, see
GData.Service.query().New in version 0.2.0.
- query_contacts_async(query, cancellable, progress_callback, progress_user_data, callback, *user_data)¶
- Parameters:
query (
GData.QueryorNone) – aGData.Querywith the query parameters, orNonecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNoneprogress_callback (
GData.QueryProgressCallbackorNone) – aGData.QueryProgressCallbackto call when an entry is loaded, orNoneprogress_user_data (
objectorNone) – data to pass to the progress_callback functioncallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the query is finisheduser_data (
objectorNone) – data to pass to the callback function
Queries the service to return a list of contacts matching the given query. self and query are all reffed when this function is called, so can safely be unreffed after this function returns.
For more details, see
GData.ContactsService.query_contacts(), which is the synchronous version of this function, andGData.Service.query_async(), which is the base asynchronous query function.New in version 0.9.1.
- query_groups(query, cancellable, progress_callback, *progress_user_data)¶
- Parameters:
query (
GData.QueryorNone) – aGData.Querywith the query parameters, orNonecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNoneprogress_callback (
GData.QueryProgressCallbackorNone) – aGData.QueryProgressCallbackto call when an entry is loaded, orNoneprogress_user_data (
objectorNone) – data to pass to the progress_callback function
- Raises:
- Returns:
a
GData.Feedof query results; unref withGObject.Object.unref()- Return type:
Queries the service to return a list of groups matching the given query.
For more details, see
GData.Service.query().New in version 0.7.0.
- query_groups_async(query, cancellable, progress_callback, progress_user_data, callback, *user_data)¶
- Parameters:
query (
GData.QueryorNone) – aGData.Querywith the query parameters, orNonecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNoneprogress_callback (
GData.QueryProgressCallbackorNone) – aGData.QueryProgressCallbackto call when an entry is loaded, orNoneprogress_user_data (
objectorNone) – data to pass to the progress_callback functioncallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the query is finisheduser_data (
objectorNone) – data to pass to the callback function
Queries the service to return a list of groups matching the given query. self and query are all reffed when this function is called, so can safely be unreffed after this function returns.
For more details, see
GData.ContactsService.query_groups(), which is the synchronous version of this function, andGData.Service.query_async(), which is the base asynchronous query function.New in version 0.9.1.