PHP code example of v1v2 / php-client

1. Go to this page and download the library: Download v1v2/php-client 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/ */

    

v1v2 / php-client example snippets




use V1V2\Client;
use V1V2\Security;

$client = new Client(
    new Security(),
    'your_api_key'
);

$result = $client->getTemperaturePiePlotsAllAge();

// gets all V1V2\PlotInterface plots from getTemperaturePiePlotsAllAge
$result->toArray(); 

// gets specific plot. see V1V2\PlotEnum for all available plots
$stage2Plot = $result->getByPlotType(\V1V2\PlotEnum::get(\V1V2\PlotEnum::PIE_TEMP_ALL_STAGE_2)); 
composer