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.ContactsService
structure 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.AuthorizationDomain
for interacting with Google Contacts. This will not normally need to be used, as it’s used internally by theGData.ContactsService
methods. However, if using the plainGData.Service
methods 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.Authorizer
orNone
) – aGData.Authorizer
to authorize the service’s requests, orNone
- Returns:
a new
GData.ContactsService
, orNone
; unref withGObject.Object.unref
()- Return type:
Creates a new
GData.ContactsService
using 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.ContactsContact
to insertcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, 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.ContactsContact
to insertcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when insertion is finisheduser_data (
object
orNone
) – 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.ContactsContact
representing 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.ContactsGroup
to create on the servercancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, 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.ContactsGroup
to insertcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when insertion is finisheduser_data (
object
orNone
) – 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.ContactsGroup
representing 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.Query
orNone
) – aGData.Query
with the query parameters, orNone
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
progress_callback (
GData.QueryProgressCallback
orNone
) – aGData.QueryProgressCallback
to call when an entry is loaded, orNone
progress_user_data (
object
orNone
) – data to pass to the progress_callback function
- Raises:
- Returns:
a
GData.Feed
of 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.Query
orNone
) – aGData.Query
with the query parameters, orNone
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
progress_callback (
GData.QueryProgressCallback
orNone
) – aGData.QueryProgressCallback
to call when an entry is loaded, orNone
progress_user_data (
object
orNone
) – data to pass to the progress_callback functioncallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the query is finisheduser_data (
object
orNone
) – 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.Query
orNone
) – aGData.Query
with the query parameters, orNone
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
progress_callback (
GData.QueryProgressCallback
orNone
) – aGData.QueryProgressCallback
to call when an entry is loaded, orNone
progress_user_data (
object
orNone
) – data to pass to the progress_callback function
- Raises:
- Returns:
a
GData.Feed
of 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.Query
orNone
) – aGData.Query
with the query parameters, orNone
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
progress_callback (
GData.QueryProgressCallback
orNone
) – aGData.QueryProgressCallback
to call when an entry is loaded, orNone
progress_user_data (
object
orNone
) – data to pass to the progress_callback functioncallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the query is finisheduser_data (
object
orNone
) – 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.