aurigma/php-rendering-service-client

PHP API 客户端,用于客户 Canvas 网上印刷系统的渲染服务。

1.1.1 2023-11-08 12:36 UTC

This package is auto-updated.

Last update: 2024-09-08 14:26:53 UTC


README

======================================================

此模块是渲染服务的 PHP API 客户端,渲染服务是客户 Canvas网上印刷系统的一部分。我们假设您熟悉其服务并了解如何使用其 API。要了解更多关于客户 Canvas 及其服务的信息,请参阅其文档中的入门部分

先决条件

要使用此包,您需要满足以下要求

  • 您必须在客户 Canvas 上有账户。

有关其他平台,请参阅客户 Canvas 文档中的后端服务文章。

安装

composer require aurigma/php-rendering-service-client

要求

PHP 7.2 及以上版本。

Composer

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

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

然后运行 composer install

入门

请按照安装程序进行操作。

根据文档中的说明,通过您的后端获取访问令牌并将其发送到您的应用程序。

然后运行以下命令

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




$apiInstance = new OpenAPI\Client\Api\BuildInfoApi(
    // 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()
);

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

API 端点

所有 URI 都相对于 https://dm-renderingservice.azurewebsites.net/

模型