Skip to content

Commit 995e051

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent 85bd75e commit 995e051

6 files changed

Lines changed: 327 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ Class | Method | HTTP request | Description
277277
*EBayApi* | [**EbayKeywordSuggestions**](docs/EBayApi.md#ebaykeywordsuggestions) | **GET** /v1/ebay/autocomplete | Keyword suggestions
278278
*EBayApi* | [**EbayListCategories**](docs/EBayApi.md#ebaylistcategories) | **GET** /v1/ebay/categories | List categories
279279
*EBayApi* | [**EbayListMarkets**](docs/EBayApi.md#ebaylistmarkets) | **GET** /v1/ebay/markets | List markets
280+
*EBayApi* | [**EbaySearchByImage**](docs/EBayApi.md#ebaysearchbyimage) | **POST** /v1/ebay/search/by-image | Search by image
280281
*EBayApi* | [**EbaySearchListings**](docs/EBayApi.md#ebaysearchlistings) | **GET** /v1/ebay/search | Search listings
281282
*FacebookApi* | [**FacebookBrowseAMarketplaceCategory**](docs/FacebookApi.md#facebookbrowseamarketplacecategory) | **GET** /v1/facebook/marketplace/category/{category} | Browse a Marketplace category
282283
*FacebookApi* | [**FacebookGetAMarketplaceItem**](docs/FacebookApi.md#facebookgetamarketplaceitem) | **GET** /v1/facebook/marketplace/item/{item_id} | Get a Marketplace item

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", "{85D25E9E-4114-4CD2-B55F-D0FC2478E364}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrapeBadger", "src\ScrapeBadger\ScrapeBadger.csproj", "{DB3BBD28-5A10-4EC4-84DC-1FD3E8F78ED1}"
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-
{85D25E9E-4114-4CD2-B55F-D0FC2478E364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{85D25E9E-4114-4CD2-B55F-D0FC2478E364}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{85D25E9E-4114-4CD2-B55F-D0FC2478E364}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{85D25E9E-4114-4CD2-B55F-D0FC2478E364}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{DB3BBD28-5A10-4EC4-84DC-1FD3E8F78ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{DB3BBD28-5A10-4EC4-84DC-1FD3E8F78ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{DB3BBD28-5A10-4EC4-84DC-1FD3E8F78ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{DB3BBD28-5A10-4EC4-84DC-1FD3E8F78ED1}.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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4713,6 +4713,42 @@ paths:
47134713
summary: Search listings
47144714
tags:
47154715
- eBay
4716+
/v1/ebay/search/by-image:
4717+
post:
4718+
description: |-
4719+
Search active listings by image, the way eBay's camera icon does.
4720+
4721+
No ``sort_by``: eBay ignores it on a visual results page.
4722+
operationId: ebay_search_by_image
4723+
requestBody:
4724+
content:
4725+
application/json:
4726+
schema:
4727+
additionalProperties: {}
4728+
description: "{\"image_url\": \"https://…/photo.jpg\", \"domain\": \"\
4729+
com\"} — or send the picture itself as {\"image_base64\": \"<base64\
4730+
\ JPEG/PNG>\"}. Exactly one of the two. Also accepts category_id,\
4731+
\ page, per_page, condition, buying_format, min_price, max_price,\
4732+
\ free_shipping, location and language."
4733+
title: Body
4734+
required: true
4735+
responses:
4736+
"200":
4737+
content:
4738+
application/json:
4739+
schema: {}
4740+
description: Successful Response
4741+
"422":
4742+
content:
4743+
application/json:
4744+
schema:
4745+
$ref: '#/components/schemas/HTTPValidationError'
4746+
description: Validation Error
4747+
security:
4748+
- ApiKeyAuth: []
4749+
summary: Search by image
4750+
tags:
4751+
- eBay
47164752
/v1/ebay/sellers/{username}:
47174753
get:
47184754
description: Get an eBay seller's public profile.

docs/EBayApi.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ All URIs are relative to *https://scrapebadger.com*
1616
| [**EbayKeywordSuggestions**](EBayApi.md#ebaykeywordsuggestions) | **GET** /v1/ebay/autocomplete | Keyword suggestions |
1717
| [**EbayListCategories**](EBayApi.md#ebaylistcategories) | **GET** /v1/ebay/categories | List categories |
1818
| [**EbayListMarkets**](EBayApi.md#ebaylistmarkets) | **GET** /v1/ebay/markets | List markets |
19+
| [**EbaySearchByImage**](EBayApi.md#ebaysearchbyimage) | **POST** /v1/ebay/search/by-image | Search by image |
1920
| [**EbaySearchListings**](EBayApi.md#ebaysearchlistings) | **GET** /v1/ebay/search | Search listings |
2021

2122
<a id="ebaybrowseacategory"></a>
@@ -1260,6 +1261,107 @@ This endpoint does not need any parameter.
12601261

12611262
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
12621263

1264+
<a id="ebaysearchbyimage"></a>
1265+
# **EbaySearchByImage**
1266+
> Object EbaySearchByImage (Dictionary<string, Object> requestBody)
1267+
1268+
Search by image
1269+
1270+
Search active listings by image, the way eBay's camera icon does. No ``sort_by``: eBay ignores it on a visual results page.
1271+
1272+
### Example
1273+
```csharp
1274+
using System.Collections.Generic;
1275+
using System.Diagnostics;
1276+
using System.Net.Http;
1277+
using ScrapeBadger.Api;
1278+
using ScrapeBadger.Client;
1279+
using ScrapeBadger.Model;
1280+
1281+
namespace Example
1282+
{
1283+
public class EbaySearchByImageExample
1284+
{
1285+
public static void Main()
1286+
{
1287+
Configuration config = new Configuration();
1288+
config.BasePath = "https://scrapebadger.com";
1289+
// Configure API key authorization: ApiKeyAuth
1290+
config.AddApiKey("X-API-Key", "YOUR_API_KEY");
1291+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1292+
// config.AddApiKeyPrefix("X-API-Key", "Bearer");
1293+
1294+
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
1295+
HttpClient httpClient = new HttpClient();
1296+
HttpClientHandler httpClientHandler = new HttpClientHandler();
1297+
var apiInstance = new EBayApi(httpClient, config, httpClientHandler);
1298+
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> |
1299+
1300+
try
1301+
{
1302+
// Search by image
1303+
Object result = apiInstance.EbaySearchByImage(requestBody);
1304+
Debug.WriteLine(result);
1305+
}
1306+
catch (ApiException e)
1307+
{
1308+
Debug.Print("Exception when calling EBayApi.EbaySearchByImage: " + e.Message);
1309+
Debug.Print("Status Code: " + e.ErrorCode);
1310+
Debug.Print(e.StackTrace);
1311+
}
1312+
}
1313+
}
1314+
}
1315+
```
1316+
1317+
#### Using the EbaySearchByImageWithHttpInfo variant
1318+
This returns an ApiResponse object which contains the response data, status code and headers.
1319+
1320+
```csharp
1321+
try
1322+
{
1323+
// Search by image
1324+
ApiResponse<Object> response = apiInstance.EbaySearchByImageWithHttpInfo(requestBody);
1325+
Debug.Write("Status Code: " + response.StatusCode);
1326+
Debug.Write("Response Headers: " + response.Headers);
1327+
Debug.Write("Response Body: " + response.Data);
1328+
}
1329+
catch (ApiException e)
1330+
{
1331+
Debug.Print("Exception when calling EBayApi.EbaySearchByImageWithHttpInfo: " + e.Message);
1332+
Debug.Print("Status Code: " + e.ErrorCode);
1333+
Debug.Print(e.StackTrace);
1334+
}
1335+
```
1336+
1337+
### Parameters
1338+
1339+
| Name | Type | Description | Notes |
1340+
|------|------|-------------|-------|
1341+
| **requestBody** | [**Dictionary&lt;string, Object&gt;**](Object.md) | | |
1342+
1343+
### Return type
1344+
1345+
**Object**
1346+
1347+
### Authorization
1348+
1349+
[ApiKeyAuth](../README.md#ApiKeyAuth)
1350+
1351+
### HTTP request headers
1352+
1353+
- **Content-Type**: application/json
1354+
- **Accept**: application/json
1355+
1356+
1357+
### HTTP response details
1358+
| Status code | Description | Response headers |
1359+
|-------------|-------------|------------------|
1360+
| **200** | Successful Response | - |
1361+
| **422** | Validation Error | - |
1362+
1363+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
1364+
12631365
<a id="ebaysearchlistings"></a>
12641366
# **EbaySearchListings**
12651367
> Object EbaySearchListings (string query, string domain = null, string categoryId = null, int? page = null, int? perPage = null, string sortBy = null, string condition = null, string buyingFormat = null, decimal? minPrice = null, decimal? maxPrice = null, bool? freeShipping = null, string location = null, string language = null)

src/ScrapeBadger.Test/Api/EBayApiTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,18 @@ public void EbayListMarketsTest()
220220
//Assert.IsType<Object>(response);
221221
}
222222

223+
/// <summary>
224+
/// Test EbaySearchByImage
225+
/// </summary>
226+
[Fact]
227+
public void EbaySearchByImageTest()
228+
{
229+
// TODO uncomment below to test the method and replace null with proper value
230+
//Dictionary<string, Object> requestBody = null;
231+
//var response = instance.EbaySearchByImage(requestBody);
232+
//Assert.IsType<Object>(response);
233+
}
234+
223235
/// <summary>
224236
/// Test EbaySearchListings
225237
/// </summary>

0 commit comments

Comments
 (0)