Last active
August 29, 2015 14:00
-
-
Save bulkan/11359213 to your computer and use it in GitHub Desktop.
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
var request = require('request') | |
, Promise = require('bluebird') | |
, getAsync = Promise.promisify(request.get); | |
module.exports.getProfile = function getProfile(username) { | |
return getAsync('https://api.github.com/users/' + username); | |
} |
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
{ | |
"name": "mocking_demo", | |
"version": "0.0.0", | |
"description": "", | |
"main": "gh.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "https://gist.github.com/11359213.git" | |
}, | |
"author": "Bulkan Evcimen <[email protected]>", | |
"license": "MIT", | |
"bugs": { | |
"url": "https://gist.github.com/11359213" | |
}, | |
"homepage": "https://gist.github.com/11359213", | |
"dependencies": { | |
"bluebird": "^1.2.4", | |
"chai": "^1.9.1", | |
"sinon": "^1.9.1", | |
"request": "^2.34.0", | |
"mocha": "^1.18.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment