Skip to content

Instantly share code, notes, and snippets.

@nicolasblanco
Created April 3, 2009 13:39
Show Gist options
  • Select an option

  • Save nicolasblanco/89750 to your computer and use it in GitHub Desktop.

Select an option

Save nicolasblanco/89750 to your computer and use it in GitHub Desktop.
# This shell script uploads a video to Vimeo Service.
#
# Usage :
# $> ruby vimeo_upload.rb ~/my_video.avi
# Video uploaded id = 2052244
#
# The video URL is then http://www.vimeo.com/2052244
#
require "easy_vimeo_upload"
api_key = "YOUR_API_KEY"
secret_key = "YOUR_SECRET_KEY"
auth_token = "YOUR_TOKEN"
raise "You must provide a video file name in paramater !" if ARGV[0].nil?
vimeo_easy_upload = Vimeo::EasyVideoUpload.new(api_key, secret_key, auth_token)
vimeo_easy_upload.post_video(ARGV[0])
puts "Video uploaded id = #{vimeo_easy_upload.video_id}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment