GitHub portal is centered around organizations and repositories. Each organization has many repositories and each repository has many contributors. GithubRank application provides endpoint that given the name of the organization will return a list of contributors sorted by the number of contributions.
You need to have git
and sbt
installed on your OS.
$ git clone [email protected]:ivankliuk/githubrank.git && cd githubrank
(Optional) Obtain Github API token as described
here
and set GH_TOKEN
environment variable:
$ export GH_TOKEN=Github_API_token
To run the application locally:
$ sbt runProd
It will be listening on a socket address localhost:8080
.
Sample input:
$ time curl -i http://localhost:8080/org/scala/contributors
will return something like:
[
{
"contributions": 3154,
"login": "lrytz"
},
{
"contributions": 4145,
"login": "retronym"
},
{
"contributions": 4540,
"login": "adriaanm"
},
{
"contributions": 4689,
"login": "paulp"
},
{
"contributions": 5969,
"login": "SethTisue"
}
]
- Tests
- Logging
- Circuit breaker for
WSClient
- Streaming endpoint
- Throttling