Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.8 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.8 KB

Alibaba SDK

build

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.