PHP code example of chainlink / chainlink-apimatic-sdk

1. Go to this page and download the library: Download chainlink/chainlink-apimatic-sdk 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/ */

    

chainlink / chainlink-apimatic-sdk example snippets


use CcipDirectoryAndConfigurationRestApiV1Lib\Logging\LoggingConfigurationBuilder;
use CcipDirectoryAndConfigurationRestApiV1Lib\Logging\RequestLoggingConfigurationBuilder;
use CcipDirectoryAndConfigurationRestApiV1Lib\Logging\ResponseLoggingConfigurationBuilder;
use Psr\Log\LogLevel;
use CcipDirectoryAndConfigurationRestApiV1Lib\Environment;
use CcipDirectoryAndConfigurationRestApiV1Lib\CcipDirectoryAndConfigurationRestApiV1ClientBuilder;

$client = CcipDirectoryAndConfigurationRestApiV1ClientBuilder::init()
    ->environment(Environment::PRODUCTION)
    ->loggingConfiguration(
        LoggingConfigurationBuilder::init()
            ->level(LogLevel::INFO)
            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))
            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))
    )
    ->build();