tub_ex v0.0.11 TubEx.Video

Provide access to the /videos are of YouTube API

Summary

Types

t()

Type that represents TubEx.Video struct

Functions

Fetch contents details

Returns a list of videos that match the API request parameters

Search from youtube via query

Types

t()
t() :: %TubEx.Video{channel_id: charlist, channel_title: charlist, description: charlist, etag: charlist, published_at: charlist, thumbnails: charlist, title: charlist, video_id: charlist}

Type that represents TubEx.Video struct.

Functions

detail(video_id)
detail(charlist) :: {atom, TubEx.Video.t}

Fetch contents details

Example:

iex> TubEx.Video.detail("_J4QPz52Sfo")
{ :ok, %TubEx.Video{} }
search_by_query(query, opts \\ [])
search_by_query(charlist, Keyword.t) :: {atom, [TubEx.Video.t], map}

Search from youtube via query.

Examples

Get videos by query:

iex> TubEx.Video.search_by_query("_J4QPz52Sfo")
{ :ok, [%TubEx.Video{}, ...], meta_map }

Custom query parameters:

iex> TubEx.Video.search_by_query("_J4QPz52Sfo", [
  paramKey: paramValue,
  ...
])
{ :ok, [%TubEx.Video{}, ...], meta_map }