jacob-hyde / printify
Printify PHP SDK
v1.0
2020-10-05 18:46 UTC
Requires
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2024-09-22 03:12:21 UTC
README
Printify API 的基本 PHP 封装。API 端点文档可以在以下位置找到: https://developers.printify.com/
安装
composer require jacob-hyde/printify
查看 example 和 test 目录以获取更多具体用法示例。
基本用法
创建一个 Printify API 的新实例并将其传递给端点类。例如,目录
use Printify\PrintifyApiClient;
use Printify\PrintifyCatalog;
$printify_api = new PrintifyApiClient(<Shop Access Token>);
$printify_catalog = new PrintifyCatalog($printify_api);
$catalog_items = $printify_catalog->all();
基于商店的端点
对于基于商店的端点,请在端点构造函数中传递商店 ID。例如
use Printify\PrintifyOrders;
$printify_orders = new PrintifyOrders($printify_api, <Shop ID>);
$orders = $printify_orders->all();
需要商店 ID 的端点
- 产品
- 订单
- 上传
- Webhooks