Giter Club home page Giter Club logo

github-contributions-api's Introduction

⚠️ [Deprecation Notice]

This repository is now deprecated and the code lives within it's parent project sallar/github-contributions-chart which uses Next.js and serverless functions to run it.

: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"
         },
         "30": {
           "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

github-contributions-api's People

Contributors

sallar avatar didericis avatar helderberto avatar konojunya avatar yukidaruma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.