维护者

详细信息

github.com/Observer5/pdd

源代码

安装: 618

依赖: 1

建议: 0

安全: 0

星标: 1

关注者: 1

分支: 0

1.0.10 2022-07-20 08:32 UTC

This package is auto-updated.

Last update: 2024-09-21 15:04:20 UTC


README

EasyPDD是一个用于使用拼多多API的PHP库。

需求

  1. PHP >= 7.0.0
  2. PHP cURL 扩展
  3. PHP OpenSSL 扩展

SDK 对所使用的框架并无特别要求

安装

composer require "observer/pdd:~1.0" -vvv

使用

基本使用:(以附加服务查询为例)

$config = [
    'debug'  => true,

    'client_id'    => 'eaaedbeff0734feea6b0c901474456e2',
    'client_secret' => 'c2eda0c398xxxxxxbd63ff57bf22c05xxxxxx',
    'log'    => [
        'level' => 'debug',
        'file'  => '/tmp/easypdd.log',
    ],
    'oauth'  => [
        'callback'    => 'http:/foo.com/oauth_callback',
        'member_type' => 'MERCHANT',
    ],

];

$app = new \EasyPdd\Foundation\Application($config);

$goods = $app->goods;

$goods->list('access_token');

文档

wiki

强烈建议在使用本 SDK 之前先理解拼多多文档。

许可证

MIT