eighteen73 / dear-api
PHP库,用于DEAR Systems API v2 https://dearinventory.docs.apiary.io
v1.0.5
2023-05-09 09:18 UTC
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-09 12:32:46 UTC
README
PHP库,用于DEAR Systems API v2。
最初从UmiMood/dear-api分支。
要求
- PHP 8.0+
- guzzlehttp/guzzle 7.4+
- ext-json 扩展
安装
composer require eighteen73/dear-api
否则只需下载包并将其添加到自动加载器中。
API文档
用法
创建Dear实例。
$dear = Eighteen73\Dear\Dear::create("DEAR-ACCOUNT_ID", "DEAR-APPLICATION-KEY");
从API获取数据
$products = $dear->product()->get([]); $accounts = $dear->account()->get([]); $me = $dear->me()->get([]);
将新记录推送到API
$response = $dear->product()->create($params); // see docs for available parameters
更新现有记录
$response = $dear->product()->update($guid, $params); // see docs for available parameters
删除记录
$response = $dear->product()->delete($guid, []);