View Source Bonfire.Me.Users.Queries (Bonfire v0.9.10-classic-beta.169)
Queries for Bonfire.Me.Users
Summary
Functions
Returns the query to list admin users.
Finds users by account ID.
Finds a user by canonical URI.
Gets a user by ID.
Finds a user by username or user ID and account ID.
Finds a user by username or ID.
Finds a user by username.
Callback implementation for Bonfire.Common.QueryModule.context_module/0
.
Counts the number of users.
Returns for the current user based on the user ID.
Returns for the current user based on the user ID and account ID.
Lists all users, or local or remote users, or users by instance ID.
Queries for a user based on the given filter.
Callback implementation for Bonfire.Common.QueryModule.schema_module/0
.
Searches for users based on a text string.
Functions
Returns the query to list admin users.
Finds users by account ID.
Examples
iex> Bonfire.Me.Users.Queries.by_account("account_id")
Finds a user by canonical URI.
Examples
iex> Bonfire.Me.Users.Queries.by_canonical_uri("canonical_uri")
Gets a user by ID.
Examples
iex> Bonfire.Me.Users.Queries.by_id("user_id")
Finds a user by username or user ID and account ID.
Examples
iex> Bonfire.Me.Users.Queries.by_user_and_account("username_or_user_id", "account_id")
Finds a user by username or ID.
Examples
iex> Bonfire.Me.Users.Queries.by_username_or_id("username_or_id")
Finds a user by username.
Examples
iex> Bonfire.Me.Users.Queries.by_username_query("username")
Callback implementation for Bonfire.Common.QueryModule.context_module/0
.
Counts the number of users.
Examples
iex> Bonfire.Me.Users.Queries.count(:all)
iex> Bonfire.Me.Users.Queries.count(:local)
iex> Bonfire.Me.Users.Queries.count(:remote)
Returns for the current user based on the user ID.
Examples
iex> Bonfire.Me.Users.Queries.current("user_id")
Returns for the current user based on the user ID and account ID.
Examples
iex> Bonfire.Me.Users.Queries.current("user_id", "account_id")
Lists all users, or local or remote users, or users by instance ID.
Examples
iex> Bonfire.Me.Users.Queries.list(:all)
iex> Bonfire.Me.Users.Queries.list(:local)
iex> Bonfire.Me.Users.Queries.list(:remote)
iex> Bonfire.Me.Users.Queries.list({:instance, "instance_id"})
Queries for a user based on the given filter.
Examples
iex> Bonfire.Me.Users.Queries.query(id: "some_id")
iex> Bonfire.Me.Users.Queries.query(username: "some_username")
iex> Bonfire.Me.Users.Queries.query(:invalid_filter)
{:error, "Could not query"}
Callback implementation for Bonfire.Common.QueryModule.schema_module/0
.
Searches for users based on a text string.
Examples
iex> Bonfire.Me.Users.Queries.search("userna")