View Source Claper.Embeds (Claper v1.7.0)

The Embeds context.

Link to this section Summary

Functions

Returns an %Ecto.Changeset{} for tracking embed changes.

Creates a embed.

Gets a single embed.

Gets a single embed for a given position.

Returns the list of embeds for a given presentation file.

Returns the list of embeds for a given presentation file and a given position.

Link to this section Functions

Link to this function

change_embed(embed, attrs \\ %{})

View Source

Returns an %Ecto.Changeset{} for tracking embed changes.

examples

Examples

iex> change_embed(embed)
%Ecto.Changeset{data: %Embed{}}
Link to this function

create_embed(attrs \\ %{})

View Source

Creates a embed.

examples

Examples

iex> create_embed(%{field: value})
{:ok, %Embed{}}

iex> create_embed(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function

delete_embed(event_uuid, embed)

View Source

Deletes a embed.

examples

Examples

iex> delete_embed("123e4567-e89b-12d3-a456-426614174000", embed)
{:ok, %Embed{}}

iex> delete_embed("123e4567-e89b-12d3-a456-426614174000", embed)
{:error, %Ecto.Changeset{}}
Link to this function

disable_all(presentation_file_id, position)

View Source
Link to this function

get_embed!(id, preload \\ [])

View Source

Gets a single embed.

Raises Ecto.NoResultsError if the Embed does not exist.

examples

Examples

iex> get_embed!(123)
%Embed{}

iex> get_embed!(456)
** (Ecto.NoResultsError)
Link to this function

get_embed_current_position(presentation_file_id, position)

View Source

Gets a single embed for a given position.

examples

Examples

iex> get_embed_current_position(123, 0)
%Embed{}
Link to this function

list_embeds(presentation_file_id)

View Source

Returns the list of embeds for a given presentation file.

examples

Examples

iex> list_embeds(123)
[%Embed{}, ...]
Link to this function

list_embeds_at_position(presentation_file_id, position)

View Source

Returns the list of embeds for a given presentation file and a given position.

examples

Examples

iex> list_embeds_at_position(123, 0)
[%Embed{}, ...]
Link to this function

set_status(id, presentation_file_id, position, status)

View Source
Link to this function

update_embed(event_uuid, embed, attrs)

View Source

Updates a embed.

examples

Examples

iex> update_embed("123e4567-e89b-12d3-a456-426614174000", embed, %{field: new_value})
{:ok, %Embed{}}

iex> update_embed("123e4567-e89b-12d3-a456-426614174000", embed, %{field: bad_value})
{:error, %Ecto.Changeset{}}