User Profile Management
Pre-requisite: The user has to be signed in to perform the following operations.
Get User
To get the user profile information, the following method can be called.
InstaVision.userServices.getUser(
onSuccess = { user ->
// The user object contains the user profile information
},
onError = { error ->
// The error object contains the error code and message
}
)
Update User
To update the user profile information, the following method can be called.
request(required): The user profile update request object.
val updatedUser = UpdateUserRequest(
name = Name("John", "Doe") // The updated name of the user
)
InstaVision.userServices.updateUser(
request = updatedUser,
onSuccess = { user ->
// The user object contains the updated user profile information
},
onError = { error ->
// The error object contains the error code and message
}
)