This Module can be used to retrieve all information about a given GitHub user within Hacktoberfest's event.
- Request
- Underscore
- Meow
npm install hacktoberfeststats
npx hacktoberfeststats MatejMecka # current year
npx hacktoberfeststats MatejMecka -y 2018
npx hacktoberfeststats MatejMecka --year 2018
const { getHacktoberfestStats } = require('hacktoberfeststats')
// Using Callbacks
getHacktoberfestStats("MatejMecka", "2018", function(hacktoberfestStats,error){
if (error) {
console.log(error.message)
} else {
console.log(hacktoberfestStats)
}
})
// Using Promises
getHacktoberfestStats('MatejMecka', '2018').then(stats => {
console.log(stats)
})
The callback function receives an object that contains these properties:
mainStats:
- Name: The person’s first name or username
- Completed: Is it Completed or Not. Returns a boolean
- Current: Integer - Number of pull requests
- Progress: How many pull requests a user has made: ex:
11/4
- Contributions: Repositories where the user did pull requests
- Required: The Number of required pull requests for that year. - Array with URL's linking to Pull Requests