Contacts

inner class Contacts

Contact operations. Reached via contacts.

Functions

Link copied to clipboard
suspend fun create(webId: String, addressBookUri: String, data: ContactData, groupUris: List<String> = emptyList()): SolidContact?

Creates a contact from data, optionally adding it to groupUris.

Link copied to clipboard
suspend fun delete(webId: String, addressBookUri: String, contactUri: String): SolidContact?

Deletes the contact at contactUri (and its photo, if any).

Link copied to clipboard
suspend fun findByWebId(webId: String, targetWebId: String): ContactMatch?

Finds a contact by exact WebID — the duplicate check before adding someone.

Link copied to clipboard
suspend fun get(webId: String, contactUri: String): SolidContact?

Reads the contact at contactUri.

Link copied to clipboard
suspend fun getPhoto(webId: String, photoUri: String): ContactPhoto?

Reads a contact photo's bytes. Subject to the ~1 MB Binder transaction limit.

Link copied to clipboard
suspend fun list(webId: String, addressBookUri: String): SolidContactList?

Lists the contacts in the address book at addressBookUri.

Link copied to clipboard
suspend fun removePhoto(webId: String, contactUri: String): SolidContact?

Removes the contact's photo.

Link copied to clipboard
suspend fun setPhoto(webId: String, contactUri: String, photo: ByteArray, contentType: String): SolidContact?

Sets the contact's photo.

Link copied to clipboard
suspend fun update(webId: String, addressBookUri: String, contactUri: String, data: ContactData): SolidContact?

Rewrites the contact at contactUri from data with replace semantics: properties absent from data are removed.