:octocat: Github contributions API (bootleg)
Clone or download
Latest commit fb977f2 Sep 23, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix tweet url Sep 23, 2018
test Update text content Sep 23, 2018
.editorconfig API implementation Apr 29, 2018
.gitignore Ignore .DS_Store May 22, 2018
.npmignore Ignore large test files when installing as npm package May 22, 2018
.prettierrc API implementation Apr 29, 2018
.travis.yml Add travis May 24, 2018
CONTRIBUTING.md update README.md May 4, 2018
LICENSE Initial commit Apr 29, 2018
README.md update: README.md Sep 20, 2018
now.json Add tokens May 4, 2018
package-lock.json Fix security issues Sep 23, 2018
package.json 1.1.2 Sep 23, 2018

README.md

:octocat: Github Contributions API

GitHub license Build Status Dependency Status

A simple API that returns number of Github contributions based on a users Github profile. This API is used for generating an image of user contributions in this site

How to run

Install the packages using NPM:

$ npm install ./github-contributions-api

Or download as ZIP.

Example

Send a request to the API in the following format:

https://github-contributions-api.now.sh/v1/GITHUB_USERNAME

And you will receive an object with history of that user's contributions:

{
  ...
  "contributions": [
    {
      "date": "2018-04-30",
      "count": 2,
      "color": "#c6e48b"
    },
    {
      "date": "2018-04-29",
      "count": 29,
      "color": "#239a3b"
    },
    ...
  ]
}

You can return the results as an object keyed by year, month and day by using the format=nested query param:

https://github-contributions-api.now.sh/v1/GITHUB_USERNAME?format=nested
{
  ...
  "contributions": {
     "2018": {
       "4": {
         "29": {
           "date": "2018-04-29",
           "count": 29,
           "color": "#239a3b"
         },
         "39": {
           "date": "2018-04-30",
           "count": 2,
           "color": "#c6e48b"
         }
       },
    },
    ...
  }
}

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Changelog

Every release, along with the migration instructions, is documented on the Github Releases page.

License

MIT license © Sallar Kaboli