UNITED REMOTE TEST (URT)
I'm in charge to build a REST microservice that list the languages used by the top trending public repos on GitHub.
Problem
Github API doesn't include anyway to get top 100 trending repos, they have a web page that can be found here and it only return 25 repos.
Solution
we could use scrapping and get elements from the web page but Luckily after some search i found a nice article
Structure
This project built using PHP Lumen Micro Framework and follow PSR
Features
The features currently implemented:
- list of languages used by the trending public repos on GitHub.
- Number of repos using this language.
- The list of repos using the language.
- Framework popularity over the 100 repos.(in progress)
- Secure the microservice.(in progress)
Installation
Clone reposotiry:
git clone https://github.com/malohtie/URT.git
Navigate to folder then install the dependencies using composer:
composer install
Start the local development server:
php -S localhost:8000 -t public
Navigate to http://localhost:8000/api/trending
and you should see your json result like this.
Unit tests
To run unit tests simply execute this command. Make sure you're in the project directory
/vendor/bin/phpunit