立体 / 船站
ShipStation的REST API的更新和维护版PHP包装器,基于michaelb/ship-station,文档在https://shipstation.docs.apiary.io/
1.2.7
2022-11-02 15:11 UTC
Requires
- guzzlehttp/guzzle: ^7.0.1
Replaces
This package is auto-updated.
Last update: 2024-09-30 02:00:02 UTC
README
安装
composer require zack6849/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