PHP code example of orb-apimatic / orb-apiamtic-sdk

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

    

orb-apimatic / orb-apiamtic-sdk example snippets


use ApiReferenceLib\Logging\LoggingConfigurationBuilder;
use ApiReferenceLib\Logging\RequestLoggingConfigurationBuilder;
use ApiReferenceLib\Logging\ResponseLoggingConfigurationBuilder;
use Psr\Log\LogLevel;
use ApiReferenceLib\Authentication\BearerAuthCredentialsBuilder;
use ApiReferenceLib\ApiReferenceClientBuilder;

$client = ApiReferenceClientBuilder::init()
    ->bearerAuthCredentials(
        BearerAuthCredentialsBuilder::init(
            'AccessToken'
        )
    )
    ->loggingConfiguration(
        LoggingConfigurationBuilder::init()
            ->level(LogLevel::INFO)
            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))
            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))
    )
    ->build();