View Source Bonfire.Social.Requests (Bonfire v0.9.10-classic-beta.169)
Handles social requests (e.g. follows requests), including creating, accepting, ignoring, and managing requests.
Summary
Functions
Accepts a request.
Retrieves all requests by object.
Retrieves all requests by subject.
Retrieves all request objects by subject.
Retrieves all requested outboxes by user and type.
Retrieves all subjects by object.
Checks if a request exists.
Retrieves a request by filters.
Retrieves a request.
Ignores a request.
Lists all requests made by the current user.
Lists all requesters for the current user.
Lists all requests made by the given user.
Lists all requesters for the given user.
Prepares a DB query based on filters and type.
Callback implementation for Bonfire.Common.ContextModule.query_module/0
.
Requests to do something, and federates it.
Retrieves a request.
Checks if a request has been made.
Callback implementation for Bonfire.Common.ContextModule.schema_module/0
.
Functions
Accepts a request.
Examples
iex> accept(request, opts)
{:ok, request}
Retrieves all requests by object.
Examples
iex> all_by_object(user, type, opts)
[{:ok, request}]
Retrieves all requests by subject.
Examples
iex> all_by_subject(user, type, opts)
[{:ok, request}]
Retrieves all request objects by subject.
Examples
iex> all_objects_by_subject(user, type, opts)
[object]
Retrieves all requested outboxes by user and type.
Examples
iex> all_requested_outboxes(user, type, opts)
[outbox_id]
Retrieves all subjects by object.
Examples
iex> all_subjects_by_object(user, type, opts)
[subject]
Checks if a request exists.
Examples
iex> exists?(subject, Follow, object, opts)
true
Retrieves a request by filters.
Examples
iex> get(filters, opts)
{:ok, request}
Retrieves a request.
Examples
iex> get(subject, Follow, object, opts)
{:ok, request}
Ignores a request.
Examples
iex> ignore(request, opts)
{:ok, request}
Lists all requests made by the current user.
Examples
iex> list_my_requested(opts)
[{:ok, request}]
Lists all requesters for the current user.
Examples
iex> list_my_requesters(opts)
[{:ok, requester}]
Lists all requests made by the given user.
Examples
iex> list_requested(user, opts)
[{:ok, request}]
Lists all requesters for the given user.
Examples
iex> list_requesters(user, opts)
[{:ok, requester}]
Prepares a DB query based on filters and type.
Examples
iex> query(filters, type, opts)
{:ok, query}
Callback implementation for Bonfire.Common.ContextModule.query_module/0
.
Requests to do something, and federates it.
Examples
iex> request(subject, Follow, object)
{:ok, request}
Retrieves a request.
Examples
iex> requested(request, current_user: me)
{:ok, request}
Checks if a request has been made.
Examples
iex> requested?(subject, type, object)
true
Callback implementation for Bonfire.Common.ContextModule.schema_module/0
.