Holodex.Api.Channels (holodex v0.1.3) View Source

Holodex Channel resource API module.

Includes client functions for interacting with the Channel resource.

Link to this section Summary

Functions

Get info about a particular channel by its Youtube channel ID.

Get info about a particular channel by its Youtube channel ID.

Get all channels from Holodex, optionally with given parameters.

Get all channels from Holodex, optionally with given parameters.

Link to this section Types

Specs

opts() ::
  %{
    lang: binary() | nil,
    limit: 0..50 | nil,
    offset: integer() | nil,
    order: binary() | nil,
    org: binary() | nil,
    sort: binary() | nil,
    type: binary() | nil
  }
  | %{}

Link to this section Functions

Specs

get_channel(String.t()) ::
  {:ok, Holodex.Model.Channel.t()}
  | {:error, HTTPoison.Error.t()}
  | {:error, Exception.t()}

Get info about a particular channel by its Youtube channel ID.

Returns a tuple containing the channel info or an error.

Link to this function

get_channel!(channel_id)

View Source

Specs

get_channel!(String.t()) :: Holodex.Model.Channel.t() | no_return()

Get info about a particular channel by its Youtube channel ID.

Raises an exception in case of failure.

Link to this function

list_channels(opts \\ %{})

View Source

Specs

list_channels(opts()) ::
  {:ok, [Holodex.Model.Channel.t()]}
  | {:error, HTTPoison.Error.t()}
  | {:error, Exception.t()}

Get all channels from Holodex, optionally with given parameters.

Returns a tuple containing the response body or an error.

Link to this function

list_channels!(opts \\ %{})

View Source

Specs

list_channels!(opts()) :: [Holodex.Model.Channel.t()] | no_return()

Get all channels from Holodex, optionally with given parameters.

Raises an exception in case of failure.