Aller au contenu principal

User API

Access user and profile operations through AzeooSDK.shared.user. The user API is available after connect has been called successfully.

Access

val user: AzeooUser = AzeooSDK.shared.user

Methods (overview)

  • getProfile() — Returns the current user profile (id, name, email, height, weight, etc.); may be synchronous or callback-based depending on the implementation.
  • getId(), getName(), getEmail(), getHeight(), getWeight(), getGender() — Convenience accessors for profile fields.
  • updateProfile(data) — Updates profile with the given map; returns updated profile via callback.
  • refreshProfile() — Refetches profile from the server.
  • uploadImage(imageData) — Uploads profile image; returns URL via callback.
  • getSettings() / updateSettings(settings) — User settings.
  • hasAccess(featureId) — Checks if the user has access to a feature.

Exact signatures and async style (callbacks vs coroutines) follow the Android SDK implementation. See the API Reference or the SDK source for the current method list.

Example

AzeooSDK.shared.connect("user-123", token) { result ->
result.onSuccess { profile ->
val name = AzeooSDK.shared.user.getName()
val email = AzeooSDK.shared.user.getEmail()
// Update profile
AzeooSDK.shared.user.updateProfile(mapOf("name" to "New Name")) { updateResult ->
updateResult.onSuccess { updated -> /* ... */ }
}
}
}

Next steps