bundle install
You can generate a token here. It doesn't require any scope.
export GITHUB_ACCESS_TOKEN='xxxxxx'
rackup
rspec
Once the server is up head to http://localhost:9292/ and you will be able to search a username and will be presented with a webpage like this:
Alternatively you can do a GET request on:
http://localhost:9292/api/top?username=username_in_question
And receive a json payload like this:
{"status": "success", "languages": [{"language":"Ruby","bytes":168181}, {"language":"Java","bytes":122209}, {"language":"Vim script","bytes":78081}]}
If the status is "fail" there will be an error present, for example:
{"status": "fail", "error": "username is invalid"}