mywork / davidcyriltech /githubstalk.js
DeeCeeXxx's picture
Upload 199 files
6c07b9a verified
const axios = require('axios')
async function githubstalk(user) {
return new Promise((resolve, reject) => {
axios.get('https://api.github.com/users/'+user)
.then(({ data }) => {
let hasil = {
username: data.login,
nickname: data.name,
bio: data.bio,
id: data.id,
nodeId: data.node_id,
profile_pic: data.avatar_url,
url: data.html_url,
type: data.type,
admin: data.site_admin,
company: data.company,
blog: data.blog,
location: data.location,
email: data.email,
public_repo: data.public_repos,
public_gists: data.public_gists,
followers: data.followers,
following: data.following,
ceated_at: data.created_at,
updated_at: data.updated_at
}
resolve(hasil)
})
})
}
module.exports.githubstalk = githubstalk