MediaPlug-Ruby

MediaPlug-Ruby is a Ruby wrapper for the MediaPlug (gomediaplug.com) REST API. It provides a simple, chainable API syntax for the construction of MediaPlug URLs.

Example

mp = MediaPlug.new("mp.yourserver.com")
mp.image('http://some.url', :jpg).resize('>100x>100').crop('100x100').to_s
# => http://mp.yourserver.com/mp/get?mpsrc=http%3A%2F%2Fsome.url&mpaction=resize%20width%3D%3E100%20height%3D%3E100%20format%3Djpg%3Bcrop%20location%3Dcenter%20width%3D100%20height%3D100%20format%3Djpg

Now Mediaplug2 server allows you to create shorten Url: Write down your access id from your profile in Mediaplug Mangement Portal:

mp = MediaPlug.new('video.gomediaplug.com', your_access_id)
mp.image('http://some.url', :jpg).resize('>100x>100').crop('100x100').shorten