Get Feed Room
The getFeedRoom() function is used to retrieve information about feed rooms, including details about a specific feed room, a list of feed rooms, participant count, and an error message in case of failure.
Steps to Get Feed Room
Build a
GetFeedRoomRequestobject using theGetFeedRoomRequestBuilderclass.Call the
getFeedRoom()function using the instance of theLMFeedClientclass.Use the response as per your requirement.
// Build the request object
final GetFeedRoomRequest getFeedRoomRequest = (GetFeedRoomRequestBuilder()
..page(1)
..feedroomId(123))
.build();
// Get the response from calling the function
final GetFeedRoomResponse feedRoomResponse = await lmFeedClient.getFeedRoom(getFeedRoomRequest);
// Process the response, as per requirement
if(feedRoomResponse.success){
// your function to handle successful retrieval of feed room
handleFeedRoomSuccess(feedRoomResponse);
}else{
// your function to handle error message
handleFeedRoomError(feedRoomResponse.errorMessage);
}
tip
Fetching feed room information allows you to access details about a specific feed room, a list of feed rooms, participant count, and an error message in case of failure.
Models
GetFeedRoomRequest
List of parameters for the GetFeedRoomRequest class
| Variable | Type | Description | Optional |
|---|---|---|---|
| page | int | Page number for pagination | |
| feedroomId | int | ID of the feed room (if applicable) | ✔ |
GetFeedRoomResponse
List of parameters for the GetFeedRoomResponse class
| Variable | Type | Description | Optional |
|---|---|---|---|
| success | bool | API success status | |
| chatroom | FeedRoom | Details of the feed room (if applicable) | ✔ |
| participantCount | int | Number of participants in the feed room | |
| errorMessage | String | Error message in case of failure | ✔ |
| chatrooms | List<FeedRoom> | List of feed rooms (if applicable) | ✔ |