shopwedo / shopwedoapi
Shop-we-do PHP api 包装器
dev-master
2024-07-31 11:22 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2024-10-01 00:14:33 UTC
README
ShopWeDo PHP Api 包装器,用于与 ShopWeDo REST api 一起使用。
安装
可以使用 Composer 安装此库。运行以下命令
composer require shopwedo/shopwedoapi
使用示例
require_once __DIR__ . '/vendor/autoload.php'; // change path as needed
$client = new \Shopwedo\Shopwedo([ 'shop_id' => '_myid_', 'api_key' => '_mykey_' ]);
try {
$stock = $client->getStock();
// ....
}
catch (\Shopwedo\Exceptions\ShopwedoResponseException $e) {
echo 'Error while making request '. $e->getMessage();
}