Search

interface Search

This module provides methods for conducting searches within Rainbow. Users can utilize methods provided in this module to perform various searches based on specific criteria.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface ISearchListener<T> : RainbowListener<T, Unit>

Interface for search listeners.

Properties

Link copied to clipboard
abstract val results: ArrayItemList<Any>

A list containing the results of the search operation. This list is continuously updated in real-time as soon as API returns results. Developers can subscribe to events on the list to receive notifications. The type of elements in the list can vary depending on the search operation.

Functions

Link copied to clipboard
abstract fun cancelPendingRequests()

Cancels all pending requests.

Link copied to clipboard
abstract fun clearResults()

Clears all search results.

Link copied to clipboard
abstract fun search(query: String, searchCriteria: SearchCriteria, searchListener: Search.ISearchListener<List<Any>>? = null)

Initiates a search operation with the specified query and search criteria. This method implements a delay of 500ms between consecutive calls to avoid overloading the server. If the method is called again within the 500ms delay period, the previous search task is cancelled.

Link copied to clipboard
abstract fun searchChannelByName(name: String?, listener: RainbowListener<List<Channel>, Unit>? = null)

Searches for channels by name.

Link copied to clipboard
abstract fun searchContactByName(    name: String?,     restrictToUserCompany: Boolean = false,     listener: RainbowListener<List<IRainbowContact>, Unit>? = null)

Searches for contacts by name.

Link copied to clipboard
abstract fun searchRoomByName(name: String?, listener: RainbowListener<List<IRainbowRoom>, Unit>? = null)

Searches for rooms by name.

Link copied to clipboard
abstract fun searchTextInConversation(conversation: IRainbowConversation?, query: String, searchListener: Search.ISearchListener<TextSearchInConversation?>? = null)

Searches for text within a conversation.