HeySpread Ruby Library

Install

Rubygems:
sudo gem install sadikzzz-heyspread-ruby -s http://gems.github.com
Git: (Github)
git clone git://github.com/sadikzzz/heyspread-ruby.git
Tarball:

https://github.com/sadikzzz/heyspread-ruby/tarball/master

Usage

Upload a video to YouTube and Google Video

HeySpread::Account.api_key = "api_key"

video = HeySpread::Video.new(
  :title => "HS test", 
  :category => "Comedy",
  :tags => "heyspread tag testing",
  :file => "/home/user/video.avi",
  :description => "Test the HeySpread API"
)

video.destinations["youtube"] = ["login", "password"]
video.destinations["google"]  = ["email", "password"]

video.upload

Save YouTube credentials

HeySpread::Credentials.save(
  :site => "youtube", 
  :login => "testyt",
  :password => "test"
)

Track videos

track = Track.new
track.video_urls << "http://youtube.com/watch?v=fsdfsd"
track.video_urls << "http://dailymotion.com/video/xefds"
video = track.save