Skip to content

Commit c82db71

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent 0b73798 commit c82db71

4 files changed

Lines changed: 52 additions & 26 deletions

File tree

api/openapi.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5526,7 +5526,13 @@ paths:
55265526
- application/json
55275527
/v1/facebook/marketplace/search:
55285528
get:
5529-
description: Search Facebook Marketplace listings by keyword and location.
5529+
description: |-
5530+
Search Facebook Marketplace listings by keyword and location.
5531+
5532+
``location`` must be a Facebook location slug (``london``, ``newcastleupontyne``)
5533+
or a numeric Facebook place id — the ``city_page_id`` on any listing is one.
5534+
Human-readable names such as ``Durham, UK`` are rejected with a 400 rather than
5535+
silently searching Facebook's San Francisco default.
55305536
operationId: facebook_search_marketplace
55315537
parameters:
55325538
- description: Search keywords
@@ -5539,14 +5545,14 @@ paths:
55395545
title: Query
55405546
type: string
55415547
style: form
5542-
- description: Marketplace location slug
5548+
- description: Marketplace location slug or numeric place id
55435549
explode: true
55445550
in: query
55455551
name: location
55465552
required: false
55475553
schema:
55485554
default: nyc
5549-
description: Marketplace location slug
5555+
description: Marketplace location slug or numeric place id
55505556
title: Location
55515557
type: string
55525558
style: form
@@ -5598,6 +5604,15 @@ paths:
55985604
nullable: true
55995605
type: string
56005606
style: form
5607+
- description: "Search radius around the location (km, or miles in the US)"
5608+
explode: true
5609+
in: query
5610+
name: radius
5611+
required: false
5612+
schema:
5613+
nullable: true
5614+
type: integer
5615+
style: form
56015616
- explode: true
56025617
in: query
56035618
name: after

