Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

PriceMinister SDK

Build Status Packagist Coverage Status

Usage

composer require pgrimaud/priceminister-sdk
$client = new Priceminister\PriceministerClient('yourLogin', 'yourToken');

$productListing = new Priceminister\ProductListing($client);
$productListing->setParameter('kw', 'iron man tome 1 croire');
$productListing->validParameters();

$plRequest = new ProductListingRequest($productListing);

print_r($plRequest->fetch());
/*
Array
(
    [0] => Array
        (
            [id] => 283617873
            [values] => Array
                (
                    [name] => Iron Man Tome 1 - Croire
                    [image] => http://pmcdn.priceminister.com/photo/984727643_ML.jpg
                    [breadcrumb] => Livres > BD et livres d'humour > Comics
                    [caption] => 
                    [topic] => Livre
                    [offers] => 13
                    [bestprice] => 7
                )

        )

)
*/

$productListing2 = new ProductListing($client);
$productListing2->setParameter('productids', '283617873');
$productListing2->validParameters();

$plRequest = new ProductListingRequest($productListing2);
$result = $plRequest->fetch();

//Get price with shipping cost
echo $result->getBestPrice();
//11.5

//Get price without shipping cost
echo $result->getBestPrice(false);
//7.5

About

Priceminister SDK - French Marketplace

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.