Created
February 27, 2018 02:06
-
-
Save vmussak/fed0793143e4c6e7328041bb3e2f1feb 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
module.exports = { | |
buscarRepositoriosDo | |
} | |
const request = require('request-promise'); | |
async function buscarRepositoriosDo(user) { | |
const options = { | |
uri: `https://api.github.com/users/${user}/repos`, | |
headers: { | |
'User-Agent': 'Request-Promise' | |
}, | |
json: true | |
}; | |
let repositories = await request(options); | |
return repositories; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment