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

Holodex Videos resource API module.

Includes client functions for interacting with the Video resource.

Link to this section Summary

Functions

Query videos from Holodex, optionally with given parameters.

Query videos from Holodex, optionally with given parameters.

Returns a single Video in a tuple, optionally with comments and recommendation.

Returns a single Video, optionally with comments and recommendations.

Link to this section Types

Specs

opts() ::
  %{
    channel_id: String.t() | nil,
    id: String.t() | nil,
    include: [binary()] | String.t() | nil,
    lang: String.t() | nil,
    limit: pos_integer() | nil,
    max_upcoming_hours: number() | nil,
    mentioned_channel_id: String.t() | nil,
    offset: integer() | nil,
    order: String.t() | nil,
    org: String.t() | nil,
    paginated: String.t() | nil,
    sort: String.t() | nil,
    status: String.t() | nil,
    topic: String.t() | nil,
    type: String.t() | nil
  }
  | %{}

Specs

single_opts() :: %{c: String.t() | nil, lang: String.t() | nil} | %{}

Link to this section Functions

See Holodex.Api.Videos.video_info/1.

See Holodex.Api.Videos.video_info/2.

See Holodex.Api.Videos.video_info!/1.

See Holodex.Api.Videos.video_info!/2.

Link to this function

list_videos(opts \\ %{})

View Source

Specs

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

Query videos from Holodex, optionally with given parameters.

Returns a tuple containing the response body or an error.

Link to this function

list_videos!(opts \\ %{})

View Source

Specs

list_videos!(opts()) :: [Holodex.Model.Video.t()] | no_return()

Query videos from Holodex, optionally with given parameters.

Raises an exception in case of failure.

Link to this function

video_info(video_id, opts \\ %{})

View Source

Specs

video_info(String.t(), single_opts()) ::
  {:ok, Holodex.Model.Video.t()}
  | {:error, HTTPoison.Error.t()}
  | {:error, Exception.t()}

Returns a single Video in a tuple, optionally with comments and recommendation.

Link to this function

video_info!(video_id, opts \\ %{})

View Source

Specs

video_info!(String.t(), single_opts()) :: Holodex.Model.Video.t()

Returns a single Video, optionally with comments and recommendations.

Raises an exception in case of failure.