Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The official gem for interacting with Viddler's V2 API

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 autotest
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 viddler-ruby.gemspec


viddler-ruby is the officially supported gem for Viddler's V2 API.


$ gem install viddler-ruby

Rails 2

Add the following to your config/environment.rb:

config.gem 'viddler-ruby'

Make sure to run rake gems:install afterwards.

Rails 3 and Bundler

Add the following to your Gemfile:

gem 'viddler-ruby'

Make sure to run bundle install afterwards


To use in a regular Ruby project:

require 'rubygems'
require 'viddler-ruby'


viddler-ruby provides a simple interface to Viddler's API. To use, just instantiate an instance of Viddler::Client and call the #get and #post methods. For example, to get the details of a video:

viddler ='your api key')
video = viddler.get 'viddler.videos.getDetails', :video_id => 'abc123'

puts video['title'] # => "My video"
puts video['id']    # => "abc123"

For an authenticated client, just call authenticate! on the client:

viddler ='your api key')
viddler.authenticate! 'username', 'password'

Then, any calls made on viddler will be done using the correct session id.

If you want to record a video, you can request a record token during authentication:

viddler ='your api key')
viddler.authenticate! 'username', 'password', true
puts viddler.record_token   # => the record token from API

The API returns a record token that's available for you.


To upload a file, use the upload method:

viddler.upload('./'), {
  :title       => 'My video',
  :description => 'This video is awesome!',
  :tags        => 'awesome'
Something went wrong with that request. Please try again.