public
Description: Ruby wrapper for embedit.me
Homepage: http://embedit.me
Clone URL: git://github.com/reddavis/embedit_ruby.git
name age message
file .gitignore Loading commit data...
file README Wed Feb 25 15:46:24 -0800 2009 video upload/transcoding [reddavis]
file embedit_ruby.gemspec Mon Jan 26 17:21:08 -0800 2009 new embedit, new gem [reddavis]
directory lib/ Wed Mar 04 18:42:23 -0800 2009 xml is not sent through web hook, just the url ... [reddavis]
Embedit-Ruby-Wrapper
-------

Embedit (the original) is an embedding tool written in Ruby. Embedit is now a Web Service (Embedit.me) so this is a Ruby 
wrapper for that service

URL EMBEDDING

  Embedit-Ruby-Wrapper is extremely simple to use. You have the url? Just plonk it in here =>

  media = EmbeditRuby::Url.new('url', {:height => here, :width => here}, api_key(optional), frog_key(optional))
  
  
IMAGE UPOAD

  You can also upload images, just stick the path to the image here =>

  media = EmbeditRuby::Image.new("a_picture.png", api_key, frog_key, :height => 20, :width => 90)
  
  
VIDEO UPLOAD/TRANSCODING

  Last but not least, you can now upload videos which are then transcoded into flv. This is the process
  
  You upload the file like so
  a = EmbeditRuby::VideoUpload.new('video_path.mov', api_key, frog_key)
  
  You will be given an url
  a.url
    => http://embedit.me/videos/embed/zgryht
  
  Because the video has to go into a queue we can't give you the video info straight away.
  
  You can then get the video info by calling
  
  a = EmbeditRuby::VideoUploadEmbed.new("http://embedit.me/videos/embed/zgryht", :height => 23, :width => 99)
  
  If the video has not yet be transcoded the html that is returned is a 'currently transcoding image'
  
  A way to check if the video has been transcoded is to check the format of what is returned
  
  a = EmbeditRuby::VideoUploadEmbed.new("http://embedit.me/videos/embed/zgryht", :height => 23, :width => 99).format

Thats it!

At the time of writing, you now have the ability to call:
  media.title => Shows the title of whatever was uploaded
  media.format => The format of the file
  media.url => The url to the media
  media.html => The embed code, whether this is a generic flash player, a company player (Vimeo, Youtube), image tag and 
  more to come
  
  
  You can also validate an url (useful for a active record (or whatever you use) validation)
  media.valid? => Returns true or false