1.0.5 • Published 4 years ago

egg-duoduoke-sdk v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

egg-duoduoke-sdk

NPM version build status Test coverage David deps Known Vulnerabilities npm download

拼多多平台多多客的 sdk,核心内容为everywill提供,由作者封装为 Egg 插件供有需要的 Egg 开发者安装使用。

依赖的 egg 版本

egg-duoduoke-sdk 版本egg 2.x
2.x😁
1.x

安装

$ npm i egg-duoduoke-sdk --save

开启插件

// config/plugin.js
exports.duoduokeSdk = {
  enable: true,
  package: "egg-duoduoke-sdk",
};
// config/config.default.js
config.duoduoke = {
  clientId: "your clientId",
  clientSecret: "your clientSecret",
};

// config/config.prod.js
config.duoduoke = {
  clientId: "your clientId",
  clientSecret: "your clientSecret",
  endpoint: "https://gw-api.pinduoduo.com/api/router",
};

使用

const { goods_id_list } = ctx.request.body;
const commodityQuery = await ctx.duoduoke.execute(
  "pdd.ddk.goods.basic.info.get",
  {
    goods_id_list,
  }
);

License

MIT

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago