Play.com (former Priceminister.co.uk) is competitor of ebay, amazon by Rakuten Group, Tokyo, Japan. Thousands of Wrapper, SDK, classes can be found for Ebay, Amazon etc. but the Play.com. Before start to write the php wrapper classes, we have searched over internet and forums for existing libraries. Finally we have found that, there is no php classes / libraries available (no other language libraries seen in that search results also). Then we planned to write our own wrapper and libraries to access Play.com’s API. And we tested it in Unix and Windows box. It works fine with PHP 5.
Example Product Listing Class:
<?php /* Filename: products.class.php Created: 7/17/2011, © 2011 kernelbd.com Descripton: Webserivce of product listing from PriceMinister.com API Requirements: - PHP with XML support - priceminister.class.php - a Developer's token from PriceMinister = http://pmcdn.priceminister.com/res/schema/listing/listing.2011-01-01.xsd */ class PM_Products extends Priceminister_Webservices { const _VER_LISTING_ = '2011-01-01'; function __construct($config = array()) { $this-->config = $config; } // end func public function listing($params) { $url = _STORE_HTTP_.'listing_ws?action=listing&version='.self::_VER_LISTING_.'&'.$params['scope'].'&nbproducts='.$params['nbproducts'].'&kw='.$params['kw'].'&nav='.$params['nav'].'&refs='.$params['refs'].'&productids='.$params['productids']; return $this->make_request($url, $params); } // end func } // end class definition ?>
To make a call Listing API via PHP wrapper –
<?php /* Filename: listing.php Created: 7/17/2011, © 2011 kernelbd.com Descripton: example of product listing script of PriceMinister.com API Requirements: - PHP with XML support - lib/priceminister.class.php - lib/products.class.php - a Developer's token from PriceMinister (https://ws.priceminister.co.uk/stock_ws?) */ // configuration variables require_once('config.php'); /* // webservice class definition require_once('lib/Priceminister_Webservices.class.php'); require_once('lib/Products.class.php'); */ $params['kw'] = 'bags'; $params['scope'] = ''; $params['nbproducts'] = ''; $params['nav'] = ''; $params['refs'] = ''; $params['productids'] = ''; $oProducts = new PM_Products($config); $result = $oProducts->listing($params); echo '<pre>'; echo "<h3>Service Called: Products -> listing</h3>"; print_r($result); ?>
There are the examples for Priceminister.com API services, example may not work correctly though it is demo user.
Web Service | Service Group | Filesize (in Byte) |
---|---|---|
Acceptsale | Sales | 993 |
Cancelitem | Sales | 1127 |
Contactpriceministeraboutitem | Sales | 1349 |
Contactuseraboutitem | Sales | 1159 |
Export | Stock | 1084 |
Getbillinginformation | Sales | 1053 |
Getcompensationdetails | Sales | 1079 |
Getiteminfos | Sales | 1010 |
Getitemtodolist | Sales | 1010 |
Getnewsales | Sales | 991 |
Import | Stock | 961 |
Importreport | Stock | 997 |
Listing | Products | 1679 |
Refusesale | Sales | 985 |
Wallet | Wallet | 968 |