9 Star 21 Fork 5

大淘客/openapi-sdk-php

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

openapi-sdk-php

介绍

大淘客开放平台SDK PHP版

安装教程

composer require dtk-developer/openapi-sdk-php

使用实例

    include 'vendor/autoload.php';

    //线报api
    $client = new GetTipList();

    $client->setAppKey('5ff42cda0fd35');
    $client->setAppSecret('28318c5c2ea7b5c57fa7fab0a990db7f');
    $client->setVersion('v3.0.0');

    $res = $client->setParams([])->request();
    var_dump($res);

若SDK未封装需要的API,可自行根据下面的通用请求调用需要的API:

    include 'vendor/autoload.php';

    // 1. 创建客户端,设置appKey及appSecret
    $client = new DtkClient();

    $client->setAppKey('xxxxxxxx');
    $client->setAppSecret('xxxxxxxxxxxxxxxx');
    $client->setVersion('v1.0.0');


    // 2. 发送请求,请根据实际情况更改

    $method = 'get'; // 请求方法: get/post
    $url = "https://openapi.dataoke.com/api/dels/kit/contentParse"; // API的URL,请根据实际情况更改

    // 请求参数列表,
    $params = [
        'content' => 'https://npcitem.jd.hk/3314012.html'
    ];
    $result = $client->doRequest($method, $url, $params);
    print_r($result);

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

空文件

简介

大淘客开放平台SDK PHP版 展开 收起
README
Apache-2.0
取消

发行版 (20)

全部

贡献者

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/dtk-developer/openapi-sdk-php.git
git@gitee.com:dtk-developer/openapi-sdk-php.git
dtk-developer
openapi-sdk-php
openapi-sdk-php
master

搜索帮助