UserApiClient
Functions
Link copied to clipboard
Link copied to clipboard
abstract suspend fun getAccountData(type: String, userId: UserId, key: String = ""): Result<GlobalAccountDataEventContent>
Link copied to clipboard
inline suspend fun <C : GlobalAccountDataEventContent> UserApiClient.getAccountData(userId: UserId, key: String = ""): Result<C>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract suspend fun <T : ProfileField> getProfileField(userId: UserId, key: ProfileField.Key<T>): Result<T>
Link copied to clipboard
Link copied to clipboard
abstract suspend fun searchUsers(searchTerm: String, acceptLanguage: String, limit: Long? = 10): Result<SearchUsers.Response>
Link copied to clipboard
abstract suspend fun sendToDevice(events: Map<UserId, Map<String, ToDeviceEventContent>>): Result<Unit>
This splits events into multiple requests, when they have a different type (for example a mix of encrypted and unencrypted events).
Link copied to clipboard
abstract suspend fun <C : ToDeviceEventContent> sendToDeviceUnsafe(events: Map<UserId, Map<String, C>>, transactionId: String = Random.nextString(22)): Result<Unit>
abstract suspend fun sendToDeviceUnsafe(type: String, events: Map<UserId, Map<String, ToDeviceEventContent>>, transactionId: String = Random.nextString(22)): Result<Unit>
Link copied to clipboard
abstract suspend fun setAccountData(content: GlobalAccountDataEventContent, userId: UserId, key: String = ""): Result<Unit>
Link copied to clipboard
Link copied to clipboard