Skip to content

willcurry/favourite-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage Status Build Status

Setup

Install the gems:

bundle install

Set the required enviroment variables:

You can generate a token here. It doesn't require any scope.

export GITHUB_ACCESS_TOKEN='xxxxxx'

Run the project:

rackup

Run the tests:

rspec

The app

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:

alt text

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"}

About

An app that finds your most used language on GitHub.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published