我是eBay API的新手。我为获得相同级别的类别而感到震惊。我正在使用getCategoriesInfo(购物)API来获取类别,但找不到任何方法来获取相同级别的类别。
public function getCategories(int $categoryId = -1): Shopping\Types\GetCategoryInfoResponseType
{
$service_params = $this->getServiceParams();
$service_params[ 'siteId' ] = self::SITEIDS[ Cookie::get('GLOBAL-ID') ];
$service = new Shopping\Services\ShoppingService($service_params);
/**
* Create the request object.
*/
$request = new Shopping\Types\GetCategoryInfoRequestType();
$request->CategoryID = (string)$categoryId;
$request->IncludeSelector = 'ChildCategories';
/**
* Send the request.
*/
return $response = $service->getCategoryInfo($request);
}
答案 0 :(得分:0)
要获得相同级别的类别,您需要指定父类别并请求子猫。