rem42 / scraper-prestashop
API Prestashop 1.7
Installs: 1 756
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 3
pkg:composer/rem42/scraper-prestashop
Requires
- php: ^8.1
- ext-json: *
- rem42/scraper: ^3.2
Requires (Dev)
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^9.6
- rem42/php-cs-fixer-config: ^3.6
- dev-main
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- 3.x-dev
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0
- v2.1
- 2.0.1
- 2.0
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0
- dev-dependabot/composer/phpunit/phpunit-tw-10.3
- dev-renovate/all
- dev-chore/upgrade-scraper
This package is auto-updated.
Last update: 2025-11-06 13:11:36 UTC
README
Scraper can handle multiple request type and transform them into object in order to create some API.
Installation
composer require rem42/scraper-prestashop
Requirement
- PHP >= 8.1
Usage
Initiate the client with the http client of your choice that implement the Symfony\Contracts\HttpClient\HttpClientInterface interface.
<?php use Scraper\Scraper\Client; use Symfony\Component\HttpClient\CurlHttpClient; use Symfony\Component\HttpClient\NativeHttpClient; $client = new Client( new CurlHttpClient() // OR new NativeHttpClient() );
Then you can use the client to make request to the API.
Product list
<?php use Scraper\ScraperPrestashop\Request\PrestashopGetRequest; use Scraper\ScraperPrestashop\Entity\PrestashopProducts; $request = new PrestashopGetRequest( 'host.com', // Your prestashop host 'key', // Your prestashop webservice key 'products', // The resource you want to get, like 'products' ); // optional for list request $request ->addFilter('limit', 1) ->addFilter('offset', 1) ; /** @var PrestashopProducts $products */ $products = $client->execute($request); $products->getProducts(); // Return an array of PrestashopProduct
Product detail
<?php use Scraper\ScraperPrestashop\Request\PrestashopGetRequest; use Scraper\ScraperPrestashop\Entity\PrestashopProduct; $request = new PrestashopGetRequest( 'host.com', // Your prestashop host 'key', // Your prestashop webservice key 'products', // The resource you want to get, like 'products' ); $request->setId(42); /** @var PrestashopProduct $product */ $product = $client->execute($request); $product->name; // Return the product name $product->dateAdd; // Return the product creation date