aurigma / php-storefront-client
PHP API 客户端,用于Customer's Canvas 网上打印系统的Storefront API服务。
2.0.1
2024-07-31 12:28 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
- jumbojett/openid-connect-php: ^0.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-10-01 00:14:37 UTC
README
======================================================
此模块是Customer's Canvas网上打印系统的Storefront API服务的PHP API客户端。假设您熟悉其服务并了解如何使用其API。要了解更多关于Customer's Canvas及其服务的信息,请参阅其文档中的入门部分。
先决条件
要使用此包,您需要满足以下要求
- 您必须在Customer's Canvas上有一个账户。
有关其他平台,请参阅Customer's Canvas文档中的后端服务文章。
安装
composer require aurigma/php-storefront-client
要求
PHP 7.2及更高版本。
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/aurigma/php-storefront-client.git" } ], "require": { "aurigma/php-storefront-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; } ?>
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
Aurigma Inc info@aurigma.com (https://customerscanvas.com)
API 端点
所有URI相对于https://
模型
- BuildInfoModel
- CreateProductReferenceDto
- CreateProjectDto
- DatePeriod
- MicrosoftAspNetCoreMvcProblemDetails
- PagedOfProductReferenceDto
- PagedOfProductSpecificationDto
- PagedOfProjectDto
- PagedOfProjectStatusDto
- PagedOfProjectTransitionDto
- PagedOfStorefrontDto
- ProductAttributeDto
- ProductReferenceDto
- ProductSpecificationDto
- ProjectDto
- ProjectItemDto
- ProjectPdfResultDto
- ProjectStatusDto
- ProjectTransitionConflictDto
- ProjectTransitionDto
- StorefrontDto
- StorefrontType
- TenantApplicationsInfoDto