weboob.capabilities.contact

class weboob.capabilities.contact.ProfileNode(name, label, value, sufix=None, flags=0)

Bases: object

Node of a Contact profile.

HEAD = 1
SECTION = 2
class weboob.capabilities.contact.ContactPhoto(name, url=None)

Bases: weboob.capabilities.base.BaseObject

Photo of a contact.
Variables:
  • name – (unicode) Name of the photo
  • data – (str) Data of photo
  • thumbnail_url – (unicode) Direct URL to thumbnail
  • thumbnail_data – (str) Data of thumbnail
  • hidden – (bool) True if the photo is hidden on website
class weboob.capabilities.contact.Contact(id, name, status, url=None)

Bases: weboob.capabilities.contact.BaseContact

A contact.
Variables:
  • status – (int, long) Status of contact (STATUS_* constants)
  • status_msg – (unicode) Message of status
  • summary – (unicode) Description of contact
  • photos – (dict) List of photos (default: OrderedDict())
  • profile – (dict) Contact profile (default: OrderedDict())
STATUS_ALL = 4095
STATUS_AWAY = 2
STATUS_OFFLINE = 4
STATUS_ONLINE = 1
get_text()
set_photo(name, **kwargs)

Set photo of contact.

Parameters:
  • name (str) – name of photo
  • kwargs – See ContactPhoto to know what other parameters you can use
exception weboob.capabilities.contact.QueryError

Bases: weboob.capabilities.base.UserError

Raised when unable to send a query to a contact.

class weboob.capabilities.contact.Query(id, message, url=None)

Bases: weboob.capabilities.base.BaseObject

Query to send to a contact.
Variables:message – (unicode) Message received
class weboob.capabilities.contact.CapContact

Bases: weboob.capabilities.base.Capability

get_contact(id)

Get a contact from his id.

The default implementation only calls iter_contacts() with the proper values, but it might be overloaded by backends.

Parameters:id (str) – the ID requested
Return type:Contact or None if not found
get_notes(id)

Get personal notes about a contact

Parameters:id (str) – the ID of the contact
Return type:unicode
iter_contacts(status=4095, ids=None)

Iter contacts

Parameters:
  • status (Contact.STATUS_*) – get only contacts with the specified status
  • ids (list[str]) – if set, get the specified contacts
Return type:

iter[Contact]

save_notes(id, notes)

Set personal notes about a contact

Parameters:id (str) – the ID of the contact
Returns:the unicode object to save as notes
send_query(id)

Send a query to a contact

Parameters:id (str) – the ID of contact
Return type:Query
Raises:QueryError