Project

isgd

0.0
No commit activity in last 3 years
No release in over 3 years
Accessing the isgd API through HTTPClient.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

isgd-rb

Build Status Gem Version

A Ruby wrapper for the isgd API utilizing HTTPClient

Installation

Ruby Gems

$ gem install isgd

Bundler

Add this line to your Gemfile:

gem('isgd')

And then execute:

$ bundle install

Standard usage

require 'isgd'

# Standard URL shortening
ISGD.shorten('http://google.com')
# => "http://is.gd/OwycZW"

# Standard URL lookups
ISGD.lookup('http://is.gd/OwycZW')
# => "http://google.com"

# Error messages too!
ISGD.shorten('http://google')
# => "Please enter a valid URL to shorten"
ISGD.lookup('http://')
# => "Sorry, we couldn't find the shortened URL you requested. The link you followed may be invalid, or an evil wizard may have cast a spell on our servers."

Documentation

RubyDoc or the in-code documentation.