Class: MultiShorten::JumboTweet
- Inherits:
-
UrlShortener
- Object
- UrlShortener
- MultiShorten::JumboTweet
- Defined in:
- lib/multi_shorten/url_shorteners.rb
Overview
URL Shortener for Jumbo Tweet
Class Method Summary collapse
Methods inherited from UrlShortener
Class Method Details
.shorten(url) ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'lib/multi_shorten/url_shorteners.rb', line 89 def self.shorten url response = get "/api/create", :query => { :newurl => URI.encode(url)} if response.match("^http://jmb.tw/.+") { :status => :success, :short_url => response.parsed_response } else fail end end |