aurigma/php-storefront-products-client
Composer 安装命令:
composer require aurigma/php-storefront-products-client
包简介
PHP API Client for Storefront Products API service of Customer's Canvas web-to-print system.
README 文档
README
======================================================
This module is a PHP API client for Storefront Products API service which is a part of Customer's Canvas web-to-print system. It is supposed that you are familiar with its services and understand how to use its APIs. To learn more about Customer's Canvas and its services, refer the Getting Started section of its documentation.
Pre-requisites
To be able to use this package, you need to meet the following requirements:
- You must have an account at Customer's Canvas.
For other platforms, see the Backend services article in Customer's Canvas documentation.
Installation
composer require aurigma/php-storefront-products-client
Requirements
PHP 7.2 and later.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKey $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer'); // Configure API key authorization: bearerAuth $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); // Configure OAuth2 access token for authorization: oauth2-clientCredentials $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); // Configure OAuth2 access token for authorization: oauth2-code $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); // Configure OAuth2 access token for authorization: oauth2-implicit $config = Aurigma\Storefront\Products\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Aurigma\Storefront\Products\Api\ProductReferencesApi( // 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 ); $reference = 'reference_example'; // string | Product reference - external reference to Customer's Canvas products, e.g online store product identifier. $storefront_id = 56; // int | Storefront identifier. $tenant_id = 56; // int | Tenant identifier. try { $result = $apiInstance->productReferencesGet($reference, $storefront_id, $tenant_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ProductReferencesApi->productReferencesGet: ', $e->getMessage(), PHP_EOL; }
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
Aurigma Inc info@aurigma.com (https://customerscanvas.com)
API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ProductReferencesApi | productReferencesGet | GET /api/storefront/v1/product-references/ext/{reference} | Returns a storefront product reference. |
| ProductReferencesApi | productReferencesGetAll | GET /api/storefront/v1/product-references/ext | Returns all storefront product references relevant to the specified query parameters. |
| ProductReferencesApi | productReferencesGetAllProductLinks | GET /api/storefront/v1/product-references/ext/product-links | Returns a list of product links associated with storefront product references relevant to the specified query parameters. |
| ProductReferencesApi | productReferencesGetProduct | GET /api/storefront/v1/product-references/ext/{reference}/product | Returns a product by storefront product reference. |
| ProductReferencesApi | productReferencesGetProductCostDetails | GET /api/storefront/v1/product-references/ext/{reference}/product-cost-details | Returns a product cost details from ecommerce system. |
| ProductReferencesApi | productReferencesGetProductFilter | GET /api/storefront/v1/product-references/ext/{reference}/product-filter | Returns a product filter by storefront product reference. |
| ProductReferencesApi | productReferencesGetProductLink | GET /api/storefront/v1/product-references/ext/{reference}/product-link | Returns a product link by storefront product reference. |
| ProductReferencesApi | productReferencesGetProductPersonalizationWorkflow | GET /api/storefront/v1/product-references/ext/{reference}/product-personalization-workflow | Returns a product personalization workflow configuration by storefront product reference. |
| ProductReferencesApi | productReferencesObsoleteGetProduct | GET /api/storefront/v1/product-references/{reference}/product | Returns a product by storefront product reference. |
| ProductReferencesApi | productReferencesObsoleteGetProductFilter | GET /api/storefront/v1/product-references/{reference}/product-filter | Returns a product filter by storefront product reference. |
| ProductReferencesApi | productReferencesObsoleteGetProductLink | GET /api/storefront/v1/product-references/{reference}/product-link | Returns a product link by storefront product reference. |
| ProductReferencesApi | productReferencesObsoleteGetProductPersonalizationWorkflow | GET /api/storefront/v1/product-references/{reference}/product-personalization-workflow | Returns a product personalization workflow configuration by storefront product reference. |
| ProductsApi | productsGetAllProductOptions | GET /api/storefront/v1/products/options | Returns a list of product options for all products. |
| ProductsApi | productsGetAllProducts | GET /api/storefront/v1/products | Returns all products, relevant to the specified query parameters. |
| ProductsApi | productsGetAvailableProductTags | GET /api/storefront/v1/products/available-tags | Returns a list of all available product tags. |
| ProductsApi | productsGetProduct | GET /api/storefront/v1/products/{id} | Returns a product by identifier. |
| ProductsApi | productsGetProductFilter | GET /api/storefront/v1/products/{id}/filters/{productFilterId} | Returns a product filter. |
| ProductsApi | productsGetProductFilters | GET /api/storefront/v1/products/{id}/filters | Returns a list of product filters. |
| ProductsApi | productsGetProductLink | GET /api/storefront/v1/products/{id}/links/{productLinkId} | Returns a product link. |
| ProductsApi | productsGetProductLinks | GET /api/storefront/v1/products/{id}/links | Returns a list of product links. |
| ProductsApi | productsGetProductOptions | GET /api/storefront/v1/products/{id}/options | Returns a list of product options. |
| ProductsApi | productsGetProductVariant | GET /api/storefront/v1/products/{id}/variants/{productVariantId} | Returns a product variant. |
| ProductsApi | productsGetProductVariantDesigns | GET /api/storefront/v1/products/{id}/variant-designs | Returns a list of product variant designs. |
| ProductsApi | productsGetProductVariantMockups | GET /api/storefront/v1/products/{id}/variant-mockups | Returns a list of product variant mockups. |
| ProductsApi | productsGetProductVariants | GET /api/storefront/v1/products/{id}/variants | Returns a list of product variants. |
| ProductsApi | productsSetProductVariantPrice | POST /api/storefront/v1/products/{id}/set-variant-price | Set product variant price. |
| ProductsApi | productsUpdateProductVariantResources | POST /api/storefront/v1/products/{id}/update-variant-resources | Updates product variant resources. |
Models
- AppearanceDataDto
- AppearanceDataItemDto
- AppearanceDataType
- ImageInfo
- MicrosoftAspNetCoreMvcProblemDetails
- OptionType
- PagedOfProductDto
- PagedOfProductFilterDto
- PagedOfProductLinkDto
- PagedOfProductOptionDto
- PagedOfProductReferenceDto
- PagedOfProductVariantDesignDto
- PagedOfProductVariantDto
- PagedOfProductVariantMockupDto
- ProductCostDetailsDto
- ProductDto
- ProductFilterDto
- ProductFilterOptionDto
- ProductFilterType
- ProductLinkDto
- ProductOptionDto
- ProductOptionValueDto
- ProductReferenceDto
- ProductVariantDesignDto
- ProductVariantDto
- ProductVariantMockupDto
- ProductVariantMockupType
- ProductVariantOptionDto
- ProductVariantResourceDto
- ProductVariantResourcePreview
- ProductVariantResourceType
- SetProductVariantPriceDto
- SimpleOptionValue
- SurfaceUsageType
aurigma/php-storefront-products-client 适用场景与选型建议
aurigma/php-storefront-products-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 56 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 01 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「products」 「api client」 「web-to-print」 「storefront」 「customers canvas」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aurigma/php-storefront-products-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aurigma/php-storefront-products-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 aurigma/php-storefront-products-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Submodule for SilverShop which allows you to compare products in a table.
Mock PSR-18 HTTP client
Product catalog for your Symfony2 applications.
Auto generate related products for Magento 2
Asynchronous MQTT client built on React
统计信息
- 总下载量: 56
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2024-01-26