Services included at the moment:
Bit.ly (BitlyService)
J.mp (JmpService)
Is.gd (IsgdService)
Tr.im (TrimService);
import com.deviouswork.http.url.*; var us:URLShortener = new URLShortener(BitlyService); //Only needed for Bit.ly and J.mp us.service.version = '2.0.1'; us.service.login = 'bitlyapidemo'; us.service.key = 'R_0da49e0a9118ff35f52f629d2d71bf07'; //End Bit.ly/J.mp part us.shorten('http://www.deviouswork.com/labs/'); us.addEventListener(Event.COMPLETE, complete, false, 0, true); function complete(event:Event):void { us.removeEventListener(Event.COMPLETE, complete); trace(us.shortURL); } |
Update
Moved the package over to Github
http://github.com/deviouswork/URLshortener
Tagged: Bit.ly, Is.gd, J.mp, Tr.im, URL-shorteners