Skip to content
A nodejs module for accessing the git.io URL shortner
JavaScript
Latest commit a747b40 Feb 21, 2016 @tanepiper let -> const
Failed to load latest commit information.
lib let -> const Feb 21, 2016
test Refactor out babel stuff because it's utter PITA Feb 21, 2016
.gitignore Add lib folder back in as we don't do compile step Feb 21, 2016
.npmignore
README.md Refactor out babel stuff because it's utter PITA Feb 21, 2016
package.json Refactor out babel stuff because it's utter PITA Feb 21, 2016

README.md

gitio

A Node.js module to call GitHub's git.io url shortener service.

Library Usage

const gitio = require('gitio');

// Pass a direct URL and get back a random URL
gitio('https://github.com/tanepiper/node-gitio').then(result => {
  console.log(result);
});

// Pass an optional key to get the URL of your request
gitio('https://github.com/joyent/node', 'nodejs').then(result => {
  console.log(result);
});

API

gitio(url, [code])

url

Type: string

The github.com URL to shorten.

code

Type: string

The shortened URL path.

Command line usage

Install and use from the command line. Takes a required github.com url, and an optional code as a second parameter.

> npm install -g gitio
> gitio https://github.com/tanepiper [tanepiper]
Something went wrong with that request. Please try again.