node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

waaai

travis

Setup

Use sudo npm -g install waaai to install the CLI program

CLI Usage

$ waaai https://github.com/underr/waaai/http://waa.ai/4giF

Private link: $ waaai http://yuruyuri.com/ -phttp://waa.ai/4gh7/9cf648

Custom link: $ waaai http://420.moe/ -c smokeeverydayhttp://waa.ai/smokeeveryday

Info from short code: $ waaai -i 4giF

API Usage

npm install waaai

var waaai = require('waaai');
// Using promises:
waaai.link({
  url: 'http://rei-ayanami.com/rei/',
  custom: 'ayanami-rei'
})
.then(function(result) {
  console.log(result) + '\n' // outputs http://waa.ai/ayanami-rei
});
 
// Or the hated yet traditional callbacks:
waaai.link({url: 'http://rei-ayanami.com/rei/'}, function(error, result) {
  if (!error) console.log(result)
});
 
// Get info from a short code
waaai.info('4iLm')
.then(function (result) {
  console.log(result)
});

Parameters for waaai.link

  • url: string (required)
  • custom: string
  • private: boolean

Python version

Here.