Skip to content

Instantly share code, notes, and snippets.

@nadeesha
Last active August 29, 2015 14:14
Show Gist options
  • Save nadeesha/6fa481eaceaf96ef6394 to your computer and use it in GitHub Desktop.
Save nadeesha/6fa481eaceaf96ef6394 to your computer and use it in GitHub Desktop.
contibutors.js
'use strict';
var request = new XMLHttpRequest();
request.open('GET', 'https://api.github.com/repos/' + args[0] + '/contributors', true);
request.onreadystatechange = function()
{
if (request.readyState != 4)
return false;
var status = request.status;
//maybe not successful?
if (status != 200) {
stdout(status);
}
stdout(null, JSON.parse(request.responseText));
return true;
}
request.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment