public
Description: Ruby library for the URL shortener service whit.me
Homepage: http://www.whit.me/api/docs
Clone URL: git://github.com/rubenfonseca/whitme.git
rubenfonseca (author)
Sat May 23 06:57:15 -0700 2009
commit  974795799b6ef80f3b49a5dee636a7c5b685fcf8
tree    74f6aa857d82dbdba62e0533c3e1d646de1c519d
parent  e28d6365ccb85750df6afadab245bdb6c330477f
whitme /
name age message
file .autotest Tue May 19 15:37:10 -0700 2009 Initial commit 2 [rubenfonseca]
file .document Tue May 19 13:29:06 -0700 2009 Initial commit to whitme. [rubenfonseca]
file .gitignore Tue May 19 13:29:06 -0700 2009 Initial commit to whitme. [rubenfonseca]
file LICENSE Tue May 19 13:29:06 -0700 2009 Initial commit to whitme. [rubenfonseca]
file README.rdoc Tue May 19 15:42:43 -0700 2009 Added docs and metadata [rubenfonseca]
file Rakefile Sat May 23 06:56:12 -0700 2009 Fixed json dependency (typo) [rubenfonseca]
file VERSION.yml Sat May 23 06:56:06 -0700 2009 Version bump to 1.1.1 [rubenfonseca]
directory lib/ Fri May 22 12:16:46 -0700 2009 Updated code to always use JSON responses [rubenfonseca]
directory spec/ Tue May 19 15:37:10 -0700 2009 Initial commit 2 [rubenfonseca]
file whitme.gemspec Sat May 23 06:57:15 -0700 2009 new gemspec 1.1.1 [rubenfonseca]
README.rdoc

whitme

whitme is a Ruby library for the URL shortener service whit.me

The whit.me URL service is available at whit.me and it’s API at www.whit.me/api/docs

Features

  • shortens and expands (multiple) URLs
  • 100% API features implemented
  • json (json-pure for JRuby) as the only external dependency
  • Ruby 1.8, 1.9 and JRuby compatible

Install

  $ gem sources -a http://gems.github.com
  $ sudo gem install rubenfonseca-whitme

Example

  require 'whitme'
  url = Whitme.short(:url => 'http://www.google.com', :note => 'foo')
  puts url.hash # the shortened URL

  url = Whitme.short(:url => ['http://google.com', 'http://sapo.pt'])
  puts url.hash # the shortened URL for multiple URLs

Copyright

Copyright © 2009 Ruben Fonseca. See LICENSE for details.