Skip to main content

Get Tagging List

Fetches a list of tags and members that can be used for tagging in a chatroom. This function retrieves the available group tags, chatroom participants, and community members based on the specified request.

Steps to get the tagging list

  1. Create a GetTaggingListRequest object using the builder pattern.
  2. Call the getTaggingList() function using the instance of LMChatClient, passing the request object and an optional response handler.
  3. Process the response LMResponse<GetTaggingListResponse> to handle the retrieved tags and members or any errors.
let request = GetTaggingListRequest.Builder()
.chatroomId("ENTER_CHATROOM_ID")
.page(1)
.pageSize(20)
.searchName("ENTER_NAME")
.build()

LMChatClient.shared.getTaggingList(request: request) { response in
if let result = response?.data {
// Handle success
print("Group Tags: \(result.groupTags)")
print("Chatroom Participants: \(result.chatroomParticipants)")
print("Community Members: \(result.communityMembers)")
} else if let error = response?.error {
// Handle error
print("Error fetching tagging list: \(error.localizedDescription)")
}
}

Models

GetTaggingListRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
chatroomIdStringID of the chatroom for which the tagging list is retrieved
pageIntPage number for pagination
pageSizeIntNumber of results per page
searchNameString?Optional name to search for specific participants or members✔️

GetTaggingListResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
groupTags[GroupTag]?List of group tags available for tagging✔️
chatroomParticipants[Member]?List of participants in the chatroom✔️
communityMembers[Member]?List of community members available for tagging✔️

GroupTag

VARIABLETYPEDESCRIPTIONOPTIONAL
descriptionString?Description of the group tag✔️
nameString?Name of the group tag✔️
routeString?Route to access the group tag✔️
tagString?Tag identifier✔️
imageUrlString?URL of the group tag's image✔️