Skip to content

spryker-sdk/azure-php-client

Repository files navigation

Azure Repos Client for PHP

Build Status codecov Latest Stable Version Minimum PHP Version PHPStan

PHP client for Azure Repos.

Installation

Require the library in your project:

composer require spryker-sdk/azure-php-client

Usage

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(...);