You are here

README.txt in ShURLy 6

Same filename and directory in other branches
  1. 8 shurly_service/README.txt
  2. 7 shurly_service/README.txt
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

File

shurly_service/README.txt
View source
  1. SHORTENING A URL:
  2. -------------------------------
  3. Default format is JSON:
  4. http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com
  5. Text format returns just the short URL:
  6. http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=txt
  7. XML format:
  8. http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=xml
  9. PHP serialized array:
  10. http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=php
  11. JSONP takes (optional) additional "callback" argument to define function:
  12. http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&format=jsonp&callback=gimmeUrl
  13. API Keys:
  14. 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.
  15. http://lb.cm/shurly/api/shorten?longUrl=http://www.lullabot.com&apiKey=84a29ac36f0507b7b98672a9d13a2e46_A
  16. Additionally, a user's API key can be retrieved programmatically if the browser is logged in.
  17. http://lb.cm/shurly/api/key
  18. EXPANDING A URL:
  19. -------------------------------
  20. Works just as above, but returns expanded URL. All formats above are supported.
  21. Here, the API key only modifies rate limiting.
  22. http://lb.cm/shurly/api/expand?shortUrl=http://lb.cm/Zk5