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
- Create a GetTaggingListRequest object using
GetTaggingListRequest.Builder
class by passing all the required parameters. - Call
getTaggingList()
function using the instance ofLMFeedClient
. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
searchName | String | Input text to search a member. | ✔ |
page | Int | Page number of paginated search data. | |
pageSize | Int | Page size for paginated search data. |
GetTaggingListResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
members | List<User> | List of the members. |