github-contributions-api icon indicating copy to clipboard operation
github-contributions-api copied to clipboard

Add method to return data for some years only

Open daniel08s opened this issue 6 years ago • 2 comments

Currently the API only gives the option of getting the information for all the years we've been registered.

When checking the chart for my contributions I noticed that I've had this account for a long time before really getting active, which causes the chart to be filled with 'blank' years.

I though about adding an option for an user to exclude certain years so I created this PR. Obviously, this would also require a change in the frontend project, but I haven't looked at it yet.

Let me know if you think this could be a valid thing, even if some changes are needed.

daniel08s avatar May 04 '18 19:05 daniel08s

Hi! This is a great idea. although the current function can be modified to have this. you could add a second argument to fetchYears function, so it filters out the blacklist before returning the values. what do you think?

sallar avatar May 04 '18 21:05 sallar

Only noticed now that you mentioned the fetchYears function and not the one I changed. I'll fix it.

daniel08s avatar May 04 '18 22:05 daniel08s