PHP code example of eos / com-view-client

1. Go to this page and download the library: Download eos/com-view-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/ */

    

eos / com-view-client example snippets


$client = new Eos\ComView\Client\ComViewClient(
    $baseUrl, 
    $psrHttpClient,
    $psrUriFactory, 
    $psrRequestFactory, 
    $psrStreamFactory
);

$viewRequest = new Eos\ComView\Client\Model\ViewRequest(
    $viewName,      //string
    $headers,    //array
    $parameters,    //array
    $pagination,    //array
    $orderBy        //string|null
);
$response = $client->requestView($viewRequest);

  $commandRequest = new Eos\ComView\Client\Model\CommandRequest(
        [
            new Eos\ComView\Client\Model\Command(/*...*/),
            new Eos\ComView\Client\Model\Command(/*...*/),
        ],
        $headers // array
  );
 $response = $client->executeCommands($commandRequest);