Skip to main content

Get Explore FeedRooms

The getExploreFeedRooms() function is used to fetch the explore feed rooms based on the parameters provided in the GetExploreFeedRoomRequest, it return LMResponse<GetExploreFeedRoomResponse>.

Steps to Get Explore Feed Rooms

  1. Build a GetExploreFeedRoomRequest object using the GetExploreFeedRoomRequestBuilder class.

  2. Call the getExploreFeedRooms() function using an instance of the LMFeedClient class.

  3. Use the response (LMResponse<GetExploreFeedRoomResponse>) as per your requirement.

// Build the request object
final GetExploreFeedRoomRequest exploreFeedRoomRequest = (GetExploreFeedRoomRequestBuilder()
..page(1) // Replace with actual page number
..orderType(LMFeedRoomOrderType.newest) // Replace with actual order type
..type(1)) // Replace with actual type
.build();

// Get the response from calling the function
final LMResponse<GetExploreFeedRoomResponse> exploreFeedRoomResponse = await yourClient.getExploreFeedRooms(exploreFeedRoomRequest);

// Process the response, as per requirement
if (exploreFeedRoomResponse.success) {
// Your function to handle successful retrieval of explore feed rooms
handleExploreFeedRoomSuccess(exploreFeedRoomResponse);
} else {
// Your function to handle error message
handleExploreFeedRoomError(exploreFeedRoomResponse.errorMessage);
}

Models

GetExploreFeedRoomRequest

List of parameters for the GetExploreFeedRoomRequest class:

VariableTypeDescriptionOptional
pageintThe page number for paginationNo
orderTypeLMFeedRoomOrderTypeThe type of ordering for the roomsNo
typeintThe type of rooms to retrieve (default: 1)No

GetExploreFeedRoomResponse

List of parameters for the GetExploreFeedRoomResponse class:

VariableTypeDescriptionOptional
feedroomsList<FeedRoom>?List of feedrooms modelsYes
pinnedFeedroomsCountint?Count of pinned feedroomsYes
widgetsMap<String, WidgetModel>?Map of widget models (key: widget ID)Yes
postCountsMap<String, int>?Map of post counts (key: post ID)Yes