Skip to content

Commit 027f936

Browse files
committed
Update README.md
1 parent c30db4a commit 027f936

File tree

1 file changed

+30
-36
lines changed

1 file changed

+30
-36
lines changed

README.md

+30-36
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
[![Amazon Product Advertising API PHP](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/banner.png)](#)
44

5-
Amazon Product Advertising API V5.0 (**Without Amazon SDK**). This repository contains a lightweight PHP (~250 KB) wrapper library (Unofficial), Easily access the [Amazon Product Advertising API V5.0](https://webservices.amazon.com/paapi5/documentation/index.html) from your app.
5+
Apaapi is an unofficial PHP library for accessing the Amazon Product Advertising API (PAAPI) V5.0, without relying on the **Amazon SDK**. It is lightweight (~250 KB) and simplifies interaction with the [Amazon PAAPI V5.0](https://webservices.amazon.com/paapi5/documentation/index.html), making it easier to integrate Amazon product data into PHP applications.
66

7-
-- Become an Amazon Affiliate With PHP --
7+
-- Amazon Affiliate With PHP --
88

99
## 💡 Features
1010

11-
* **Request Builder** (Easier way to fetch data).
12-
* **Credential-less** (No credentials required using scrapper).
11+
* **Request Builder** (Easier way to fetch API data).
12+
* **Credential-less** (No credentials required using scraper).
1313
* **Search Filters** (Using builder).
1414
* **Geotargeting** (Automatically redirect links based on the visitor's region).
1515
* **Cart Generator** (Add to cart URL).
@@ -59,9 +59,9 @@ include('apaapi-main/src/Autoloader.php');
5959

6060
### Quickstart
6161

62-
**Recommended** using Apaapi builder or Apaapi scrapper without API credentials.
62+
**Recommended** using *Apaapi Builder* or *Apaapi Product* (Scraped data) if you dont have API credentials.
6363

64-
[![Product](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/product.png)](#)
64+
[![Product](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/product.png)](#Quickstart)
6565

6666
#### Builder:
6767

@@ -83,9 +83,9 @@ $data = $builder->searchOne('Sony Xperia Pro-I'); // Normalized array
8383
```
8484

8585
> [!Note]
86-
> *See full builder usage at [/wiki/Builder](https://github.com/Jakiboy/apaapi/wiki/Builder)*
86+
> *See full builder usage at [/wiki/Builder](https://github.com/Jakiboy/apaapi/wiki/Builder)* and use case *[/examples](https://github.com/Jakiboy/apaapi/tree/main/examples)*
8787
88-
#### Scrapper:
88+
#### Product:
8989

9090
```php
9191

@@ -94,59 +94,55 @@ $data = $builder->searchOne('Sony Xperia Pro-I'); // Normalized array
9494
* Or include Apaapi Autoloader Here.
9595
*/
9696

97-
use Apaapi\includes\Scrapper;
97+
use Apaapi\includes\Product;
9898

99-
// (1) Init scrapper
100-
$scrapper = new Scrapper('B0D1C9HRFP', '_LOCALE_', '_TAG_');
99+
// (1) Init product
100+
$scraper = new Product('B0D1C9HRFP', '_LOCALE_', '_TAG_');
101101

102102
// (2) Get response
103-
$data = $scrapper->getOne(); // Normalized array
103+
$data = $scraper->get(); // Normalized array
104104

105105
```
106106

107107
> [!Note]
108-
> *See full builder usage at [/wiki/Scrapper](https://github.com/Jakiboy/apaapi/wiki/Scrapper)*
109-
110-
### Cart:
108+
> *See full product usage at [/wiki/Product](https://github.com/Jakiboy/apaapi/wiki/Product)*
109+
### Rating:
111110

112-
Get affiliate cart URL.
111+
Get customer reviews of product as average rating and count (Scraped data).
113112

114-
[![Cart](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/cart.png)](#)
113+
[![Rating](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/rating.png)](#Rating)
115114

116115
```php
117116

118-
use Apaapi\lib\Cart;
117+
use Apaapi\includes\Rating;
119118

120-
// Init Cart
121-
$cart = new Cart();
122-
$cart->setLocale('_LOCALE_')->setPartnerTag('_TAG_');
119+
// Init Rating
120+
$rating = new Rating('_ASIN_', '_LOCALE_', '_TAG_');
123121

124122
// Get Response
125-
$data = $cart->set(['_ASIN_' => 3]); // String
123+
$data = $rating->get(); // Array
126124

127125
```
128126

129-
### Rating:
127+
### Cart:
130128

131-
Get customer reviews of product as average rating and count (Scrapper).
129+
Get affiliate cart URL.
132130

133-
[![Rating](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/rating.png)](#)
131+
[![Cart](https://media.githubusercontent.com/media/Jakiboy/apaapi/refs/heads/main/.static/cart.png)](#Cart)
134132

135133
```php
136134

137-
use Apaapi\includes\Rating;
135+
use Apaapi\lib\Cart;
138136

139-
// Init Rating
140-
$rating = new Rating('_ASIN_', '_LOCALE_', '_TAG_');
137+
// Init Cart
138+
$cart = new Cart();
139+
$cart->setLocale('_LOCALE_')->setPartnerTag('_TAG_');
141140

142141
// Get Response
143-
$data = $rating->get(); // Array
142+
$data = $cart->set(['_ASIN_' => 3]); // String
144143

145144
```
146145

147-
> [!NOTE]
148-
> *All available use case examples are located in [/examples](https://github.com/Jakiboy/apaapi/tree/main/examples)*.
149-
150146
### Basic (Search):
151147

152148
Extensible search method.
@@ -173,7 +169,6 @@ $data = $response->get(); // Array
173169
> [!Note]
174170
> *See all available TLDs used by setLocale() at [/wiki/TLDs](https://github.com/Jakiboy/apaapi/wiki/TLDs)*
175171
176-
177172
### Basic (Get):
178173

179174
Extensible get method.
@@ -264,8 +259,7 @@ $operation->setResources(['Images.Primary.Small', 'ItemInfo.Title', 'Offers.List
264259

265260
### ⭐ Support:
266261

267-
Don't buy me a coffee! Just **star the project** if you like it.
262+
Skip the coffee! If you like the project, a **star** would mean a lot.
268263

269264
> [!IMPORTANT]
270-
> *The Amazon logo included in top of this page refers only to the [Amazon Product Advertising API V5](https://webservices.amazon.com/paapi5/documentation/index.html)*.
271-
[The Official Amazon SDK (PAAPI5)](https://webservices.amazon.com/paapi5/documentation/quick-start/using-sdk.html)
265+
> *The **Amazon logo** included in top of this page refers only to the [Amazon Product Advertising API](https://webservices.amazon.com/paapi5/documentation/index.html)*

0 commit comments

Comments
 (0)