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
Build a
GetExploreFeedRoomRequest
object using theGetExploreFeedRoomRequestBuilder
class.Call the
getExploreFeedRooms()
function using an instance of theLMFeedClient
class.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:
Variable | Type | Description | Optional |
---|---|---|---|
page | int | The page number for pagination | No |
orderType | LMFeedRoomOrderType | The type of ordering for the rooms | No |
type | int | The type of rooms to retrieve (default: 1) | No |
GetExploreFeedRoomResponse
List of parameters for the GetExploreFeedRoomResponse
class:
Variable | Type | Description | Optional |
---|---|---|---|
feedrooms | List<FeedRoom >? | List of feedrooms models | Yes |
pinnedFeedroomsCount | int? | Count of pinned feedrooms | Yes |
widgets | Map<String, WidgetModel>? | Map of widget models (key: widget ID) | Yes |
postCounts | Map<String, int>? | Map of post counts (key: post ID) | Yes |