Skip to content

PrzemyslawTusinski/GithubProxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Application follows belows criteria:

Acceptance criteria:

  1. As an api consumer, given username and header “Accept: application/json”, I would like to list all his github repositories, which are not forks. Information, which I require in the response, is: Repository Name Owner Login For each branch it’s name and last commit sha

  2. As an api consumer, given not existing github user, I would like to receive 404 response in such a format: { “status”: ${responseCode} “Message”: ${whyHasItHappened} }

  3. As an api consumer, given header “Accept: application/xml”, I would like to receive 406 response in such a format: { “status”: ${responseCode} “Message”: ${whyHasItHappened} }

Notes:

  • Please full-fill the given acceptance criteria, delivering us your best code compliant with industry standards.
  • Please use https://developer.github.com/v3 as a backing API
  • Please expose swagger
  • Application should have a proper README.md file
  • Add unit and integration test cases.
  • Prepare Dockerfile so that app can be run in a container
  • Make sure that data is downloaded in parallel, not in sequence
  • U can either use reactive stack of Your choice, or stick to non-reactive/blocking approach

Technologies to use (required):

  • Java
  • Maven
  • Spring Boot

To compile and package project run:

mvn compile

mvn package

To run app:

java -jar target/Github-0.0.1-SNAPSHOT.jar

To build and run as docker container use:

sudo docker build -t interview.project.github .

sudo docker run -p 8080:8080 interview.project.github

To url to api endpoint:

[HOST]:[PORT]/github_proxy/v1/repositories/[USER]

Swagger is exposed at url:

[HOST]:[PORT]/swagger-ui/index.html

Request limit

By defualt github api allows very limitted requests number. To increase this limit use github personal access token. To configure go to application.properites and set

use_personal_access_key=true

github.personal.access.key=[your token]

More info on https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published