kyto / alibaba-sdk
Alibaba SDK for PHP
v0.2.0
2024-03-22 10:46 UTC
Requires
- php: ^8.1
- ext-json: *
- ext-mbstring: *
- symfony/http-client: ^5.4 || ^6
Requires (Dev)
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
Suggests
- ext-curl: To send requests using cURL
This package is auto-updated.
Last update: 2024-05-07 13:26:36 UTC
README
Alibaba SDK for PHP. This package provides a structured interface to communicate with Alibaba Open Platform.
Note, package is in development therefore public interface could be changed in future releases.
Requirements
Currently, the minimum required PHP version is PHP 8.1.
See the composer.json for other requirements.
Installation
Install the latest version with Composer:
composer require kyto/alibaba-sdk
Usage example
All the interactions with Alibaba are done via Kyto\Alibaba\Facade
.
require __DIR__ . '/vendor/autoload.php'; use Kyto\Alibaba\Facade; $alibaba = Facade::create('api-key', 'api-secret'); $alibaba->category->get('0'); // @return Kyto\Alibaba\Model\Category
Endpoints
Currently implemented endpoints:
facade
├─ getAuthorizationUrl - Get user authorization url
├─ token/ - Token endpoint
│ └─ new - Obtain new session token
├─ category/ - Category endpoint
│ ├─ get - Get product listing category
│ ├─ getAttributes - Get system-defined attributes based on category ID
│ └─ getLevelAttribute - Get next-level attribute based on category, attribute and value ID (e.g. car_model values)
└─ product/ - Product endpoint
└─ getGroup - Get product group
Credits
Kyto GmbH
Licensed under the Apache-2.0 License. See LICENSE for more information.