private function getSingleItemFromEbay($ebayitemid) { $this->queryText = $ebayitemid; $this->getItems(); if (!ImageGallery::find()->where(['ebay_item_id' => $ebayitemid])->exists()) { $service = new ShopSer\ShoppingService(array('apiVersion' => $this->config['shoppingApiVersion'], 'appId' => $this->config['production']['appId'])); $request = new ShopType\GetSingleItemRequestType(); $request->ItemID = $ebayitemid; $request->IncludeSelector = 'Details'; $response = $service->getSingleItem($request); if ($response->Ack !== 'Failure') { $res = $response->toArray(); $this->addImagesToDB($res, $ebayitemid); } } }
*/ //require 'vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php'; $config = (require __DIR__ . '/configuration.php'); /** * The namespaces provided by the SDK. */ use DTS\eBaySDK\Constants; /** * The namespaces provided by the SDK. */ use DTS\eBaySDK\Shopping\Services; use DTS\eBaySDK\Shopping\Types; use DTS\eBaySDK\Shopping\Enums; echo "--------------------------------------------------------------------------------"; $service = new Services\ShoppingService(array('apiVersion' => $config['shoppingApiVersion'], 'appId' => 'KKK6bb807-2fab-408e-aea4-9b2a2a89b87')); /** * Create the request object. * * For more information about creating a request object, see: * http://devbay.net/sdk/guides/getting-started/#request-object */ $request = new Types\GetSingleItemRequestType(); /** * Specify the item ID of the listing. */ $request->ItemID = '281832802693'; /** * Specify that additional fields need to be returned in the response. */ $request->IncludeSelector = 'ItemSpecifics,Variations,Compatibility,Details,BusinessSellerDetails';
* User: user * Date: 10/13/15 * Time: 12:27 PM */ //require 'vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php'; $config = (require __DIR__ . '/configuration.php'); use DTS\eBaySDK\Constants; use DTS\eBaySDK\Finding\Services; use DTS\eBaySDK\Finding\Types; /* use \DTS\eBaySDK\Shopping\Services;*/ use DTS\eBaySDK\Shopping\Services as ShServices; use DTS\eBaySDK\Shopping\Types as ShTypes; //echo "<h1>الله اكبر</h1>"; $ShService = new ShServices\ShoppingService(array('apiVersion' => $config['shoppingApiVersion'], 'appId' => $config['production']['appId'])); $ShRequest = new ShTypes\GeteBayTimeRequestType(); $ShRequest = $ShService->geteBayTime($ShRequest); if ($ShRequest->Ack !== 'Success') { if (isset($ShRequest->Errors)) { foreach ($ShRequest->Errors as $error) { printf("Error: %s\n", $error->ShortMessage); } } } else { printf("The official eBay time is: %s\n", $ShRequest->Timestamp->format('H:i (\\G\\M\\T) \\o\\n l jS F Y')); } echo "</br>"; echo "--------------------------------------------------------------------------------"; // Create the service object. $service = new Services\FindingService(['appId' => 'KKK6bb807-2fab-408e-aea4-9b2a2a89b87', 'globalId' => Constants\GlobalIds::US]);
* For more information about getting your application keys, see: * http://devbay.net/sdk/guides/application-keys/ */ $config = (require __DIR__ . '/../configuration.php'); /** * The namespaces provided by the SDK. */ use DTS\eBaySDK\Shopping\Services; use DTS\eBaySDK\Shopping\Types; /** * Create the service object. * * For more information about creating a service object, see: * http://devbay.net/sdk/guides/getting-started/#service-object */ $service = new Services\ShoppingService(array('apiVersion' => $config['shoppingApiVersion'], 'appId' => $config['production']['appId'])); /** * Create the request object. * * For more information about creating a request object, see: * http://devbay.net/sdk/guides/getting-started/#request-object */ $request = new Types\GeteBayTimeRequestType(); /** * Send the request to the GeteBayTime service operation. * * For more information about calling a service operation, see: * http://devbay.net/sdk/guides/getting-started/#service-operation */ $response = $service->geteBayTime($request); /**