View Source Mobilizon.Medias (Mobilizon v5.0.0-beta.1)
The Media context.
Summary
Functions
Creates a media.
Deletes a media.
Get all media by an URL.
Gets a single media.
Gets a single media.
Raises Ecto.NoResultsError
if the media does not exist.
Get a media by its URL.
Calculate the sum of media size used by the user
Calculate the sum of media size used by the user
List the paginated media for user
Functions
@spec create_media(map()) :: {:ok, Mobilizon.Medias.Media.t()} | {:error, Ecto.Changeset.t()}
Creates a media.
Deletes a media.
@spec find_media_to_clean(Keyword.t()) :: [[Mobilizon.Medias.Media.t()]]
@spec get_all_media_by_url(String.t()) :: Mobilizon.Medias.Media.t() | nil
Get all media by an URL.
@spec get_media(integer() | String.t()) :: Mobilizon.Medias.Media.t() | nil
Gets a single media.
@spec get_media!(integer() | String.t()) :: Mobilizon.Medias.Media.t()
Gets a single media.
Raises Ecto.NoResultsError
if the media does not exist.
@spec get_media_by_url(String.t()) :: Mobilizon.Medias.Media.t() | nil
Get a media by its URL.
Calculate the sum of media size used by the user
Calculate the sum of media size used by the user
@spec medias_for_user(integer() | String.t(), integer() | nil, integer() | nil) :: Mobilizon.Storage.Page.t(Mobilizon.Medias.Media.t())
List the paginated media for user