##Overview Jquery URL Shortener plugin using Google URL Shortener API
jQuery.urlShortener.settings.apiKey='YOUR_API_KEY___________';
jQuery.urlShortener({
longUrl: "http://hayageek.com/jquery-url-shortener/",
success: function (shortUrl) {
//shortUrl -> Shortened URL
},
error: function(err)
{
alert(JSON.stringify(err));
}
});
jQuery.urlShortener({
shortUrl: shortUrlLink,
success: function (longURL) {
//longURL -> original URL
},
error: function(err)
{
alert(JSON.stringify(err));
}
});
jQuery.urlShortener({
shortUrl: shortUrlLink,
projection: "FULL",
success: function (info) {
},
error: function(err)
{
alert(JSON.stringify(err));
}
});
Projection types: FULL,ANALYTICS_CLICKS,ANALYTICS_TOP_STRINGS