kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

Upload video as unlisted #249

Open amHammock opened 9 years ago

amHammock commented 9 years ago

Hello, this is not really a BUG, but it was very difficult to track down and could be implemented and/or documented more clearly.

To upload a video as unlisted, the youtube_it call is:

vid = client.video_upload(File.open("myvideo.mp4"), :title => "My Video Title", :list=>'denied')

For private videos the option is :private => true. Everywhere in the YouTube API I see reference to one option privacyStatus that can be public, private, or unlisted. Finally found this solution after much googling about the YouTube API which revealed the yt:accessControl action="list" permission="denied" in the video XML resource, and browsing the youtube_it code that constructs the XML.

At the very least, this is now documented somewhere for someone else to find it :-)