PHP code example of plotkabytes / vercom-api-php-client

1. Go to this page and download the library: Download plotkabytes/vercom-api-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/ */

    

plotkabytes / vercom-api-php-client example snippets




// Use composer autoloader
erface;
use Plotkabytes\RedlinkApi\Utils\ResponseTransformer;

// Create client
$client = new \Redlink\DefaultClient();

// Setup authentication
$client->setAuthentication("ENTER_API_KEY_HERE", "ENTER_APPLICATION_KEY_HERE"); // authentication v2

// Do something
$response = $client->groups()->list();

// Optional, transform response to objects
$responseTransformer = new ResponseTransformer();

/**
 * @var $parsedResponse RedlinkResponse 
 */
$parsedResponse = $responseTransformer->createFromJson($response->getBody());

print_r($parsedResponse->getData());
print_r($parsedResponse->getErrors());;
print_r($parsedResponse->getMeta());
bash
curl -sS https://getcomposer.org/installer | php
bash
$ composer 
bash
$ docker-compose up -d
$ docker exec -it redlink-api-php-lib /bin/bash
$ composer install
$ php vendor/bin/phpstan analyze -c /var/www/html/phpstan.neon.dist
$ php vendor/bin/phpunit
$ php vendor/bin/psalm.phar
$ composer auto-format