Code Monkey home page Code Monkey logo

jd-sdk's Introduction

Php-Version Documentation Maintenance License: MIT

京东 SDK 封装, 调用简单、语义化增强。支持 Laravel/Lumen。

安装

composer require wxm/jd-sdk

使用

PHP

$jd = new \Jd\Application('app_key', 'secret_key');

// 例如 jd.union.open.goods.jingfen.query 其他接口同理
$jd->union->open->goods->jingfen->query();

Laravel

  1. 注册 ServiceProvider:

    \Jd\ServiceProvider::class
  2. 发布配置:

    php artisan vendor:publish --provider="\Jd\ServiceProvider" --force
  3. 配置.env

    Jd_APPKEY=app_key
    Jd_APPSECRET=secret_key
  4. 使用

    // 例如 jd.union.open.goods.jingfen.query 其他接口同理
    \Jd\Facades\Jd::union()->open->goods->jingfen->query();

Lumen

  1. 注册 ServiceProvider:

    bootstrap/app.php 下添加

    $app->register(\Jd\ServiceProvider::class);
  2. 手动复制配置文件

  3. 配置.env

    Jd_APPKEY=app_key
    Jd_APPSECRET=secret_key
  4. 使用

    // 例如 jd.union.open.goods.jingfen.query 其他接口同理
    \Jd\Facades\Jd::union()->open->goods->jingfen->query();

API

  • 京粉精选商品查询接口 jd.union.open.goods.jingfen.query
  • 订单查询接口 jd.union.open.order.query
  • 关键词商品查询接口【申请】jd.union.open.goods.query
  • 网站/APP获取推广链接接口 jd.union.open.promotion.common.get
  • 根据skuid查询商品信息接口 jd.union.open.goods.promotiongoodsinfo.query
  • 优惠券领取情况查询接口【申请】 jd.union.open.coupon.query
  • 社交媒体获取推广链接接口【申请】jd.union.open.promotion.bysubunionid.get
  • 工具商获取推广链接接口【申请】 jd.union.open.promotion.byunionid.get
  • 查询推广位【申请】 jd.union.open.position.query
  • 创建推广位【申请】 jd.union.open.position.create
  • 获取PID【申请】 jd.union.open.user.pid.get
  • 秒杀商品查询接口【申请】【即将下线】 jd.union.open.goods.seckill.query
  • 商品类目查询接口 jd.union.open.category.goods.get
  • 商品详情查询接口 jd.union.open.goods.bigfield.query
  • 奖励订单查询接口【申请】 jd.union.open.order.bonus.query
  • 通过小程序获取推广链接【申请】 jd.union.open.promotion.applet.get
  • 礼金停止 jd.union.open.coupon.gift.stop
  • 礼金创建 jd.union.open.coupon.gift.get
  • 礼金效果数据 jd.union.open.statistics.giftcoupon.query
  • 活动查询接口 jd.union.open.activity.query
  • 订单行查询接口 jd.union.open.order.row.query
  • 猜你喜欢商品推荐 jd.union.open.goods.material.query
  • 佣金规则混合接口【申请】 jd.union.open.rule.commission.mix
  • 京享红包效果数据 jd.union.open.statistics.redpacket.query
  • 工具商订单行查询接口【申请】 jd.union.open.order.agent.query
  • 京东注册用户判定接口【申请】 jd.union.open.user.register.validate
  • 工具商京享红包效果数据查询接口【申请】 jd.union.open.statistics.redpacket.agent.query

其他 SDK

jd-sdk's People

Contributors

qq15725 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.