AppwriteElixir.Services.Users (appwrite_elixir v0.1.2)
The Users service allows you to manage your project users. Use this service to search, block, and view your users' info, current sessions, and latest activity logs. You can also use the Users service to edit your users' preferences and personal info.
Link to this section Summary
Functions
Get a list of all the project's users. You can use the query params to filter your results.
Get a user by its unique ID.
Get a user activity logs list by its unique ID.
Get the user preferences by its unique ID.
Get the user sessions list by its unique ID.
Link to this section Types
log()
Specs
log() :: %{ event: String.t(), ip: String.t(), time: integer(), osCode: String.t(), osName: String.t(), osVersion: String.t(), clientType: String.t(), clientCode: String.t(), clientName: String.t(), clientVersion: String.t(), clientEngine: String.t(), clientEngineVersion: String.t(), deviceName: String.t(), deviceBrand: String.t(), deviceModel: String.t(), countryCode: String.t(), countryName: String.t(), current: boolean() }
session_list_object()
Specs
session_list_object() :: %{sum: integer(), sessions: List[session_object()]}
session_object()
Specs
session_object() :: %{ id: String.t(), userId: String.t(), expire: integer(), provider: String.t(), providerUid: String.t(), providerToken: String.t(), ip: String.t(), osCode: String.t(), osName: String.t(), osVersion: String.t(), clientType: String.t(), clientCode: String.t(), clientName: String.t(), clientVersion: String.t(), clientEngine: String.t(), clientEngineVersion: String.t(), deviceName: String.t(), deviceBrand: String.t(), deviceModel: String.t(), countryCode: String.t(), countryName: String.t(), current: boolean() }
user_object()
Specs
user_object() :: %{ id: String.t(), name: String.t(), registration: integer(), status: integer(), passwordUpdate: integer(), email: String.t(), emailVerification: boolean(), prefs: %{} }
$id: User ID.
name: User name.
registration: User registration date in Unix timestamp.
status: User status. 0 for Unactivated, 1 for active and 2 is blocked.
passwordUpdate: Unix timestamp of the most recent password update
email: User email address.
emailVerification: Email verification status.
prefs: User preferences as a key-value object
Link to this section Functions
get_all_users()
Specs
get_all_users() :: List[user_object()]
Get a list of all the project's users. You can use the query params to filter your results.
get_one_user(user_id)
Specs
get_one_user([{:id, String.t()}]) :: user_object()
Get a user by its unique ID.
get_user_logs(user_id)
Specs
Get a user activity logs list by its unique ID.
get_user_prefs(user_id)
Specs
get_user_prefs([{:id, String.t()}]) :: %{}
Get the user preferences by its unique ID.
get_user_sessions(user_id)
Specs
get_user_sessions([{:id, String.t()}]) :: session_list_object()
Get the user sessions list by its unique ID.