This is a (slightly opinionated) client for the Melvin API by NDW. Please note that the Melvin API requires authentication, and we can't provide you with credentials.
Via Composer
composer require swisnl/melvin
N.B. Make sure you have installed a PSR-18 HTTP Client and PSR-17 HTTP Factories before you install this package or install one at the same time e.g. composer require swisnl/json-api-client guzzlehttp/guzzle:^7.3
.
We are decoupled from any HTTP messaging client with the help of PSR-18 HTTP Client and PSR-17 HTTP Factories.
This requires an extra package providing psr/http-client-implementation and psr/http-factory-implementation.
To use Guzzle 7, for example, simply require guzzlehttp/guzzle
:
composer require guzzlehttp/guzzle:^7.3
use Swis\Melvin\Client;
use Swis\Melvin\SituationFilterParameters;
$client = Client::create('username', 'password');
$params = (new SituationFilterParameters())->setAreaIds([409]);
$situations = $client->situations()->export($params);
foreach ($situations as $situation) {
// Do stuff with the situation
}
Please see CHANGELOG for more information on what has changed recently.
composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email security@swis.nl instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.