Skip to content
Nathaniel Kirby edited this page Jan 26, 2014 · 2 revisions

A helper BitlyLink object is available via

Bitly.link("http://bit.ly/1eOHYrA");

Available methods for a user's shortlink

All methods follow the same method signature: (params, callback), except link editing (see below)

Bitly.link("http://bit.ly/1eOHYrA").expand()

Bitly.link("http://bit.ly/1eOHYrA").getInfo()

Bitly.link("http://bit.ly/1eOHYrA").getClicks()

Bitly.link("http://bit.ly/1eOHYrA").getCountries()

Bitly.link("http://bit.ly/1eOHYrA").getEncoders()

Bitly.link("http://bit.ly/1eOHYrA").getEncodersByCount()

Bitly.link("http://bit.ly/1eOHYrA").getEncodersCount()

Bitly.link("http://bit.ly/1eOHYrA").getReferrers()

Bitly.link("http://bit.ly/1eOHYrA").getReferrersByDomain()

Bitly.link("http://bit.ly/1eOHYrA").getReferringDomains()

Bitly.link("http://bit.ly/1eOHYrA").getShares()

Link Editing

A simpler interface has been created for link editing (if you prefer the Bitly standard, use Bitly.userEditLink)

Bitly.link("http://bit.ly/1eOHYrA").edit({title:"New Title"}, callback)

Where the first parameter is a key-value object of changed values of the shortlink

More Info

For more information about the Bitly public API, visit dev.bitly.com

Clone this wiki locally