PHP code example of spryker-sdk / azure-php-client

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

    

spryker-sdk / azure-php-client example snippets


use SprykerAzure\Client\Plugin\Request\PersonalAccessTokenAuthPlugin;
use SprykerAzure\Client\ClientFactory;

$clientFactory = new ClientFactory();

$requestBuilder = $clientFactory->getDefaultRequestBuilder();
$requestBuilder->addRequestPlugin(new PersonalAccessTokenAuthPlugin('Personal Access Token'));

$client = $clientFactory->createClient($requestBuilder);


$response = $this->azureClientFactory->getClient()->getPullRequestApi()->createPullRequest(...);
$response = $this->azureClientFactory->getClient()->getRepositoryApi()->getRepositoryInfo(...);

composer