PHP code example of sdksio / apimatic-fis-assets-sdk

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

    

sdksio / apimatic-fis-assets-sdk example snippets


use AssetMasterServicesAssetsLib\Logging\LoggingConfigurationBuilder;
use AssetMasterServicesAssetsLib\Logging\RequestLoggingConfigurationBuilder;
use AssetMasterServicesAssetsLib\Logging\ResponseLoggingConfigurationBuilder;
use Psr\Log\LogLevel;
use AssetMasterServicesAssetsLib\Environment;
use AssetMasterServicesAssetsLib\Authentication\BearerCredentialsBuilder;
use AssetMasterServicesAssetsLib\Authentication\MDefaultCredentialsBuilder;
use AssetMasterServicesAssetsLib\AssetMasterServicesAssetsClientBuilder;

$client = AssetMasterServicesAssetsClientBuilder::init()
    ->bearerCredentials(
        BearerCredentialsBuilder::init(
            'Authorization'
        )
    )
    ->mDefaultCredentials(
        MDefaultCredentialsBuilder::init(
            'OAuthClientId',
            'OAuthRedirectUri'
        )
    )
    ->environment(Environment::PRODUCTION)
    ->loggingConfiguration(
        LoggingConfigurationBuilder::init()
            ->level(LogLevel::INFO)
            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))
            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))
    )
    ->build();