Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README.txt
shurly_api_keys.inc
shurly_service.inc
shurly_service.info
shurly_service.install
shurly_service.module

README.txt

// $Id$

SHORTENING A URL:
-------------------------------
Default format is JSON:  
http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com

Text format returns just the short URL:
http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=txt

XML format:  
http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=xml

PHP serialized array:  
http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=php

JSONP takes (optional) additional "callback" argument to define function:  
http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=jsonp&callback=gimmeUrl

API Keys:  
Users can create API keys and use them to associate a shortening request with their account. Additionally, their roles will be honored and the associated rate limiting will be used.
http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&apiKey=84a29ac36f0507b7b98672a9d13a2e46_A

Additionally, a user's API key can be retrieved programmatically if the browser is logged in.
http://lb.cm/shurly/api/key


EXPANDING A URL:
-------------------------------
Works just as above, but returns expanded URL. All formats above are supported.
Here, the API key only modifies rate limiting.

http://lb.cm/shurly/api/expand?shortUrl=http://lb.cm/Zk5
Something went wrong with that request. Please try again.