Skip to main content

Tag Users

Enables users to mention and tag specific members within a post or a comment, notifying them and creating a link to their profile or relevant content.

Steps to get tagging list

  1. Create a GetTaggingListRequest object using GetTaggingListRequest.Builder class by passing all the required parameters.
  2. Call getTaggingList() function using the instance of LMFeedClient.
  3. Process the response (LMResponse<GetTaggingListResponse>) as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// object of GetTaggingListRequest
val getTaggingListRequest = GetTaggingListRequest.Builder()
.page(1) // page number for paginated data
.pageSize(20) // page size for paginated data
.searchName("Nipun") // text to search the user
.build()
// get response (LMResponse<GetTaggingListResponse>)
val response = LMFeedClient.getInstance().getTaggingList(getTaggingListRequest)
if (response.success) {
// your function to process the response dataa
processGetTaggingListResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}
tip

Use a debounce operator on search input to reduce unnecessary or duplicate search requests triggered by rapidly changing input.

Models

GetTaggingListRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
searchNameStringInput text to search a member.
pageIntPage number of paginated search data.
pageSizeIntPage size for paginated search data.

GetTaggingListResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
membersList<User>List of the members.