1. Go to this page and download the library: Download league-and-shop/easytbk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
league-and-shop / easytbk example snippets
use LeagueAndShop\EasyTBK\Factory;
use LeagueAndShop\EasyTBK\taobao\request\TbkItemInfoGetRequest;
$client = Factory::taobao ();
$req = new TbkItemInfoGetRequest();
$req->setNumIids ($numIids);
return $client->execute ($req);
use LeagueAndShop\EasyTBK\Factory;
use LeagueAndShop\EasyTBK\jingdong\request\JdUnionGoodsPromotiongoodsinfoQueryRequest;
$jd = Factory::jingdong();
$req = new JdUnionGoodsPromotiongoodsinfoQueryRequest();
$req->setSkuIds("$itemid");
return $jd->execute($req);
use LeagueAndShop\EasyTBK\Factory;
use LeagueAndShop\EasyTBK\pinduoduo\request\DdkGoodsDetailRequest;
$pdd = Factory::pinduoduo();
$req = new DdkGoodsDetailRequest();
$req->setGoodsIdList("[$itemid]");
return $pdd->execute($req);
use LeagueAndShop\EasyTBK\Factory;
use LeagueAndShop\EasyTBK\Vip\Request\PidGenRequest;
use LeagueAndShop\EasyTBK\Vip\Request\UnionPidServiceClient;
// 唯品会官方的sdk写的比较垃圾,用法和其他平台稍微不一样
$service= UnionPidServiceClient::getService();
Factory::vip();
$pidGenRequest1 = new PidGenRequest();
$pidNameList2 = array();
$pidNameList2[0] = "value";
$pidGenRequest1->pidNameList = $pidNameList2;
$pidGenRequest1->requestId = "requestId";
dd($service->genPidWithOauth($pidGenRequest1));
use LeagueAndShop\EasyTBK\Factory;
use LeagueAndShop\EasyTBK\suning\Request\netalliance\CouponproductQueryRequest;
$c = Factory::suning();
$req = new CouponproductQueryRequest();
$req->setPageNo("1");
$req->setPageSize("10");
$req->setPositionId("12");
$resp = $c->execute($req);
dd($resp);