Created
December 15, 2010 17:20
-
-
Save kyleslattery/742292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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