Using API Wrappers

November 28, 2013

This morning I continued to work on my longest streak app, the first one that I started, not the rails one. Today I installed the sequel gem and was able to start writing to my sqlite database.

I was trying to get the selected users url using octokit:

@c = Connection.new
user = @c.user 'oblakeerickson'
puts user.id
puts user.html_url

it returns the id just fine, but nothing shows up for the html_url? Not sure what is going on there, so for now I’m just going to assume that the html_url will be ‘https://github.com/#{username}’. But I also want to be able to get the gravatar url, so it just seems weird that none of the urls are showing up.

contributions_calendar_data only shows 1 year of data, so I’m not sure if I can use that anymore to calculate who actually has the longest streak. I’m still thinking I’m going to have to scrape each users profile page.