aidilrozi / shopee-api-sdk
Shopee Partner API PHP SDK
dev-master
2020-08-06 02:31 UTC
Requires
- php: >=7.1
- ext-json: *
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
- phpstan/phpstan: ^0.12.14
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: ^3.5
This package is not auto-updated.
Last update: 2025-05-24 00:23:47 UTC
README
This is a Shopee Partner API Client for PHP.
Requirements
Installation
Execute the following command to get the package:
$ composer require Aidilrozi/shopee-api-sdk
Usage
Create an instance of the Shopee client, then use to access the Shopee Partner API.
<?php require_once __DIR__ . '/vendor/autoload.php'; $client = new \Shopee\Client([ 'secret' => SHOPEE_SECRET, 'partner_id' => SHOPEE_PARTNER_ID, 'shopid' => SHOPEE_SHOP_ID, ]);
Examples
Get detail of item
$response = $client->item->getItemDetail(['item_id' => 1978]);
Alternatively, you can also use the parameter model within request.
$parameters = (new \Shopee\Nodes\Item\Parameters\GetItemDetail()) ->setItemId(1978); $response = $client->item->getItemDetail($parameters);
License
See the LICENSE file for license rights and limitations (BSD 3-Clause).