adesso-mobile/php-bitbucket-client

这是bitbucket REST资源端点文档

0.1.0 2019-08-15 12:57 UTC

This package is auto-updated.

Last update: 2024-09-28 18:37:02 UTC


README

这是bitbucket REST资源端点文档

此PHP软件包由OpenAPI Generator项目自动生成

  • API版本:6.3.1
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen

需求

PHP 5.5及更高版本

安装与使用

Composer

要通过Composer安装绑定,请在composer.json中添加以下内容

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/adesso-mobile/php-bitbucket-client.git"
    }
  ],
  "require": {
    "adesso-mobile/php-bitbucket-client": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/php-bitbucket-client/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请按照安装程序进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure HTTP basic authorization: crowdAuth
$config = BitbucketClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new BitbucketClient\Api\BitbucketApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project_key = 'project_key_example'; // string | The project key to return information about

try {
    $result = $apiInstance->getProject($project_key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BitbucketApi->getProject: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

所有URI都是相对于https:///rest/api/1

模型文档

授权文档

crowdAuth

  • 类型:HTTP基本认证

作者