michaelb / ship-station
A php wrapper for ship station's api
Installs: 1 798
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 4
Forks: 32
Open Issues: 7
Requires
- guzzlehttp/guzzle: ~6.0
This package is not auto-updated.
Last update: 2024-12-12 04:41:44 UTC
README
Install
composer require michaelb/ship-station
Docs
Using 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