-
Notifications
You must be signed in to change notification settings - Fork 1
OtClient
Aleksei Mikhaltsov edited this page Dec 13, 2021
·
2 revisions
$client = new OtClient($key, $secret, $lang);
- key (Access Key)
- secret (Secret for access key)
- language (2 symbol lang identifier)
$client->getItemFullInfo($itemId);
$itemId For example 627419924025 is itemId parameter.
return full item data for specified ItemId.
$client->batchSearchItemsFrame($parameters,$xmlParameters);
Make search and return json string with data $parameters
$parameters = new OtParameters();
$parameters->setFramePosition(0); // start position for serach
$parameters->setFrameSize(50); // items to return
$parameters->setBlockList($blockList); // adaitional parameters to return
$blockList
$blockList = new OtBlockList();
$blockList->setBrand(TRUE); // return brand list that present in results
$xmlParameters
$xmlParameters = new OtXmlParameters();
$xmlParameters->setProvider(OtProvider::Alibaba1688); // providers to search
$xmlParameters->setItemTitle('adidas'); // search string
$xmlParameters->setOrder(OtOrderType::TotalVolumeDesc); // sorting