Skip to main content

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

  1. Build a JoinFeedRoomRequest object using the JoinFeedRoomRequestBuilder class.

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

  3. 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:

VariableTypeDescriptionOptional
feedRoomIdintThe unique identifier of the feed room.No
valuebooltrue to join the feed room, false to leave.No