Lumen package for test task
Install via composer
composer require aleksei4er/task-news-parserTASK_NEWS_PARSER_NEWSAPI_KEY=YOUR_KEYNAME (visit https://newsapi.org/)
TASK_NEWS_PARSER_TIMEOUT=15
TASK_NEWS_PARSER_NEWSAPI_URL=http://newsapi.org/v2/everything
TASK_NEWS_PARSER_KEYWORDS=bitcoin,litecoin,ripple,dash,ethereum (one article for each keyword by default)php artisan migrate$app->withFacades();
$app->withEloquent();$app->register(Aleksei4er\TaskNewsParser\ServiceProvider::class);
$app->register(Dingo\Api\Provider\LumenServiceProvider::class);You can create schedule for console command or run it manually
php artisan task:news-parserEndpoint to get articles
/api/articles
Also there are three kinds of grouping
/api/articles?groupBy=source /api/articles?groupBy=keyword /api/articles?groupBy=date
If you discover any security related issues, please email instead of using the issue tracker.
This package is bootstrapped with the help of melihovv/laravel-package-generator.