searchColleagueProfiles

abstract suspend fun searchColleagueProfiles(query: String, maxResults: Int): List<ColleagueProfile>

Searches for colleague profiles within the organization.

Return

A list of ColleagueProfile objects matching the query. May be empty.

Parameters

query

The search query (e.g., name, department, skill).

maxResults

Maximum number of results to return.

Throws

if the search fails.

Android (Kotlin)

lifecycleScope.launch {
try {
val results = AFCore.profile().searchColleagueProfiles(query = "Wellness", maxResults = 5)
colleaguesAdapter.submitList(results)
} catch (t: Throwable) {
showError("Search failed: ${t.message}")
}
}

iOS (Swift)

Task {
do {
let results = try await AFCore.shared.profile().searchColleagueProfiles(query: "Wellness", maxResults: 5)
self.updateColleagueList(results)
} catch {
self.showError("Search failed: \\(error.localizedDescription)")
}
}