Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2011
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # This shell script uploads a video to Vimeo Service.
  2. #
  3. # Usage :
  4. # $> ruby vimeo_upload.rb ~/my_video.avi
  5. # Video uploaded id = 2052244
  6. #
  7. # The video URL is then http://www.vimeo.com/2052244
  8. #
  9.  
  10. require "easy_vimeo_upload"
  11.  
  12. api_key = "YOUR_API_KEY"
  13. secret_key = "YOUR_SECRET_KEY"
  14. auth_token = "YOUR_TOKEN"
  15.  
  16. raise "You must provide a video file name in paramater !" if ARGV[0].nil?
  17.  
  18. vimeo_easy_upload = Vimeo::EasyVideoUpload.new(api_key, secret_key, auth_token)
  19. vimeo_easy_upload.post_video(ARGV[0])
  20.  
  21. puts "Video uploaded id = #{vimeo_easy_upload.video_id}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement