Member State
The getMemberState
function is used to fetch the member state of the current user. It provides information about the user's status, creation timestamp, edit requirements, and more.
Steps to Get Member State
- Call
getMemberState()
function using the instance ofLMFeedClient
. - Process the response (LMResponse<GetMemberStateResponse>) as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// get response (LMResponse<InitiateUserResponse>)
val response = LMFeedClient.getInstance().getMemberState()
if (response.success) {
// your function to process the response data
processMemberStateResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}
Models
GetMemberStateResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
id | Int | ID of the user in community. | |
state | Int | Member State of the user in community. | |
userUniqueId | String | Unique ID of user. | |
customTitle | String | Custom title of the user in the community. | ✔ |
imageUrl | String | Download url of user image. | |
isGuest | Boolean | true if the user is a guest, false otherwise. | |
isOwner | Boolean | true if the user is the owner of the community, false otherwise. | |
name | String | Name of the user. | |
organisationName | String | Name of the organisation. | ✔ |
managerRights | List<ManagementRightPermissionData> | Manager Rights that are given to the user in the community. | ✔ |
memberRights | List<ManagementRightPermissionData> | Member Rights that are given to the user in the community. | |
updatedAt | Long | Timestamp when the user was last updated. | |
uuid | String | uuid of the user in community. |