Class: MultiShorten::MetaMark
- Inherits:
-
UrlShortener
- Object
- UrlShortener
- MultiShorten::MetaMark
- Defined in:
- lib/multi_shorten/url_shorteners.rb
Overview
URL Shortener for metamark
Class Method Summary collapse
Methods inherited from UrlShortener
Class Method Details
.shorten(url) ⇒ Object
103 104 105 106 107 108 109 110 |
# File 'lib/multi_shorten/url_shorteners.rb', line 103 def self.shorten url response = get "/api/rest/simple", :query => { :long_url => URI.encode(url)} if response.match("^http://xrl.us/.+") { :status => :success, :short_url => response.parsed_response } else fail end end |