docs/FacebookApi.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,11 +1314,11 @@ public class Example {
13141314

13151315
<a id="facebookSearchMarketplace"></a>
13161316
# **facebookSearchMarketplace**
1317-
> Object facebookSearchMarketplace(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after)
1317+
> Object facebookSearchMarketplace(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after)
13181318
13191319
Search Marketplace
13201320

1321-
Search Facebook Marketplace listings by keyword and location.
1321+
Search Facebook Marketplace listings by keyword and location. &#x60;&#x60;location&#x60;&#x60; must be a Facebook location slug (&#x60;&#x60;london&#x60;&#x60;, &#x60;&#x60;newcastleupontyne&#x60;&#x60;) or a numeric Facebook place id — the &#x60;&#x60;city_page_id&#x60;&#x60; on any listing is one. Human-readable names such as &#x60;&#x60;Durham, UK&#x60;&#x60; are rejected with a 400 rather than silently searching Facebook&#39;s San Francisco default.
13221322

13231323
### Example
13241324
```java
@@ -1343,16 +1343,17 @@ public class Example {
13431343

13441344
FacebookApi apiInstance = new FacebookApi(defaultClient);
13451345
String query = "query_example"; // String | Search keywords
1346-
String location = "nyc"; // String | Marketplace location slug
1346+
String location = "nyc"; // String | Marketplace location slug or numeric place id
13471347
Integer minPrice = 56; // Integer |
13481348
Integer maxPrice = 56; // Integer |
13491349
Integer daysSinceListed = 56; // Integer |
13501350
String sortBy = "sortBy_example"; // String |
13511351
String itemCondition = "itemCondition_example"; // String |
13521352
String deliveryMethod = "deliveryMethod_example"; // String |
1353+
Integer radius = 56; // Integer | Search radius around the location (km, or miles in the US)
13531354
String after = "after_example"; // String |
13541355
try {
1355-
Object result = apiInstance.facebookSearchMarketplace(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after);
1356+
Object result = apiInstance.facebookSearchMarketplace(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after);
13561357
System.out.println(result);
13571358
} catch (ApiException e) {
13581359
System.err.println("Exception when calling FacebookApi#facebookSearchMarketplace");
@@ -1370,13 +1371,14 @@ public class Example {
13701371
| Name | Type | Description | Notes |
13711372
|------------- | ------------- | ------------- | -------------|
13721373
| **query** | **String**| Search keywords | |
1373-
| **location** | **String**| Marketplace location slug | [optional] [default to nyc] |
1374+
| **location** | **String**| Marketplace location slug or numeric place id | [optional] [default to nyc] |
13741375
| **minPrice** | **Integer**| | [optional] |
13751376
| **maxPrice** | **Integer**| | [optional] |
13761377
| **daysSinceListed** | **Integer**| | [optional] |
13771378
| **sortBy** | **String**| | [optional] |
13781379
| **itemCondition** | **String**| | [optional] |
13791380
| **deliveryMethod** | **String**| | [optional] |
1381+
| **radius** | **Integer**| Search radius around the location (km, or miles in the US) | [optional] |
13801382
| **after** | **String**| | [optional] |
13811383

13821384
### Return type

src/main/java/com/scrapebadger/client/api/FacebookApi.java

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,13 +2545,14 @@ public okhttp3.Call facebookSearchGroupsAsync(String q, String after, final ApiC
25452545
/**
25462546
* Build call for facebookSearchMarketplace
25472547
* @param query Search keywords (required)
2548-
* @param location Marketplace location slug (optional, default to nyc)
2548+
* @param location Marketplace location slug or numeric place id (optional, default to nyc)
25492549
* @param minPrice (optional)
25502550
* @param maxPrice (optional)
25512551
* @param daysSinceListed (optional)
25522552
* @param sortBy (optional)
25532553
* @param itemCondition (optional)
25542554
* @param deliveryMethod (optional)
2555+
* @param radius Search radius around the location (km, or miles in the US) (optional)
25552556
* @param after (optional)
25562557
* @param _callback Callback for upload/download progress
25572558
* @return Call to execute
@@ -2564,7 +2565,7 @@ public okhttp3.Call facebookSearchGroupsAsync(String q, String after, final ApiC
25642565
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
25652566
</table>
25662567
*/
2567-
public okhttp3.Call facebookSearchMarketplaceCall(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, String after, final ApiCallback _callback) throws ApiException {
2568+
public okhttp3.Call facebookSearchMarketplaceCall(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, Integer radius, String after, final ApiCallback _callback) throws ApiException {
25682569
String basePath = null;
25692570
// Operation Servers
25702571
String[] localBasePaths = new String[] { };
@@ -2621,6 +2622,10 @@ public okhttp3.Call facebookSearchMarketplaceCall(String query, String location,
26212622
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delivery_method", deliveryMethod));
26222623
}
26232624

2625+
if (radius != null) {
2626+
localVarQueryParams.addAll(localVarApiClient.parameterToPair("radius", radius));
2627+
}
2628+
26242629
if (after != null) {
26252630
localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
26262631
}
@@ -2645,27 +2650,28 @@ public okhttp3.Call facebookSearchMarketplaceCall(String query, String location,
26452650
}
26462651

26472652
@SuppressWarnings("rawtypes")
2648-
private okhttp3.Call facebookSearchMarketplaceValidateBeforeCall(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, String after, final ApiCallback _callback) throws ApiException {
2653+
private okhttp3.Call facebookSearchMarketplaceValidateBeforeCall(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, Integer radius, String after, final ApiCallback _callback) throws ApiException {
26492654
// verify the required parameter 'query' is set
26502655
if (query == null) {
26512656
throw new ApiException("Missing the required parameter 'query' when calling facebookSearchMarketplace(Async)");
26522657
}
26532658

2654-
return facebookSearchMarketplaceCall(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after, _callback);
2659+
return facebookSearchMarketplaceCall(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after, _callback);
26552660

26562661
}
26572662

26582663
/**
26592664
* Search Marketplace
2660-
* Search Facebook Marketplace listings by keyword and location.
2665+
* Search Facebook Marketplace listings by keyword and location. &#x60;&#x60;location&#x60;&#x60; must be a Facebook location slug (&#x60;&#x60;london&#x60;&#x60;, &#x60;&#x60;newcastleupontyne&#x60;&#x60;) or a numeric Facebook place id — the &#x60;&#x60;city_page_id&#x60;&#x60; on any listing is one. Human-readable names such as &#x60;&#x60;Durham, UK&#x60;&#x60; are rejected with a 400 rather than silently searching Facebook&#39;s San Francisco default.
26612666
* @param query Search keywords (required)
2662-
* @param location Marketplace location slug (optional, default to nyc)
2667+
* @param location Marketplace location slug or numeric place id (optional, default to nyc)
26632668
* @param minPrice (optional)
26642669
* @param maxPrice (optional)
26652670
* @param daysSinceListed (optional)
26662671
* @param sortBy (optional)
26672672
* @param itemCondition (optional)
26682673
* @param deliveryMethod (optional)
2674+
* @param radius Search radius around the location (km, or miles in the US) (optional)
26692675
* @param after (optional)
26702676
* @return Object
26712677
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -2677,22 +2683,23 @@ private okhttp3.Call facebookSearchMarketplaceValidateBeforeCall(String query, S
26772683
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
26782684
</table>
26792685
*/
2680-
public Object facebookSearchMarketplace(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, String after) throws ApiException {
2681-
ApiResponse<Object> localVarResp = facebookSearchMarketplaceWithHttpInfo(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after);
2686+
public Object facebookSearchMarketplace(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, Integer radius, String after) throws ApiException {
2687+
ApiResponse<Object> localVarResp = facebookSearchMarketplaceWithHttpInfo(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after);
26822688
return localVarResp.getData();
26832689
}
26842690

26852691
/**
26862692
* Search Marketplace
2687-
* Search Facebook Marketplace listings by keyword and location.
2693+
* Search Facebook Marketplace listings by keyword and location. &#x60;&#x60;location&#x60;&#x60; must be a Facebook location slug (&#x60;&#x60;london&#x60;&#x60;, &#x60;&#x60;newcastleupontyne&#x60;&#x60;) or a numeric Facebook place id — the &#x60;&#x60;city_page_id&#x60;&#x60; on any listing is one. Human-readable names such as &#x60;&#x60;Durham, UK&#x60;&#x60; are rejected with a 400 rather than silently searching Facebook&#39;s San Francisco default.
26882694
* @param query Search keywords (required)
2689-
* @param location Marketplace location slug (optional, default to nyc)
2695+
* @param location Marketplace location slug or numeric place id (optional, default to nyc)
26902696
* @param minPrice (optional)
26912697
* @param maxPrice (optional)
26922698
* @param daysSinceListed (optional)
26932699
* @param sortBy (optional)
26942700
* @param itemCondition (optional)
26952701
* @param deliveryMethod (optional)
2702+
* @param radius Search radius around the location (km, or miles in the US) (optional)
26962703
* @param after (optional)
26972704
* @return ApiResponse&lt;Object&gt;
26982705
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -2704,23 +2711,24 @@ public Object facebookSearchMarketplace(String query, String location, Integer m
27042711
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
27052712
</table>
27062713
*/
2707-
public ApiResponse<Object> facebookSearchMarketplaceWithHttpInfo(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, String after) throws ApiException {
2708-
okhttp3.Call localVarCall = facebookSearchMarketplaceValidateBeforeCall(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after, null);
2714+
public ApiResponse<Object> facebookSearchMarketplaceWithHttpInfo(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, Integer radius, String after) throws ApiException {
2715+
okhttp3.Call localVarCall = facebookSearchMarketplaceValidateBeforeCall(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after, null);
27092716
Type localVarReturnType = new TypeToken<Object>(){}.getType();
27102717
return localVarApiClient.execute(localVarCall, localVarReturnType);
27112718
}
27122719

27132720
/**
27142721
* Search Marketplace (asynchronously)
2715-
* Search Facebook Marketplace listings by keyword and location.
2722+
* Search Facebook Marketplace listings by keyword and location. &#x60;&#x60;location&#x60;&#x60; must be a Facebook location slug (&#x60;&#x60;london&#x60;&#x60;, &#x60;&#x60;newcastleupontyne&#x60;&#x60;) or a numeric Facebook place id — the &#x60;&#x60;city_page_id&#x60;&#x60; on any listing is one. Human-readable names such as &#x60;&#x60;Durham, UK&#x60;&#x60; are rejected with a 400 rather than silently searching Facebook&#39;s San Francisco default.
27162723
* @param query Search keywords (required)
2717-
* @param location Marketplace location slug (optional, default to nyc)
2724+
* @param location Marketplace location slug or numeric place id (optional, default to nyc)
27182725
* @param minPrice (optional)
27192726
* @param maxPrice (optional)
27202727
* @param daysSinceListed (optional)
27212728
* @param sortBy (optional)
27222729
* @param itemCondition (optional)
27232730
* @param deliveryMethod (optional)
2731+
* @param radius Search radius around the location (km, or miles in the US) (optional)
27242732
* @param after (optional)
27252733
* @param _callback The callback to be executed when the API call finishes
27262734
* @return The request call
@@ -2733,9 +2741,9 @@ public ApiResponse<Object> facebookSearchMarketplaceWithHttpInfo(String query, S
27332741
<tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
27342742
</table>
27352743
*/
2736-
public okhttp3.Call facebookSearchMarketplaceAsync(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, String after, final ApiCallback<Object> _callback) throws ApiException {
2744+
public okhttp3.Call facebookSearchMarketplaceAsync(String query, String location, Integer minPrice, Integer maxPrice, Integer daysSinceListed, String sortBy, String itemCondition, String deliveryMethod, Integer radius, String after, final ApiCallback<Object> _callback) throws ApiException {
27372745

2738-
okhttp3.Call localVarCall = facebookSearchMarketplaceValidateBeforeCall(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after, _callback);
2746+
okhttp3.Call localVarCall = facebookSearchMarketplaceValidateBeforeCall(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after, _callback);
27392747
Type localVarReturnType = new TypeToken<Object>(){}.getType();
27402748
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
27412749
return localVarCall;

src/test/java/com/scrapebadger/client/api/FacebookApiTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public void facebookSearchGroupsTest() throws ApiException {
300300
/**
301301
* Search Marketplace
302302
*
303-
* Search Facebook Marketplace listings by keyword and location.
303+
* Search Facebook Marketplace listings by keyword and location. &#x60;&#x60;location&#x60;&#x60; must be a Facebook location slug (&#x60;&#x60;london&#x60;&#x60;, &#x60;&#x60;newcastleupontyne&#x60;&#x60;) or a numeric Facebook place id — the &#x60;&#x60;city_page_id&#x60;&#x60; on any listing is one. Human-readable names such as &#x60;&#x60;Durham, UK&#x60;&#x60; are rejected with a 400 rather than silently searching Facebook&#39;s San Francisco default.
304304
*
305305
* @throws ApiException if the Api call fails
306306
*/
@@ -314,8 +314,9 @@ public void facebookSearchMarketplaceTest() throws ApiException {
314314
String sortBy = null;
315315
String itemCondition = null;
316316
String deliveryMethod = null;
317+
Integer radius = null;
317318
String after = null;
318-
Object response = api.facebookSearchMarketplace(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, after);
319+
Object response = api.facebookSearchMarketplace(query, location, minPrice, maxPrice, daysSinceListed, sortBy, itemCondition, deliveryMethod, radius, after);
319320
// TODO: test validations
320321
}
321322

0 commit comments

Comments
 (0)