PHP code example of swisnl / melvin

1. Go to this page and download the library: Download swisnl/melvin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

swisnl / melvin example snippets


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
}