Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rem42/scraper-prestashop
https://github.com/rem42/scraper-prestashop
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rem42/scraper-prestashop
- Owner: rem42
- License: mit
- Created: 2018-09-05T13:57:39.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T03:51:28.000Z (over 1 year ago)
- Last Synced: 2023-09-20T02:04:57.377Z (over 1 year ago)
- Language: PHP
- Size: 165 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Scraper Prestashop
==================![Packagist version](https://flat.badgen.net/packagist/v/rem42/scraper-prestashop)
![Packagist download](https://flat.badgen.net/packagist/dt/rem42/scraper-prestashop)
![Packagist name](https://flat.badgen.net/packagist/name/rem42/scraper-prestashop)
![Packagist php version](https://flat.badgen.net/packagist/php/rem42/scraper-prestashop)
![Github licence](https://flat.badgen.net/github/license/rem42/scraper-prestashop)
![Depenabot](https://flat.badgen.net/github/dependabot/rem42/scraper-prestashop)
![Codeclimate lines of code](https://flat.badgen.net/codeclimate/loc/rem42/scraper-prestashop)
![Codeclimate maintainability](https://flat.badgen.net/codeclimate/maintainability/rem42/scraper-prestashop)Scraper can handle multiple request type and transform them into object in order to create some API.
Installation
------------````bash
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
addFilter('limit', 1)
->addFilter('offset', 1)
;/** @var PrestashopProducts $products */
$products = $client->execute($request);$products->getProducts(); // Return an array of PrestashopProduct
`````Product detail
--------------`````php
setId(42);/** @var PrestashopProduct $product */
$product = $client->execute($request);$product->name; // Return the product name
$product->dateAdd; // Return the product creation date
`````