l1n6yun/duoduoke-sdk

多多客API SDK【拼多多开放平台】

v1.0 2019-11-13 03:03 UTC

This package is auto-updated.

Last update: 2024-11-13 14:06:34 UTC


README

要求

  1. PHP >= 7.0
  2. ext-curl 拓展
  3. ext-json 拓展

安装

composer require l1n6yun/duoduoke-sdk

使用

use l1n6yun\DuoDuoKe\DuoDuoKe;

$config = [
    'app_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'debug' => false,
    'log' => [
        'name' => 'DuoDuoKe',
        'file' => __DIR__ . '/DuoDuoKe.log',
        'level' => 'debug',
        'permission' => 0777,
    ],
];

$duoduoke = new DuoDuoKe($config);

调用示例

多多进宝商品详情查询 pdd.ddk.goods.detail

$result = $duoduoke->request('pdd.ddk.goods.detail', ['goods_id_list' => ['395581006']]);

文档

拼多多开放平台 · 官方文档