View Source Bonfire.Quantify.Units (Bonfire v0.9.10-classic-beta.156)

Summary

Functions

Link to this function

ap_publish_activity(subject, activity_name, thing)

View Source
Link to this function

ap_receive_activity(creator, activity, object)

View Source
@spec create(any(), attrs :: map()) ::
  {:ok, Bonfire.Quantify.Unit.t()} | {:error, Changeset.t()}
Link to this function

create(creator, context, attrs)

View Source
@spec create(any(), context :: any(), attrs :: map()) ::
  {:ok, Bonfire.Quantify.Unit.t()} | {:error, Changeset.t()}

Callback implementation for Bonfire.Federate.ActivityPub.FederationModules.federation_module/0.

Link to this function

get_or_create(unit, user \\ nil)

View Source

Retrieves a list of collections by arbitrary filters. Used by:

  • Various parts of the codebase that need to query for collections (inc. tests)

Retrieves a single collection by arbitrary filters. Used by:

  • Item queries
  • ActivityPub integration
  • Various parts of the codebase that need to query for collections (inc. tests)
@spec update(
  %Bonfire.Quantify.Unit{
    __meta__: term(),
    context: term(),
    context_id: term(),
    creator: term(),
    creator_id: term(),
    deleted_at: term(),
    disabled_at: term(),
    id: term(),
    is_disabled: term(),
    is_public: term(),
    label: term(),
    published_at: term(),
    symbol: term(),
    updated_at: term()
  },
  attrs :: map()
) :: {:ok, Bonfire.Quantify.Unit.t()} | {:error, Changeset.t()}