Skip to content

Instantly share code, notes, and snippets.

@kyleslattery
Created December 15, 2010 17:20
Show Gist options
  • Save kyleslattery/742292 to your computer and use it in GitHub Desktop.
Save kyleslattery/742292 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'viddler-ruby'
# Create the client and authenticate it
viddler = Viddler::Client.new 'YOUR API KEY'
viddler.authenticate! 'USERNAME', 'PASSWORD'
# Simple API for calling GET, POST, and uploading a file:
viddler.get 'viddler.playlists.getByUser', :user => 'kyleslat'
viddler.post 'viddler.playlists.create', :name => 'My super awesome playlist'
viddler.upload File.open('mymovie.avi'), :title => 'Ruby Upload',
:description => "I love Ruby!",
:tags => "ruby, viddler"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment