Skip to content

lilfaf/vimeo.ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimeo.ex

Build Status Coverage Status Documentation Status

Usage

Installation

Add the following to your mix.exs

def application do
  [mod: {VimeoExample, []}, applications: [:vimeo]]
end

defp deps do
  [{:vimeo, "~> 0.0.2"}]
end

Configuration

Vimeo client will first look for application variables, then environment variables. This is useful if you want to set application variables locally and environment variables in production. That being said, I recommend using Dotenv locally.

config/dev.exs

config :vimeo,
  client_id: "YOUR_CLIENT_ID",
  client_secret: "YOUR_CLIENT_SECRET",
  access_token: "YOUR_ACCESS_TOKEN"

.env

VIMEO_CLIENT_ID=YOUR_CLIENT_ID
VIMEO_CLIENT_SECRET=YOUR_CLIENT_SECRET
VIMEO_ACCESS_TOKEN=YOUR_ACCESS_TOKEN

You can also configure these programatically at runtime if you wish:

iex> Vimeo.configure("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET", "YOUR_ACCESS_TOKEN")
iex> Vimeo.token("YOUR_ACCESS_TOKEN")

Usage

iex> Vimeo.Me.info
%Elixtagram.Resources.User{...}

All of the available methods and the ways to call them are in the docs

TODO

Work in progress, many things are missing:

  • Handle authentication
  • Handle uploads
  • Handle pagination
  • Improve documentation about Vimeo API query params and expected token scope

License

Vimeo.ex is licensed under the MIT License.