PHP code example of webconsul / ebay-api-bundle

1. Go to this page and download the library: Download webconsul/ebay-api-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webconsul / ebay-api-bundle example snippets


$api = 'Shopping';
$callName = 'GetSingleItem';
$ebay = $this->get('web_consul_ebay_api.main');
$call = $ebay->getInstance('Shopping', 'GetSingleItem', $ebay::MODE_PRODUCT);
$variationSpecifics = [];
$nameValueList = new NameValueList();
$nameValueList->setName('Colour')->setValue(['RED']);
$variationSpecifics[] = $nameValueList;
// set Call-specific and  Standard Input Fields
$call
     ->setItemID(151551119370)
     ->setIncludeSelector('Details, Variations')
     ->setVariationSpecifics($variationSpecifics);
// get response in XML format     
$service = $this->get('web_consul_ebay_api.make_call');
$output = $service->getResponse($call);
 bash
$ php composer.phar update webconsul/ebay-api-bundle
 php

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new WebConsul\EbayApiBundle\WebConsulEbayApiBundle(),
    );
}
 php

// app/AppKernel.php
public function registerBundles()
{
    // ...
    new JMS\SerializerBundle\JMSSerializerBundle(),
    // ...
);
}