phonebook¶
ibox.phonebook in the library, ibox phonebook in the CLI.
On-device phone book.
add_contact ¶
Add a contact to the phonebook. Returns the contact's unique ID.
e.g.: contact = {"lastRevision": "0001-01-01T00:00:00Z", "name": "N:Hotline", "n": "N:Hotline;;;;", "formattedName": "Hotline", "birthDay": "0001-01-01T00:00:00Z", "title": "", "organisation": "", "url": "", "ringtone": "", "tags": "", "username": "", "vref": "", "etag": "", "syncedWithServer": "OutOfSync", "syncWithServer": False, "addresses": [], "labels": [], "telephoneNumbers": [ { "key": "1", "name": "0800800800", "type": "WORK", "preferred": False } ], "emails": [], "photos": [] }
modify_contact ¶
Change a phonebook contact. Fields you leave out stay as they are.
e.g.: contact = {"name": "N:Hotline", "formattedName": "Hotline", "telephoneNumbers": [ { "name": "0800800800", "type": "WORK", "preferred": False } ]}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
the contact's uniqueID, as listed by all_contacts(). |
required |
contact
|
dict
|
the fields to change, in the format of add_contact(). telephoneNumbers replaces all the contact's numbers. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
response content: status true, or false if no contact has this ID. |
delete_contact ¶
Delete a phonebook contact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
the contact's uniqueID, as listed by all_contacts(). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
response content: status true, or false if no contact has this ID. |