nolanpro/pm4-sdk-php

未提供描述

1.0.0-RC2 2021-02-04 18:32 UTC

This package is auto-updated.

Last update: 2024-09-05 02:33:51 UTC


README

未提供描述(由 Openapi Generator 生成 https://github.com/openapitools/openapi-generator

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

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

要求

PHP 5.5 及以上

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/ProcessMaker/pm4-sdk-php.git"
    }
  ],
  "require": {
    "ProcessMaker/pm4-sdk-php": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/pm4-sdk-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

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

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


// Configure Bearer authorization: pm_api_bearer
$config = ProcessMaker\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new ProcessMaker\Client\Api\CommentsApi(
    // 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
);
$comments_editable = new \ProcessMaker\Client\Model\CommentsEditable(); // \ProcessMaker\Client\Model\CommentsEditable | 

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

?>

API 端点文档

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

模型文档

授权文档

pm_api_bearer

  • 类型:Bearer 认证

作者

info@processmaker.com