Add the following to your mix.exs
def application do
[mod: {VimeoExample, []}, applications: [:vimeo]]
end
defp deps do
[{:vimeo, "~> 0.0.2"}]
endVimeo 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_TOKENYou 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")iex> Vimeo.Me.info
%Elixtagram.Resources.User{...}All of the available methods and the ways to call them are in the docs
Work in progress, many things are missing:
- Handle authentication
- Handle uploads
- Handle pagination
- Improve documentation about Vimeo API query params and expected token scope
Vimeo.ex is licensed under the MIT License.