溶解 / 船站
ship station REST API 的 PHP 封装
v1.5.0
2021-04-15 17:37 UTC
Requires
- guzzlehttp/guzzle: ~6|~7
Replaces
This package is not auto-updated.
Last update: 2024-09-27 10:09:30 UTC
README
安装
composer require dissolve/ship-station
文档
使用 ShipStationApi
use MichaelB\ShipStation\ShipStationApi; $apiKey = ''; // Your ShipStation Api Key $apiSecret = ''; // Your ShipStation Api Secret $options = []; // Options to be merged into the normal GuzzleHttp\Client options // ShipStationApi Extends GuzzleHttp\Client $shipstation = new ShipStationApi($apiKey, $apiSecret, $options); /* * Get a service instance */ // Orders $orderService = $shipstation->orders; // Products $products = $shipstation->products; // ... /* * Use the service */ $order = $orderService->getOrder('1234'); // All service methods return a GuzzleHttp\Psr7\Response object $json = $order->getBody(); // { 'order': {...} } $status = $order->getStatusCode(); // 200