Information card of the Russian Federation Agriculture Ministry as Symfony Bundle
MIT License
Summary information on the Ministry of Agriculture of the Russian Federation as a Symfony bundle that provides a REST API URL with response in json format.
Default URL: /bundle/mcx/info/index
All data was obtained from the public Internet resource of the ministry.
Some of the response content can be manipulated:
The app
directory contains ready-to-use files,
which need to be moved to the appropriate directories
your project, which will lead to the completion of the default information.
The output can be show in two formats:
{
"title": "Министерство сельского хозяйства Российской Федерации",
"description": "Федеральный орган исполнительной власти...",
"address": "107996, Москва, Орликов переулок, 1\/11",
"site": "https:\/\/mcx.gov.ru",
"contacts": [
"Тел.: +7 (495) 607-80-00",
"Факс: +7 (495) 607-83-62",
"[email protected]"
],
"persons": [
[
"Патрушев Дмитрий Николаевич",
"Министр сельского хозяйства Российской Федерации",
"[email protected]",
"Тел.: +7 (495) 607-80-00",
"Факс: +7 (495) 607-83-62"
],
[
"..."
]
]
}
URL setting
# connecting config with route
reiterus_mcx_info:
resource: '@McxInfoBundle/Resources/config/routes.xml'
prefix: /bundle/mcx/info
Package setup
# adding contacts and formatting the output
reiterus_mcx_info:
contacts:
- 'Тел.: +7 (495) 607-80-00'
- 'Факс: +7 (495) 607-83-62'
- '[email protected]'
pretty: true
# addition of personalities through a service with a specific tag
services:
app.reiterus_mcx_info_persons:
class: App\Util\McxPersons
tags:
- { name: 'tag_mcx_info_persons' }
You can install the bundle in two ways
From packagist.org
composer require reiterus/mcx-info-symfony
From GitHub repository
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/reiterus/mcx-info-symfony.git"
}
]
}
To run tests with visual code coverage, launch the command as follows:
XDEBUG_MODE=coverage ./vendor/phpunit/phpunit/phpunit \
--configuration phpunit.xml \
--testsuite default \
--coverage-html coverage/
Test results will be saved in the coverage
directory.
Tip: vendor/bin/phpunit --generate-configuration
This library is released under the MIT license.