Пример #1
0
<?php

/**
 * example that adds information to the item description
 *
 * $Id$
 *
 * @package     Services_Ebay
 * @subpackage  Examples
 * @author      Stephan Schmidt
 */
error_reporting(E_ALL);
require_once '../vendor/autoload.php';
require_once 'config.php';
$session = \Services\Ebay::getSession($devId, $appId, $certId);
$session->setToken($token);
$ebay = new \Services\Ebay($session);
$item = $ebay->GetItem(4501336808);
$result = $item->End('LostOrBroken');
echo '<pre>';
print_r($result);
echo '</pre>';
Пример #2
0
<?php

/**
 * example that fetches an item
 *
 * $Id$
 *
 * @package     Services_Ebay
 * @subpackage  Examples
 * @author      Stephan Schmidt
 */
error_reporting(E_ALL);
require_once '../vendor/autoload.php';
require_once 'config.php';
$session = \Services\Ebay::getSession($devId, $appId, $certId);
$session->setToken($token);
$ebay = new \Services\Ebay($session);
$item = $ebay->GetItem(110002463992);
echo 'User-Id of the seller: ' . $item->Seller->UserID . '<br />';
echo '<pre>';
print_r($item->toArray());
echo '</pre>';
$item_2 = \Services\Ebay::loadModel('Item', null, $session);
$item_2->Id = 110002463987;
$res2 = $item_2->Get();
<?php

/**
 * example that adds information to the item description
 *
 * $Id$
 *
 * @package     Services_Ebay
 * @subpackage  Examples
 * @author      Stephan Schmidt
 */
error_reporting(E_ALL);
require_once '../vendor/autoload.php';
require_once 'config.php';
$session = \Services\Ebay::getSession($devId, $appId, $certId);
$session->setToken($token);
$ebay = new \Services\Ebay($session);
$item = $ebay->GetItem(6280834492);
$result = $item->AddToDescription('He rarely ever used it.');
if ($result === true) {
    echo 'Sucessfully added to item description';
} else {
    echo 'Could not add to item description';
}
Пример #4
0
<?php

/**
 * example that fetches an item
 *
 * $Id$
 *
 * @package     Services_Ebay
 * @subpackage  Examples
 * @author      Stephan Schmidt
 */
error_reporting(E_ALL);
require_once '../vendor/autoload.php';
require_once 'config.php';
$session = \Services\Ebay::getSession($devId, $appId, $certId);
$session->setToken($token);
$ebay = new \Services\Ebay($session);
$item = $ebay->GetItem(4501333179);
$relist = $item->Relist();
echo "<pre>";
print_r($relist);
echo "</pre>";