Build statusVidex versionHex.pmInline docs

Videx

Videx is a simple video url parser for parsing and generating video urls.

Usage

Parse Youtube video url.

Videx.parse("https://www.youtube.com/watch?v=Hh9yZWeTmVM")
# %Videx.Youtube{id: "Hh9yZWeTmVM", params: %{}, type: :long}

Generate Youtube video url.

video = %Videx.Youtube{id: "Hh9yZWeTmVM"}
Videx.Youtube.generate(video, :long)
# "https://www.youtube.com/watch?v=Hh9yZWeTmVM"

Here is how you can convert Youtube video url to another format.

"https://www.youtube.com/watch?v=Hh9yZWeTmVM"
|> Videx.parse()
|> Videx.Youtube.generate(:short)
# "https://youtu.be/Hh9yZWeTmVM"

Installation

Add Videx to your mix.exs:

def deps do
  [
    {:videx, "~> 0.1.0"}
  ]
end

After that, run mix deps.get.

Features

Current Features or To-Do

License

Videx is under MIT license. Check the LICENSE file for more details.