View Source MatrixAppService.Bridge (MatrixAppService v0.3.1)

This module is used when the library uses its own repo.

Link to this section Summary

Functions

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

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

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

Creates an event.

Creates a room.

Creates a user.

Deletes an event.

Deletes a room.

Deletes a user.

Gets a single event.

Gets a single room.

Gets a single user.

Returns the list of events.

Returns the list of rooms.

Returns the list of users.

Updates an event.

Updates a room.

Updates a user.

Link to this section Functions

Link to this function

change_event(event, attrs \\ %{})

View Source

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

examples

Examples

iex> change_event(event)
%Ecto.Changeset{data: %Event{}}
Link to this function

change_room(room, attrs \\ %{})

View Source

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

examples

Examples

iex> change_room(room)
%Ecto.Changeset{data: %Room{}}
Link to this function

change_user(user, attrs \\ %{})

View Source

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

examples

Examples

iex> change_user(user)
%Ecto.Changeset{data: %User{}}
Link to this function

create_event(attrs \\ %{})

View Source

Creates an event.

examples

Examples

iex> create_event(%{field: value})
{:ok, %Event{}}

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

create_room(attrs \\ %{})

View Source

Creates a room.

examples

Examples

iex> create_room(%{field: value})
{:ok, %Room{}}

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

create_user(attrs \\ %{})

View Source

Creates a user.

examples

Examples

iex> create_user(%{field: value})
{:ok, %User{}}

iex> create_user(%{field: bad_value})
{:error, %Ecto.Changeset{}}

Deletes an event.

examples

Examples

iex> delete_event(event)
{:ok, %Event{}}

iex> delete_event(event)
{:error, %Ecto.Changeset{}}

Deletes a room.

examples

Examples

iex> delete_room(room)
{:ok, %Room{}}

iex> delete_room(room)
{:error, %Ecto.Changeset{}}

Deletes a user.

examples

Examples

iex> delete_user(user)
{:ok, %User{}}

iex> delete_user(user)
{:error, %Ecto.Changeset{}}

Gets a single event.

Raises Ecto.NoResultsError if the Event does not exist.

examples

Examples

iex> get_event!(123)
%Event{}

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

get_event_by_local_id(local_id)

View Source
Link to this function

get_event_by_remote_id(remote_id)

View Source
Link to this function

get_events_by_local_id(local_id)

View Source
Link to this function

get_events_by_remote_id(remote_id)

View Source
Link to this function

get_last_event_in_room(room_id)

View Source

Gets a single room.

Raises Ecto.NoResultsError if the Room does not exist.

examples

Examples

iex> get_room!(123)
%Room{}

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

get_room_by_local_id(local_id)

View Source
Link to this function

get_room_by_remote_id(remote_id)

View Source

Gets a single user.

Raises Ecto.NoResultsError if the User does not exist.

examples

Examples

iex> get_user!(123)
%User{}

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

get_user_by_local_id(local_id)

View Source
Link to this function

get_user_by_remote_id(remote_id)

View Source

Returns the list of events.

examples

Examples

iex> list_events()
[%Event{}, ...]

Returns the list of rooms.

examples

Examples

iex> list_rooms()
[%Room{}, ...]

Returns the list of users.

examples

Examples

iex> list_users()
[%User{}, ...]
Link to this function

update_event(event, attrs)

View Source

Updates an event.

examples

Examples

iex> update_event(event, %{field: new_value})
{:ok, %Event{}}

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

update_room(room, attrs)

View Source

Updates a room.

examples

Examples

iex> update_room(room, %{field: new_value})
{:ok, %Room{}}

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

update_user(user, attrs)

View Source

Updates a user.

examples

Examples

iex> update_user(user, %{field: new_value})
{:ok, %User{}}

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

upsert_user(attrs, selectors)

View Source