Speeding Things Up

December 4, 2013

I’m still having a hard time parsing each users profile page for the longest streak value, so with help from John Otaner I’m going to now just calculate their contributions for the year and if they happen to be equal to 365 then I will parse their profile page. This should speed things up dramatically.

Here is what I have started, but I still need to calculate the streak for the year from the javascript array that this url returns:

def calendar_data(username)
  open("https://github.com/users/#{username}/contributions_calendar_data").read
end

I also wonder what it would take to add the contributions_calendar_data to the GitHub API and Octokit?