|
Auctionfeed has been upgraded (Jan 2010) to include a Merchandising API for eBay Merchandising Web Services (EMWS). Written in PHP, the interface makes it easy for developers and affiliates to construct EMWS queries and retrieve data from eBay. You can get an appid, access to documentation and more information about EMWS from the eBay Developers Program web site. ExamplesExample 1.1 provides code to make a simple getMostWatchedItems call which retrieves data for items with the highest watch count. Example 1.1 Get the official eBay system time <?php // include Auctionfeed Shopping API file require_once 'Auctionfeed/Shopping.php'; // get a merchandising api object $ebay = new Auctionfeed_Merchandising( 'YOUR-APPID-HERE', 'MERCHANDISING_API_VERSION' ); // get an api call object $obj = $ebay->getMostWatchedItems(); // set call parameters $obj->setOption( 'maxResults', 3 ); $obj->setOption( 'categoryId', 267 ); // get XML response as a SimpleXMLElement object $xml = $obj->getSimpleXML(); // do stuff if ($xml) { echo '<pre>'; print_r($xml); echo '</pre>'; } else { echo 'Error. No simpleXML object.'; } ?> EMWS Version SupportAuctionfeed APIs undergoe regular maintenance and every effort is made to maintain compliance with the latest EMWS revision. Users should check regularly for announcements at the official Auctionfeed support site: http://auctionfeed.co.uk. RequirementsUse of Auctionfeed Libraries requires:
Installation
NotesThe Auctionfeed API uses a PHP constant named AUCTIONFEED_DIR which is the full system file path to the new libraries/ directory. If your application can find the libraries/Auctionfeed/Shopping.php file, Auctionfeed will define this constant on its own. Auctionfeed also attempts to set your include_path to find all other files and directories below the libraries/ directory. The package contains .php files that you SHOULD NOT edit. They are shared among all Auctionfeed powered applications and should only change when you upgrade to a new version of Auctionfeed. If you need to add functionality the recommended course of action is to create news classes that override and extend those within the package. LicenseFree to modify and distribute under the NEW BSD License. |
| Last Updated on Tuesday, 19 January 2010 01:35 |