Skip to main content

Connection Meta

The connectionMeta() function is used to retrieve user metadata, including follow status, follower count, and following count.

Steps to Get Connection Meta

  1. Build a ConnectionMetaRequest object using the ConnectionMetaRequestBuilder class.

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

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

     // Build the request object
    final ConnectionMetaRequest connectionMetaRequest =
    (ConnectionMetaRequestBuilder()..userUUID('user_id')).build();

    // Get the response from calling the function
    final LMResponse<ConnectionMetaResponse> connectionMetaResponse =
    await LMFeedCore.client.connectionMeta(connectionMetaRequest);

    // Process the response, as per requirement
    if (connectionMetaResponse.success) {
    // your function to handle successful retrieval of connection meta
    handleConnectionMetaSuccess(connectionMetaResponse);
    } else {
    // your function to handle error message
    handleConnectionMetaError(connectionMetaResponse.errorMessage);
    }

Models

ConnectionMetaRequest

List of parameters for the ConnectionMetaRequest class

VariableTypeDescriptionOptional
userUUIDStringUser ID of a user

ConnectionMetaResponse

List of parameters for the ConnectionMetaResponse class

VariableTypeDescriptionOptional
followStatusboolIndicates whether you follow the user
followersCountintNumber of the user's followers
followingsCountintNumber of people the user is following