PHP code example of sdksio / apimatic-sticky-apis-sdk
1. Go to this page and download the library: Download sdksio/apimatic-sticky-apis-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-sticky-apis-sdk example snippets
use StickyIoRestfulApiV2025731Lib\Logging\LoggingConfigurationBuilder;
use StickyIoRestfulApiV2025731Lib\Logging\RequestLoggingConfigurationBuilder;
use StickyIoRestfulApiV2025731Lib\Logging\ResponseLoggingConfigurationBuilder;
use Psr\Log\LogLevel;
use StickyIoRestfulApiV2025731Lib\Environment;
use StickyIoRestfulApiV2025731Lib\Authentication\BasicCredentialsBuilder;
use StickyIoRestfulApiV2025731Lib\Authentication\BearerCredentialsBuilder;
use StickyIoRestfulApiV2025731Lib\StickyIoRestfulApiV2025731ClientBuilder;
$client = StickyIoRestfulApiV2025731ClientBuilder::init()
->basicCredentials(
BasicCredentialsBuilder::init(
'username',
'password'
)
)
->bearerCredentials(
BearerCredentialsBuilder::init(
'AccessToken'
)
)
->environment(Environment::PRODUCTION)
->loggingConfiguration(
LoggingConfigurationBuilder::init()
->level(LogLevel::INFO)
->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))
->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))
)
->build();