Class: HeySpread::YouClone
- Inherits:
-
Object
- Object
- HeySpread::YouClone
- Defined in:
- lib/heyspread.rb
Overview
Export videos from a YouTube account to any other video sites
Export all the Youtube videos of a given account to Dailymotion:
export = YouClone.new
export.youtube_account = ["login", "password"]
export.destinations["dailymotion"] = ["login", "password"]
export.save
If you don’t set the destinations, you’ll use your saved Credentials
Instance Attribute Summary collapse
-
#destinations ⇒ Object
Returns the value of attribute destinations.
Instance Method Summary collapse
-
#initialize(destinations = {}) ⇒ YouClone
constructor
Set the destinations (including YouTube).
-
#save ⇒ Object
Export the videos of a YouTube account to any other video sites.
-
#youtube_account=(credentials = []) ⇒ Object
Set the YouTube account.
Constructor Details
Instance Attribute Details
#destinations ⇒ Object
Returns the value of attribute destinations.
420 421 422 |
# File 'lib/heyspread.rb', line 420 def destinations @destinations end |
Instance Method Details
#save ⇒ Object
Export the videos of a YouTube account to any other video sites
440 441 442 443 444 445 446 447 448 449 450 451 |
# File 'lib/heyspread.rb', line 440 def save credentials = {} if @destinations @destinations.each_pair do |site, c| credentials.merge!(site => "#{c[0]}:#{c[1]}") end end HTTP.post("/youclone", credentials) true end |
#youtube_account=(credentials = []) ⇒ Object
Set the YouTube account
export.youtube_account = ["login", "password"]
435 436 437 |
# File 'lib/heyspread.rb', line 435 def youtube_account=(credentials=[]) @destinations["youtube"] = credentials end |