从Ebay导入所有产品

时间:2018-10-07 12:15:22

标签: php laravel ebay-api

我正在使用Ebay API,并且试图将我的eBay商店的所有产品导入到库存管理系统中。我尝试使用以下代码:

$ebay_service = new EbayServices();
$service = $ebay_service->createFinding();

// Assign the keywords.
$request = new Types\FindItemsByKeywordsRequest();
$request->keywords = 'Harry';

// Ask for the first 25 items.
$request->paginationInput = new Types\PaginationInput();
$request->paginationInput->entriesPerPage = 9000;
$request->paginationInput->pageNumber = 1;

// Ask for the results to be sorted from high to low price.
$request->sortOrder = 'CurrentPriceHighest';

$response = $service->findItemsByKeywords($request);

// Output the response from the API.
if ($response->ack !== 'Success') {
    foreach ($response->errorMessage->error as $error) {
        printf("Error: %s <br>", $error->message);
    }
} else {
    foreach ($response->searchResult->item as $item) {
      dd($item);
        printf("(%s) %s:%.2f <br>", $item->itemId, $item->title, $item->sellingStatus->currentPrice->value);
    }
}

但是,FindItemsByKeywordsRequest不是我所需要的。我需要类似findAllItems的东西。

可以使用eBay API进行任何操作吗?

0 个答案:

没有答案