Skip to content

Use multiple url shorteners using a single gem. No signup required

Notifications You must be signed in to change notification settings

ronyv89/multi_shorten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Use multiple url shorteners with a single gem

Installation

gem install multi_shorten

Usage

Require the gem

require 'multi_shorten'

Instantiate the client

client = MultiShorten::Client.new

For single shortener apis

client.shorten({:mode => "single", :url => "http://www.google.com", :shortener => "b54"})

Sample response for this request

{:status => :success, :short_url => "http://b54.in/9o"}

For multiple apis

client.shorten({:mode => "multiple", :url => "http://www.google.com", :shorteners => ["b54", "qr_cx"]})

Sample response for this request

{"b54" => {:status => :fail }, "qr_cx" => {:status => :success, :short_url => "http://qr.cx/9o"}}

Available Shortener Codes

b54
linkee
goo_gl
is_gd
jumbo_tweet
meta_mark
mt_ny
qr_cx
shortr

Use the above codes to shorten your urls with the respective service

About

Use multiple url shorteners using a single gem. No signup required

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published