Skip to content

Commit 726e41f

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent cdbdc20 commit 726e41f

2 files changed

Lines changed: 53 additions & 25 deletions

File tree

docs/Api/GoogleApi.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,12 +1598,12 @@ try {
15981598
## `googleMultiSellerOffersByBarcode()`
15991599

16001600
```php
1601-
googleMultiSellerOffersByBarcode($barcode, $gl, $hl): mixed
1601+
googleMultiSellerOffersByBarcode($barcode, $catalog_id, $gl, $hl, $domain): mixed
16021602
```
16031603

16041604
Multi-seller offers by barcode
16051605

1606-
Resolve a barcode to a product via Google web search, then return its Google Shopping seller offers (source + price per merchant).
1606+
Google Shopping seller offers (source + price + link per merchant) for a product identified either by ``barcode`` (resolved via Google web search) or by its Google Shopping ``catalog_id`` (read straight off Google's product page, all seller pages fetched in parallel).
16071607

16081608
### Example
16091609

@@ -1625,11 +1625,13 @@ $apiInstance = new ScrapeBadger\Api\GoogleApi(
16251625
$config
16261626
);
16271627
$barcode = 'barcode_example'; // string | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
1628+
$catalog_id = 'catalog_id_example'; // string | Google Shopping catalogid (the `catalog_id` on /shopping/search tiles, or `prds=catalogid:<id>` in a Google Shopping URL). Alternative to `barcode`; exactly one of the two is required
16281629
$gl = 'gl_example'; // string | Country code (ISO 3166 alpha-2)
16291630
$hl = 'en'; // string | Language code
1631+
$domain = 'google.com'; // string | Google domain
16301632

16311633
try {
1632-
$result = $apiInstance->googleMultiSellerOffersByBarcode($barcode, $gl, $hl);
1634+
$result = $apiInstance->googleMultiSellerOffersByBarcode($barcode, $catalog_id, $gl, $hl, $domain);
16331635
print_r($result);
16341636
} catch (Exception $e) {
16351637
echo 'Exception when calling GoogleApi->googleMultiSellerOffersByBarcode: ', $e->getMessage(), PHP_EOL;
@@ -1640,9 +1642,11 @@ try {
16401642

16411643
| Name | Type | Description | Notes |
16421644
| ------------- | ------------- | ------------- | ------------- |
1643-
| **barcode** | **string**| Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 | |
1645+
| **barcode** | **string**| Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 | [optional] |
1646+
| **catalog_id** | **string**| Google Shopping catalogid (the &#x60;catalog_id&#x60; on /shopping/search tiles, or &#x60;prds&#x3D;catalogid:&lt;id&gt;&#x60; in a Google Shopping URL). Alternative to &#x60;barcode&#x60;; exactly one of the two is required | [optional] |
16441647
| **gl** | **string**| Country code (ISO 3166 alpha-2) | [optional] |
16451648
| **hl** | **string**| Language code | [optional] [default to &#39;en&#39;] |
1649+
| **domain** | **string**| Google domain | [optional] [default to &#39;google.com&#39;] |
16461650

16471651
### Return type
16481652

lib/Api/GoogleApi.php

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9490,18 +9490,20 @@ public function googleInterestOverTimeRequest($q, $geo = '', $date = 'today 12-m
94909490
*
94919491
* Multi-seller offers by barcode
94929492
*
9493-
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (required)
9493+
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (optional)
9494+
* @param string $catalog_id Google Shopping catalogid (the &#x60;catalog_id&#x60; on /shopping/search tiles, or &#x60;prds&#x3D;catalogid:&lt;id&gt;&#x60; in a Google Shopping URL). Alternative to &#x60;barcode&#x60;; exactly one of the two is required (optional)
94949495
* @param string $gl Country code (ISO 3166 alpha-2) (optional)
94959496
* @param string $hl Language code (optional, default to 'en')
9497+
* @param string $domain Google domain (optional, default to 'google.com')
94969498
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['googleMultiSellerOffersByBarcode'] to see the possible values for this operation
94979499
*
94989500
* @throws \ScrapeBadger\ApiException on non-2xx response or if the response body is not in the expected format
94999501
* @throws \InvalidArgumentException
95009502
* @return mixed|\ScrapeBadger\Model\HTTPValidationError
95019503
*/
9502-
public function googleMultiSellerOffersByBarcode($barcode, $gl = null, $hl = 'en', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
9504+
public function googleMultiSellerOffersByBarcode($barcode = null, $catalog_id = null, $gl = null, $hl = 'en', $domain = 'google.com', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
95039505
{
9504-
list($response) = $this->googleMultiSellerOffersByBarcodeWithHttpInfo($barcode, $gl, $hl, $contentType);
9506+
list($response) = $this->googleMultiSellerOffersByBarcodeWithHttpInfo($barcode, $catalog_id, $gl, $hl, $domain, $contentType);
95059507
return $response;
95069508
}
95079509

@@ -9510,18 +9512,20 @@ public function googleMultiSellerOffersByBarcode($barcode, $gl = null, $hl = 'en
95109512
*
95119513
* Multi-seller offers by barcode
95129514
*
9513-
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (required)
9515+
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (optional)
9516+
* @param string $catalog_id Google Shopping catalogid (the &#x60;catalog_id&#x60; on /shopping/search tiles, or &#x60;prds&#x3D;catalogid:&lt;id&gt;&#x60; in a Google Shopping URL). Alternative to &#x60;barcode&#x60;; exactly one of the two is required (optional)
95149517
* @param string $gl Country code (ISO 3166 alpha-2) (optional)
95159518
* @param string $hl Language code (optional, default to 'en')
9519+
* @param string $domain Google domain (optional, default to 'google.com')
95169520
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['googleMultiSellerOffersByBarcode'] to see the possible values for this operation
95179521
*
95189522
* @throws \ScrapeBadger\ApiException on non-2xx response or if the response body is not in the expected format
95199523
* @throws \InvalidArgumentException
95209524
* @return array of mixed|\ScrapeBadger\Model\HTTPValidationError, HTTP status code, HTTP response headers (array of strings)
95219525
*/
9522-
public function googleMultiSellerOffersByBarcodeWithHttpInfo($barcode, $gl = null, $hl = 'en', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
9526+
public function googleMultiSellerOffersByBarcodeWithHttpInfo($barcode = null, $catalog_id = null, $gl = null, $hl = 'en', $domain = 'google.com', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
95239527
{
9524-
$request = $this->googleMultiSellerOffersByBarcodeRequest($barcode, $gl, $hl, $contentType);
9528+
$request = $this->googleMultiSellerOffersByBarcodeRequest($barcode, $catalog_id, $gl, $hl, $domain, $contentType);
95259529

95269530
try {
95279531
$options = $this->createHttpClientOption();
@@ -9672,17 +9676,19 @@ public function googleMultiSellerOffersByBarcodeWithHttpInfo($barcode, $gl = nul
96729676
*
96739677
* Multi-seller offers by barcode
96749678
*
9675-
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (required)
9679+
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (optional)
9680+
* @param string $catalog_id Google Shopping catalogid (the &#x60;catalog_id&#x60; on /shopping/search tiles, or &#x60;prds&#x3D;catalogid:&lt;id&gt;&#x60; in a Google Shopping URL). Alternative to &#x60;barcode&#x60;; exactly one of the two is required (optional)
96769681
* @param string $gl Country code (ISO 3166 alpha-2) (optional)
96779682
* @param string $hl Language code (optional, default to 'en')
9683+
* @param string $domain Google domain (optional, default to 'google.com')
96789684
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['googleMultiSellerOffersByBarcode'] to see the possible values for this operation
96799685
*
96809686
* @throws \InvalidArgumentException
96819687
* @return \GuzzleHttp\Promise\PromiseInterface
96829688
*/
9683-
public function googleMultiSellerOffersByBarcodeAsync($barcode, $gl = null, $hl = 'en', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
9689+
public function googleMultiSellerOffersByBarcodeAsync($barcode = null, $catalog_id = null, $gl = null, $hl = 'en', $domain = 'google.com', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
96849690
{
9685-
return $this->googleMultiSellerOffersByBarcodeAsyncWithHttpInfo($barcode, $gl, $hl, $contentType)
9691+
return $this->googleMultiSellerOffersByBarcodeAsyncWithHttpInfo($barcode, $catalog_id, $gl, $hl, $domain, $contentType)
96869692
->then(
96879693
function ($response) {
96889694
return $response[0];
@@ -9695,18 +9701,20 @@ function ($response) {
96959701
*
96969702
* Multi-seller offers by barcode
96979703
*
9698-
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (required)
9704+
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (optional)
9705+
* @param string $catalog_id Google Shopping catalogid (the &#x60;catalog_id&#x60; on /shopping/search tiles, or &#x60;prds&#x3D;catalogid:&lt;id&gt;&#x60; in a Google Shopping URL). Alternative to &#x60;barcode&#x60;; exactly one of the two is required (optional)
96999706
* @param string $gl Country code (ISO 3166 alpha-2) (optional)
97009707
* @param string $hl Language code (optional, default to 'en')
9708+
* @param string $domain Google domain (optional, default to 'google.com')
97019709
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['googleMultiSellerOffersByBarcode'] to see the possible values for this operation
97029710
*
97039711
* @throws \InvalidArgumentException
97049712
* @return \GuzzleHttp\Promise\PromiseInterface
97059713
*/
9706-
public function googleMultiSellerOffersByBarcodeAsyncWithHttpInfo($barcode, $gl = null, $hl = 'en', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
9714+
public function googleMultiSellerOffersByBarcodeAsyncWithHttpInfo($barcode = null, $catalog_id = null, $gl = null, $hl = 'en', $domain = 'google.com', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
97079715
{
97089716
$returnType = 'mixed';
9709-
$request = $this->googleMultiSellerOffersByBarcodeRequest($barcode, $gl, $hl, $contentType);
9717+
$request = $this->googleMultiSellerOffersByBarcodeRequest($barcode, $catalog_id, $gl, $hl, $domain, $contentType);
97109718

97119719
return $this->client
97129720
->sendAsync($request, $this->createHttpClientOption())
@@ -9747,23 +9755,21 @@ function ($exception) {
97479755
/**
97489756
* Create request for operation 'googleMultiSellerOffersByBarcode'
97499757
*
9750-
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (required)
9758+
* @param string $barcode Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (optional)
9759+
* @param string $catalog_id Google Shopping catalogid (the &#x60;catalog_id&#x60; on /shopping/search tiles, or &#x60;prds&#x3D;catalogid:&lt;id&gt;&#x60; in a Google Shopping URL). Alternative to &#x60;barcode&#x60;; exactly one of the two is required (optional)
97519760
* @param string $gl Country code (ISO 3166 alpha-2) (optional)
97529761
* @param string $hl Language code (optional, default to 'en')
9762+
* @param string $domain Google domain (optional, default to 'google.com')
97539763
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['googleMultiSellerOffersByBarcode'] to see the possible values for this operation
97549764
*
97559765
* @throws \InvalidArgumentException
97569766
* @return \GuzzleHttp\Psr7\Request
97579767
*/
9758-
public function googleMultiSellerOffersByBarcodeRequest($barcode, $gl = null, $hl = 'en', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
9768+
public function googleMultiSellerOffersByBarcodeRequest($barcode = null, $catalog_id = null, $gl = null, $hl = 'en', $domain = 'google.com', string $contentType = self::contentTypes['googleMultiSellerOffersByBarcode'][0])
97599769
{
97609770

9761-
// verify the required parameter 'barcode' is set
9762-
if ($barcode === null || (is_array($barcode) && count($barcode) === 0)) {
9763-
throw new \InvalidArgumentException(
9764-
'Missing the required parameter $barcode when calling googleMultiSellerOffersByBarcode'
9765-
);
9766-
}
9771+
9772+
97679773

97689774

97699775

@@ -9782,7 +9788,16 @@ public function googleMultiSellerOffersByBarcodeRequest($barcode, $gl = null, $h
97829788
'string', // openApiType
97839789
'form', // style
97849790
true, // explode
9785-
true // required
9791+
false // required
9792+
) ?? []);
9793+
// query params
9794+
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
9795+
$catalog_id,
9796+
'catalog_id', // param base name
9797+
'string', // openApiType
9798+
'form', // style
9799+
true, // explode
9800+
false // required
97869801
) ?? []);
97879802
// query params
97889803
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
@@ -9802,6 +9817,15 @@ public function googleMultiSellerOffersByBarcodeRequest($barcode, $gl = null, $h
98029817
true, // explode
98039818
false // required
98049819
) ?? []);
9820+
// query params
9821+
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
9822+
$domain,
9823+
'domain', // param base name
9824+
'string', // openApiType
9825+
'form', // style
9826+
true, // explode
9827+
false // required
9828+
) ?? []);
98059829

98069830

98079831

0 commit comments

Comments
 (0)