UserClient

class UserClient(client: ApiClient)

Constructors

Link copied to clipboard
constructor(client: ApiClient)

Functions

Link copied to clipboard
suspend fun createUser(newUser: NewUser): Result<User>

This function registers a new user in the api. Note that, although called "create" because that is the intended use, the creation in the API is actually an upsert.

Link copied to clipboard
suspend fun fetchUser(token: String): Result<User>

This function fetches an existing user in the api.

Link copied to clipboard
suspend fun updateUser(user: ExistingUser): Result<User>

This function updates an existing user in the api. This can be done to update any existing data other than terms of service acceptance.