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
- Create a GetTaggingListRequest object using the builder pattern.
- Call the
getTaggingList()
function using the instance ofLMChatClient
, passing therequest
object and an optional response handler. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
chatroomId | String | ID of the chatroom for which the tagging list is retrieved | |
page | Int | Page number for pagination | |
pageSize | Int | Number of results per page | |
searchName | String? | Optional name to search for specific participants or members | ✔️ |
GetTaggingListResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
description | String? | Description of the group tag | ✔️ |
name | String? | Name of the group tag | ✔️ |
route | String? | Route to access the group tag | ✔️ |
tag | String? | Tag identifier | ✔️ |
imageUrl | String? | URL of the group tag's image | ✔️ |