Join FeedRoom
The joinFeedRoom()
function is used to follow or unfollow a feed room based on the parameters provided in the JoinFeedRoomRequest
. It returns an LMResponse<void>
.
Steps to Join or Unfollow a Feed Room
Build a
JoinFeedRoomRequest
object using theJoinFeedRoomRequestBuilder
class.Call the
joinFeedRoom()
function using an instance of theLMFeedClient
class.Use the response
(LMResponse<void>)
as per your requirement.
// Build the request object
final JoinFeedRoomRequest joinFeedRoomRequest = (JoinFeedRoomRequestBuilder()
..feedRoomId("ENTER_FEEDROOM_ID") // Replace with the actual feed room ID
..value(true)) // Replace with true to follow or false to unfollow
.build();
// Get the response from calling the function
final LMResponse<void> joinFeedRoomResponse = await yourClient.joinFeedRoom(joinFeedRoomRequest);
// Process the response, as per requirement
if (joinFeedRoomResponse.success) {
// Your function to handle successful join/unfollow action
handleJoinFeedRoomSuccess();
} else {
// Your function to handle error message
handleJoinFeedRoomError(joinFeedRoomResponse.errorMessage);
}
Models
JoinFeedRoomRequest
The JoinFeedRoomRequest
class represents the parameters required to follow or unfollow a feed room. Below are the details of the JoinFeedRoomRequest
model:
Variable | Type | Description | Optional |
---|---|---|---|
feedRoomId | int | The unique identifier of the feed room. | No |
value | bool | true to join the feed room, false to leave. | No |