AppwriteElixir.Services.Users (appwrite_elixir v0.1.1)

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

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()
}
Link to this type

session_list_object()

Specs

session_list_object() :: %{sum: integer(), sessions: List[session_object()]}
Link to this type

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()
}
Link to this type

user_object()

Specs

user_object() :: %{
  id: String.t(),
  name: String.t(),
  registration: integer(),
  status: integer(),
  passwordUpdate: integer(),
  email: String.t(),
  emailVerification: boolean(),
  prefs: %{}
}

Link to this section Functions

Link to this function

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.

Link to this function

get_one_user(user_id)

Specs

get_one_user([{:id, String.t()}]) :: user_object()

Get a user by its unique ID.

Link to this function

get_user_logs(user_id)

Specs

get_user_logs([{:id, String.t()}]) :: List[log()]

Get a user activity logs list by its unique ID.

Link to this function

get_user_prefs(user_id)

Specs

get_user_prefs([{:id, String.t()}]) :: %{}

Get the user preferences by its unique ID.

Link to this function

get_user_sessions(user_id)

Specs

get_user_sessions([{:id, String.t()}]) :: session_list_object()

Get the user sessions list by its unique ID.