Skip to content

hainuo/youzan-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Youzan SDK

最优雅的有赞SDK

Requirement

Installation

composer require "hanson/youzan-sdk:dev-master"

Usage

基本使用(以添加产品为例):

<?php

use Hanson\Youzan\Foundation\Application;

$app = new Application([
    'app_id' => 'your app_id',
    'secret' => 'your app_secret'
]);

$result = $app->product->add([
    'title' => '产品名称',
    'price' => '899.99',
    'post_fee' => '0',
    ],[
        'images' => [
            __DIR__ . '/img/head.jpg',
            __DIR__ . '/img/gcu.jpg',
        ]
    ]
);

print_r($result);

Documention

Support

已实现

  • 产品

  • 订单

  • 商品类目

如有其它API需求可提issue或者参考下方的 Contribution 一起共同完善。

Contribution

License

MIT

Packages

No packages published

Languages

  • PHP 100.0%