Skip to main content

Explore Feed

The Explore Feed is used to explore new chatrooms. You can follow the given steps to integrate this to your chat community.

Steps to fetch Explore Feed

  1. Create an object of the GetExploreFeedRequest class.
  2. For fetching Explore Feed call getExploreFeed() present in LMChatClient class using your request object.
  3. Process the response LMResponse<GetExploreFeedResponse> as per your requirement.
GetExploreFeedRequest request = (GetExploreFeedRequestBuilder()
..page(1)
..orderType(1)
..pinned(false))
.build();

LMResponse<GetExploreFeedResponse> response = await lmChatClient.getExploreFeed(request);

if(response.success){
// your function to process the response data
processResponse(response);
}else{
// your function to process error message
processError(response);
}

Models

GetExploreFeedRequest

VariableTypeDescriptionOptional
pageintpage number
orderTypeintFor ordering the chatroom list
pinnedboolTo filter list based on pinned chatrooms

GetExploreFeedResponse

VariableTypeDescriptionOptional
successboolapi success status
errorMessageStringerror log incase the api fails✔️
chatroomsList<ChatRoom>?List of chatrooms✔️
pinnedChatroomCountint?Count of pinned chatrooms✔️