README.md
# Extube
Extube is a wrapper for the hubtraffic API. It gathers data from multiple tube sites including
- [x] Pornhub
- [x] Redtube
- [ ] Tube8
- [x] Youporn
- [x] Xtube
- [ ] Spankwire
- [ ] Keezmovies
- [ ] Extremetube.
## Installation
The package can be installed by adding `extube` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:extube, "~> 0.4.0"}
]
end
```
The docs can be found at [https://hexdocs.pm/extube](https://hexdocs.pm/extube).
## Examples
Checking if a video is still active.
```elixir
iex(1)> Extube.Pornhub.is_video_active("ph5af5fef7c2aa7")
{:success,
%{"active" => %{"is_active" => "1", "video_id" => "ph5af5fef7c2aa7"}}}
```
Getting the video embed code from a video id.
```elixir
iex(7)> Extube.Redtube.get_video_embed_code("5453611")
{:success,
%{"embed" => %{"code" => "aHR0cHM6Ly9lbWJlZC5yZWR0dWJlLmNvbS8/aWQ9NTQ1MzYxMQ=="}}}
```