Skip to content

Commit 3156196

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent 552d372 commit 3156196

5 files changed

Lines changed: 112 additions & 53 deletions

File tree

ScrapeBadger.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrapeBadger", "src\ScrapeBadger\ScrapeBadger.csproj", "{07A90D8E-B0D6-4096-95D3-C52512A9518F}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrapeBadger", "src\ScrapeBadger\ScrapeBadger.csproj", "{981C7BFF-97F7-4E29-B0D6-9B6DEA02A6F3}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrapeBadger.Test", "src\ScrapeBadger.Test\ScrapeBadger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{07A90D8E-B0D6-4096-95D3-C52512A9518F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{07A90D8E-B0D6-4096-95D3-C52512A9518F}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{07A90D8E-B0D6-4096-95D3-C52512A9518F}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{07A90D8E-B0D6-4096-95D3-C52512A9518F}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{981C7BFF-97F7-4E29-B0D6-9B6DEA02A6F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{981C7BFF-97F7-4E29-B0D6-9B6DEA02A6F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{981C7BFF-97F7-4E29-B0D6-9B6DEA02A6F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{981C7BFF-97F7-4E29-B0D6-9B6DEA02A6F3}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

api/openapi.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8971,18 +8971,30 @@ paths:
89718971
/v1/google/shopping/offers:
89728972
get:
89738973
description: |-
8974-
Resolve a barcode to a product via Google web search, then return its
8975-
Google Shopping seller offers (source + price per merchant).
8974+
Google Shopping seller offers (source + price + link per merchant) for a
8975+
product identified either by ``barcode`` (resolved via Google web search) or
8976+
by its Google Shopping ``catalog_id`` (read straight off Google's product
8977+
page, all seller pages fetched in parallel).
89768978
operationId: google_multi_seller_offers_by_barcode
89778979
parameters:
89788980
- description: Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
89798981
explode: true
89808982
in: query
89818983
name: barcode
8982-
required: true
8984+
required: false
89838985
schema:
8984-
description: Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
8985-
title: Barcode
8986+
nullable: true
8987+
type: string
8988+
style: form
8989+
- description: "Google Shopping catalogid (the `catalog_id` on /shopping/search\
8990+
\ tiles, or `prds=catalogid:<id>` in a Google Shopping URL). Alternative\
8991+
\ to `barcode`; exactly one of the two is required"
8992+
explode: true
8993+
in: query
8994+
name: catalog_id
8995+
required: false
8996+
schema:
8997+
nullable: true
89868998
type: string
89878999
style: form
89889000
- description: Country code (ISO 3166 alpha-2)
@@ -9005,6 +9017,17 @@ paths:
90059017
title: Hl
90069018
type: string
90079019
style: form
9020+
- description: Google domain
9021+
explode: true
9022+
in: query
9023+
name: domain
9024+
required: false
9025+
schema:
9026+
default: google.com
9027+
description: Google domain
9028+
title: Domain
9029+
type: string
9030+
style: form
90089031
responses:
90099032
"200":
90109033
content:

docs/GoogleApi.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,11 +2448,11 @@ catch (ApiException e)
24482448

24492449
<a id="googlemultiselleroffersbybarcode"></a>
24502450
# **GoogleMultiSellerOffersByBarcode**
2451-
> Object GoogleMultiSellerOffersByBarcode (string barcode, string gl = null, string hl = null)
2451+
> Object GoogleMultiSellerOffersByBarcode (string barcode = null, string catalogId = null, string gl = null, string hl = null, string domain = null)
24522452
24532453
Multi-seller offers by barcode
24542454

2455-
Resolve a barcode to a product via Google web search, then return its Google Shopping seller offers (source + price per merchant).
2455+
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).
24562456

24572457
### Example
24582458
```csharp
@@ -2480,14 +2480,16 @@ namespace Example
24802480
HttpClient httpClient = new HttpClient();
24812481
HttpClientHandler httpClientHandler = new HttpClientHandler();
24822482
var apiInstance = new GoogleApi(httpClient, config, httpClientHandler);
2483-
var barcode = "barcode_example"; // string | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
2483+
var barcode = "barcode_example"; // string | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 (optional)
2484+
var catalogId = "catalogId_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 (optional)
24842485
var gl = "gl_example"; // string | Country code (ISO 3166 alpha-2) (optional)
24852486
var hl = "\"en\""; // string | Language code (optional) (default to "en")
2487+
var domain = "\"google.com\""; // string | Google domain (optional) (default to "google.com")
24862488
24872489
try
24882490
{
24892491
// Multi-seller offers by barcode
2490-
Object result = apiInstance.GoogleMultiSellerOffersByBarcode(barcode, gl, hl);
2492+
Object result = apiInstance.GoogleMultiSellerOffersByBarcode(barcode, catalogId, gl, hl, domain);
24912493
Debug.WriteLine(result);
24922494
}
24932495
catch (ApiException e)
@@ -2508,7 +2510,7 @@ This returns an ApiResponse object which contains the response data, status code
25082510
try
25092511
{
25102512
// Multi-seller offers by barcode
2511-
ApiResponse<Object> response = apiInstance.GoogleMultiSellerOffersByBarcodeWithHttpInfo(barcode, gl, hl);
2513+
ApiResponse<Object> response = apiInstance.GoogleMultiSellerOffersByBarcodeWithHttpInfo(barcode, catalogId, gl, hl, domain);
25122514
Debug.Write("Status Code: " + response.StatusCode);
25132515
Debug.Write("Response Headers: " + response.Headers);
25142516
Debug.Write("Response Body: " + response.Data);
@@ -2525,9 +2527,11 @@ catch (ApiException e)
25252527

25262528
| Name | Type | Description | Notes |
25272529
|------|------|-------------|-------|
2528-
| **barcode** | **string** | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 | |
2530+
| **barcode** | **string** | Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14 | [optional] |
2531+
| **catalogId** | **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] |
25292532
| **gl** | **string** | Country code (ISO 3166 alpha-2) | [optional] |
25302533
| **hl** | **string** | Language code | [optional] [default to &quot;en&quot;] |
2534+
| **domain** | **string** | Google domain | [optional] [default to &quot;google.com&quot;] |
25312535

25322536
### Return type
25332537

src/ScrapeBadger.Test/Api/GoogleApiTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,11 @@ public void GoogleMultiSellerOffersByBarcodeTest()
426426
{
427427
// TODO uncomment below to test the method and replace null with proper value
428428
//string barcode = null;
429+
//string catalogId = null;
429430
//string gl = null;
430431
//string hl = null;
431-
//var response = instance.GoogleMultiSellerOffersByBarcode(barcode, gl, hl);
432+
//string domain = null;
433+
//var response = instance.GoogleMultiSellerOffersByBarcode(barcode, catalogId, gl, hl, domain);
432434
//Assert.IsType<Object>(response);
433435
}
434436

0 commit comments

Comments
 (0)