A simple PHP SDK for service ymscanner.ru.
Version 2.1 changes:
- getInfo() setData() -> parent::__construct()
- getPrices() int $id - string $ids
Version 2.0 changes (new methods):
- searchmodel
- bulkprice
- price
Add the repository as a submodule to your project
$ git submodule add git://github.com/demyashev/market-scanner.git </path/to/clone>
Add these lines to the file composer.json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/demyashev/market-scanner"
}
],
"require": {
"demyashev/market-scanner": "@dev"
}
}
include __DIR__ . '/../src/vendor/autoload.php';
$key = '<auth_key>';
$productId = 415763024;
$scanner = new \MarketScanner\Scanner($key);
$balance = $scanner->getBalance();
// $balance = (new \MarketScanner\Model\Balance($key))->getBalance();
$info = $scanner->getInfo($productId);
// $info = new \MarketScanner\Model\Info($key, $productId);
$photos = $scanner->getPhotos($productId);
// $photos = (new \MarketScanner\Model\Photos($key, $productId))->getPictures();
$specs = $scanner->getSpecs($productId);
// $specs = (new \MarketScanner\Model\Specs($key, $productId))->getSpecifications();
$reviews = $scanner->getReviews($productId);
// $reviews = (new \MarketScanner\Model\Reviews($key, $productId))
You can find more information in example file.