Aller au contenu principal
Version: 1.1.0

👤 User API

Access user and profile operations through AzeooSDK.shared.user. Available after connectUser succeeds.

Access​

val user: AzeooUser = AzeooSDK.shared.user

Methods (overview)​

  • getProfile() — Returns the current user profile (id, name, email, height, weight, etc.)
  • getId(), getName(), getEmail(), getHeight(), getWeight(), getGender() — Convenience accessors
  • updateProfile(data) — Updates profile; 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) — Feature access check

Exact signatures follow the Android SDK implementation. See the API Reference or SDK source for the current method list.

Example​

AzeooSDK.shared.connectUser(
token = jwt,
gender = user.gender,
height = user.height,
weight = user.weight,
) { profile, error ->
if (error != null) return@connectUser
val name = AzeooSDK.shared.user.getName()
val email = AzeooSDK.shared.user.getEmail()
AzeooSDK.shared.user.updateProfile(mapOf("name" to "New Name")) { updateResult ->
updateResult.onSuccess { updated -> /* ... */ }
}
}

Next steps​