projects

openExchangeRateCFC
instagramCFC
foursquareCFC
pastebinCFC
dribbbleCFC
textCounter
tumblrCFC
shrinkURL
Shrinkadoo
picasaCFC
Filler Text
52 Week Bible Planner
jQuery table filter
deep thoughts

you should

visit andyMatthews.net
follow me on Twitter

shrinkURL

shrinkURL was created out of a need to access the API of multiple URL shortening services. It's a small library which gathers the APIs of multiple services into one wrapper, which just one method to call for all.

Want to try it out? Head on over to Shrinkadoo

Documentation

  • Usage is as follows
  • Call the CFC:
    • <cfset shrinkURL = CreateObject('component','shrinkURL').init()>
  • Get a list of available services (currently 18 and counting):
    • <cfset services = shrinkURL.listServices()>
  • Call the service you'd like, passing in a packet of data such as URL, login, or password
  • Using the is.gd service
    • <cfset myURL = 'http://www.cnn.com'>
    • <cfset isGDData = StructNew()>
    • <cfset isGDData['longurl'] = myURL>
    • <cfset shortURL = shrinkURL.shrink('isGD',isGDData)>
  • Using the Snurl service
    • <cfset myURL = 'http://www.cnn.com'>
    • <cfset snurlData = StructNew()>
    • <cfset snurlData['snipuser'] = 'user'> // Snurl needs user and APIkey
    • <cfset snurlData['snipapi'] = 'apikey'>
    • <cfset snurlData['sniplink'] = myURL>
    • <cfset shortURL = shrinkURL.shrink('Snurl',snurlData)>
  • Returns a string
  • Current version is 0.6

Download project from RIAForge.org