-
-
Notifications
You must be signed in to change notification settings - Fork 8
Rating
Jakiboy edited this page Jan 29, 2025
·
1 revision
This document guide you on how to utilize the Apaapi rating (Scraper).
To use the Apaapi product, it needs to be imported into your project and initialized (No credentials required).
use Apaapi\includes\Rating;
$rating = new Rating(keyword: '_KEYWORD_', local: '_LOCALE_', tag: '_TAG_');
The get()
method is designed to retrieve only a single product rating.
- Accept:
String
ASIN, ISBN
$rating = new Rating(keyword: 'B09G8XNW16');
$data = $rating->get();
This class inherits from the Apaapi scraper and uses the HTML DOM with specific selectors to get data.
Use setBaseUrl()
method to override the base URL.
$rating->setBaseUrl();
Use setSelectors()
method to override the selectors array.
$rating->setSelectors();