WMURLShortener.js
URL Shortener using goo.gl.
Document
How to use
Browser
<script src="lib/WMURLShortener.js"></script>
<script>
new WMURLShortener().shorten(longUrl, function(err, shortUrl){
console.log(shortUrl);
});
</script>
WebWorkers
importScripts("lib/WMURLShortener.js");
new WMURLShortener().shorten(longUrl, function(err, shortUrl){
console.log(shortUrl);
});
Node.js
var WMURLShortener = require("lib/duxca.wmurlshortener.js");
new WMURLShortener().shorten(longUrl, function(err, shortUrl){
console.log(shortUrl);
});