Last active
August 29, 2015 14:14
-
-
Save nadeesha/6fa481eaceaf96ef6394 to your computer and use it in GitHub Desktop.
contibutors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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