# AgendaRx

class AgendaRx

Reactive API of Agenda.

This class replicates some of the methods included in Agenda but using Rx types as return values instead of callbacks.

## Properties

contactAdded
Link copied to clipboard
val contactAdded: Observable<Contact>

Emits when a Contact is added.

contactDeleted
Link copied to clipboard
val contactDeleted: Observable<Contact>

Emits when a Contact is removed.

contactUpdated
Link copied to clipboard
val contactUpdated: Observable<Contact>

Emits when a Contact gets updated.

## Functions

createContact
Link copied to clipboard
fun createContact(contact: Contact): Completable

Adds a new contact.

deleteContact
Link copied to clipboard
fun deleteContact(contact: Contact): Completable

Deletes the specified contact.

getContactBy
Link copied to clipboard
fun getContactBy(contactId: String): Single<Contact>

Fetch contact from the specified contactId.

getContactByUserName
Link copied to clipboard
fun getContactByUserName(userName: String): Single<Contact>

Retrieves a contact by their userName.

getContactByUserNameAndDomain
Link copied to clipboard
fun getContactByUserNameAndDomain(userName: String, domain: String): Single<Contact>

Retrieves a contact by their userName and associated domain.

getContacts
Link copied to clipboard
fun getContacts(query: SourceQuery): Single<List<Contact>>

Fetches all the contacts from the specified query.

getContactsByEmail
Link copied to clipboard
fun getContactsByEmail(email: String): Single<List<Contact>>

Fetches contacts from the specified email.

getContactsByUserId
Link copied to clipboard
fun getContactsByUserId(userId: String): Single<List<Contact>>

Fetches contacts from the specified userId.

resolveIdentifier
Link copied to clipboard
fun resolveIdentifier(identifier: String): Single<Contact>

Resolves an identifier to obtain a contact.

updateContact
Link copied to clipboard
fun updateContact(contact: Contact): Completable

Updates an existing contact.