Baz.VenueWebSockets (baz v0.0.17)

Link to this section Summary

Functions

Gets venue web sockets that match the where clause sorted by the order clause.

Gets a single venue web socket.

Link to this section Types

Link to this type

create_attrs()

@type create_attrs() :: map()
Link to this type

filter_and_order_opts()

@type filter_and_order_opts() :: [where_opt() | order_opt()]
@type order_opt() :: {:order, [atom()]}
@type slug_mask() :: String.t()
Link to this type

venue_name()

@type venue_name() :: Baz.Venues.Venue.name()
Link to this type

venue_web_socket()

@type venue_web_socket() :: Baz.VenueWebSockets.VenueWebSocket.t()
@type where_opt() :: {:where, [{atom(), term()}]}

Link to this section Functions

Link to this function

create_venue_web_socket(attrs)

@spec create_venue_web_socket(create_attrs()) ::
  {:ok, venue_web_socket()} | {:error, term()}
Link to this function

filter_and_order(opts)

@spec filter_and_order(filter_and_order_opts()) :: [venue_web_socket()]

Gets venue web sockets that match the where clause sorted by the order clause.

examples

Examples

iex> filter_and_order(where: [venue: "open_sea"], order: [desc: :venue])
[%EventStream{}]
Link to this function

get_venue_web_socket!(id)

@spec get_venue_web_socket!(term()) :: venue_web_socket()

Gets a single venue web socket.

Raises Ecto.NoResultsError if the VenueWebSocket does not exist.

examples

Examples

iex> get_venue_web_socket!(123)
%Collection{}

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

start_venue_web_socket(venue_name)

@spec start_venue_web_socket(venue_name()) :: :ok
Link to this function

subscribe_venue_web_socket(venue_name, slug_mask)

@spec subscribe_venue_web_socket(venue_name(), slug_mask()) :: :ok