抽取淘宝TopSdk的核心部分
"require": {
...
"desand/taobao-top-client": "*"
...
}
php composer.phar update
$config = array(
'appkey' => '...',
'secretKey' => '...'
);
$topClient = new \TaobaoTopClient\TopClient($config);
$shopGetRequest = $topClient->get('ShopGetRequest');
$shopGetRequest->setNick('abc');
$shopGetRequest->setFields('sid,cid,...');
$shopData = $topClient->execute($shopGetRequest, $sessionKey);