YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  • Home
  • Gallery
  • Forums
  • YUI 2
  • YUI 3
  • YUI Compressor
  • YUI Doc
  • More
  • Gallery Forums
  • Gallery Stats
  • Gallery Calendar
  • Register
  • Login

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

html5 skinnable widget filter jsonp yui2 port ericf rgrove slideshow io foxxtrot overlay lsmith nzakas adam davglass plugin form event animation apipkin ajax caridy node jafl

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    bit.ly (gallery-bitly) on cdn

    Last Updated: 11/11/09
    + 1 -

    Dav Glass

    YUI Developer

    See 8 more by this user.

    Featured Item

    Created: 11/9/09
    Last CDN Push: 11/9/09
    Build Tag: gallery-2009.11.09-19
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.0.0
    Free for use.

    Module deals with the bit.ly api for shortening or expanding URL's.

    To use the bit.ly module, you must have a bit.ly username and apiKey. If you do not have an apiKey, sign up for a bitly account and go to your Account page to get your apiKey.

    This module supports the following bit.ly API's at version 2.0.1

    • shorten
    • expand
    • info
    • stats

    More information on the bit.ly API can be found here

    • Tags:
    • urlshorten
    • davglass
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    <script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2009.11.09-19'
    }).use('gallery-bitly', function(Y) {
     
        var b = new Y.bitly({
            //You must get your own to use this. See module description
            username: 'bitlyapidemo',
            key: 'R_0da49e0a9118ff35f52f629d2d71bf07'
        });
        //Event based
        b.on('shorten', console.log);
        b.on('expand', console.log);
        b.shorten('http://blog.davglass.com/');
     
        //Callback based
        b.shorten('http://blog.davglass.com/', function(e) {
            b.expandByURL(e.shortUrl, console.log);
            b.infoByHash(e.hash, console.info);
            b.statsByHash(e.hash, console.log);
        });
    });

    Forum Posts

    No forum posts for this module.

    YUI Projects
    • All YUI Downloads
    • YUI 2
    • YUI 3
    • YUI Doc
    • YUI Compressor
    • YUILibrary.com
    • YUI Build Tool
    • YUI PHP Loader
    Pages & Links
    • All YUI Downloads
    • Git FAQ
    • Graded Browser Support
    • Contribute to YUI
    • Forum Stats
    • Gallery Stats
    • YUI Calendar
    Contribute
    • Submit a Bug
    • Request a Feature
    • Write Code
    • Meet the Team
    Follow YUI
    • on GitHub
    • on Twitter
    • on FriendFeed
    • on Facebook
    • on IRC
    • YUI Blog
    • YUI Theater
    • YUI Forums

    © 2010 YUI Library - Site Credits