Skip to main content

Get User Profile

To retrieve the user profile information in the LikeMinds Feed, use the getProfile() function.

Steps to Get User Profile​

  1. Build a GetProfileRequest object using the GetProfileRequestBuilder class.

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

  3. Use the response as per your requirement.

     // Provide user details for fetching the profile
    String userUniqueId = "user_unique_id_here";

    // Build the request object
    GetProfileRequest request = (GetProfileRequestBuilder()
    ..userUniqueId(userUniqueId))
    .build();

    // Get the response from calling the function
    final GetProfileResponse response = await lmFeedClient.getProfile(request);

    // Process the response, as per requirement
    if(response.success){
    // your function to process user profile
    processUserProfile(response);
    }else{
    // your function to process error message
    processError(response.errorMessage);
    }
tip

Fetching user profile provides detailed information about a specific user in the LikeMinds Feed.

Models​

GetProfileRequest​

List of parameters for the GetProfileRequest class

VariableTypeDescriptionOptional
userUniqueIdStringUnique ID of the user✔

GetProfileResponse​

List of parameters for the GetProfileResponse class

VariableTypeDescriptionOptional
successboolAPI success status
errorMessageStringError message in case of failure✔
communityNameStringName of the community✔
memberUserDetails of the member✔
menuList<MemberAction>List of member actions✔
questionAnswerList<QuestionAnswer>List of question answers✔
widgetsMap<String, WidgetModel>Map of widget models (key: widget ID)✔