adesso-mobile/php-confluence-client

这是 Confluence REST 资源端点文档

0.1.0 2019-08-15 12:59 UTC

This package is auto-updated.

Last update: 2024-09-11 00:05:20 UTC


README

这是 Confluence REST 资源端点文档

此 PHP 包是由 OpenAPI Generator 项目自动生成的

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

需求

PHP 5.5 及以上版本

安装和用法

Composer

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

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

然后运行 composer install

手动安装

下载文件并包含 autoload.php

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

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

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

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



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


$apiInstance = new ConfluenceClient\Api\ConfluenceApi(
    // 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
);
$page_id = 56; // int | The page ID to return information about the page.
$status = 'status_example'; // string | list of Content statuses to filter results on. Default value: [current]
$version = new \stdClass; // object | 
$expand = 'history,space,version'; // string | A comma separated list of properties to expand on the content. Default value: history,space,version We can also specify some extensions such as extensions.inlineProperties (for getting inline comment-specific properties) or extensions.resolution for the resolution status of each comment in the results

try {
    $result = $apiInstance->getContentById($page_id, $status, $version, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfluenceApi->getContentById: ', $e->getMessage(), PHP_EOL;
}

?>

API 端点文档

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

模型文档

授权文档

crowdAuth

  • 类型:HTTP 基本认证

作者