Using Shrt.st With HTTParty

I recently evaluated bunch of Ruby libraries for consuming webservices. One I liked most is is HTTParty. Love the syntax and elegance. Here is how you would shorten an URL with my favourite URL shortener shrt.st:

require 'rubygems'
require 'httparty'

class Shrtst
  include HTTParty
  base_uri 'api.shrt.st'

  def self.shorten(url)
    get( '/1.0/p/' + url)
  end
end

puts Shrtst.shorten('http://www.appelsiini.net/')

Hey Usual. How can I access this via API?

Tagged with: Estonia   Ruby  

Most read tags

Lazy Load   Ruby   AVR  
Electronics   JavaScript  
Jeditable   Maps   jQuery  
Facebook   HTML5   Lazy Load  
Estonia