Skip to content

Commit 922e035

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent 3ee4ff0 commit 922e035

2 files changed

Lines changed: 36 additions & 19 deletions

File tree

docs/Api/FacebookApi.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,12 +1175,12 @@ try {
11751175
## `facebookSearchMarketplace()`
11761176

11771177
```php
1178-
facebookSearchMarketplace($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $after): mixed
1178+
facebookSearchMarketplace($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after): mixed
11791179
```
11801180

11811181
Search Marketplace
11821182

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

11851185
### Example
11861186

@@ -1202,17 +1202,18 @@ $apiInstance = new ScrapeBadger\Api\FacebookApi(
12021202
$config
12031203
);
12041204
$query = 'query_example'; // string | Search keywords
1205-
$location = 'nyc'; // string | Marketplace location slug
1205+
$location = 'nyc'; // string | Marketplace location slug or numeric place id
12061206
$min_price = 56; // int
12071207
$max_price = 56; // int
12081208
$days_since_listed = 56; // int
12091209
$sort_by = 'sort_by_example'; // string
12101210
$item_condition = 'item_condition_example'; // string
12111211
$delivery_method = 'delivery_method_example'; // string
1212+
$radius = 56; // int | Search radius around the location (km, or miles in the US)
12121213
$after = 'after_example'; // string
12131214

12141215
try {
1215-
$result = $apiInstance->facebookSearchMarketplace($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $after);
1216+
$result = $apiInstance->facebookSearchMarketplace($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after);
12161217
print_r($result);
12171218
} catch (Exception $e) {
12181219
echo 'Exception when calling FacebookApi->facebookSearchMarketplace: ', $e->getMessage(), PHP_EOL;
@@ -1224,13 +1225,14 @@ try {
12241225
| Name | Type | Description | Notes |
12251226
| ------------- | ------------- | ------------- | ------------- |
12261227
| **query** | **string**| Search keywords | |
1227-
| **location** | **string**| Marketplace location slug | [optional] [default to 'nyc'] |
1228+
| **location** | **string**| Marketplace location slug or numeric place id | [optional] [default to 'nyc'] |
12281229
| **min_price** | **int**| | [optional] |
12291230
| **max_price** | **int**| | [optional] |
12301231
| **days_since_listed** | **int**| | [optional] |
12311232
| **sort_by** | **string**| | [optional] |
12321233
| **item_condition** | **string**| | [optional] |
12331234
| **delivery_method** | **string**| | [optional] |
1235+
| **radius** | **int**| Search radius around the location (km, or miles in the US) | [optional] |
12341236
| **after** | **string**| | [optional] |
12351237

12361238
### Return type

lib/Api/FacebookApi.php

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6595,23 +6595,24 @@ public function facebookSearchGroupsRequest($q, $after = null, string $contentTy
65956595
* Search Marketplace
65966596
*
65976597
* @param string $query Search keywords (required)
6598-
* @param string $location Marketplace location slug (optional, default to 'nyc')
6598+
* @param string $location Marketplace location slug or numeric place id (optional, default to 'nyc')
65996599
* @param int $min_price min_price (optional)
66006600
* @param int $max_price max_price (optional)
66016601
* @param int $days_since_listed days_since_listed (optional)
66026602
* @param string $sort_by sort_by (optional)
66036603
* @param string $item_condition item_condition (optional)
66046604
* @param string $delivery_method delivery_method (optional)
6605+
* @param int $radius Search radius around the location (km, or miles in the US) (optional)
66056606
* @param string $after after (optional)
66066607
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['facebookSearchMarketplace'] to see the possible values for this operation
66076608
*
66086609
* @throws \ScrapeBadger\ApiException on non-2xx response or if the response body is not in the expected format
66096610
* @throws \InvalidArgumentException
66106611
* @return mixed|\ScrapeBadger\Model\HTTPValidationError
66116612
*/
6612-
public function facebookSearchMarketplace($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
6613+
public function facebookSearchMarketplace($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $radius = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
66136614
{
6614-
list($response) = $this->facebookSearchMarketplaceWithHttpInfo($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $after, $contentType);
6615+
list($response) = $this->facebookSearchMarketplaceWithHttpInfo($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after, $contentType);
66156616
return $response;
66166617
}
66176618

@@ -6621,23 +6622,24 @@ public function facebookSearchMarketplace($query, $location = 'nyc', $min_price
66216622
* Search Marketplace
66226623
*
66236624
* @param string $query Search keywords (required)
6624-
* @param string $location Marketplace location slug (optional, default to 'nyc')
6625+
* @param string $location Marketplace location slug or numeric place id (optional, default to 'nyc')
66256626
* @param int $min_price (optional)
66266627
* @param int $max_price (optional)
66276628
* @param int $days_since_listed (optional)
66286629
* @param string $sort_by (optional)
66296630
* @param string $item_condition (optional)
66306631
* @param string $delivery_method (optional)
6632+
* @param int $radius Search radius around the location (km, or miles in the US) (optional)
66316633
* @param string $after (optional)
66326634
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['facebookSearchMarketplace'] to see the possible values for this operation
66336635
*
66346636
* @throws \ScrapeBadger\ApiException on non-2xx response or if the response body is not in the expected format
66356637
* @throws \InvalidArgumentException
66366638
* @return array of mixed|\ScrapeBadger\Model\HTTPValidationError, HTTP status code, HTTP response headers (array of strings)
66376639
*/
6638-
public function facebookSearchMarketplaceWithHttpInfo($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
6640+
public function facebookSearchMarketplaceWithHttpInfo($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $radius = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
66396641
{
6640-
$request = $this->facebookSearchMarketplaceRequest($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $after, $contentType);
6642+
$request = $this->facebookSearchMarketplaceRequest($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after, $contentType);
66416643

66426644
try {
66436645
$options = $this->createHttpClientOption();
@@ -6789,22 +6791,23 @@ public function facebookSearchMarketplaceWithHttpInfo($query, $location = 'nyc',
67896791
* Search Marketplace
67906792
*
67916793
* @param string $query Search keywords (required)
6792-
* @param string $location Marketplace location slug (optional, default to 'nyc')
6794+
* @param string $location Marketplace location slug or numeric place id (optional, default to 'nyc')
67936795
* @param int $min_price (optional)
67946796
* @param int $max_price (optional)
67956797
* @param int $days_since_listed (optional)
67966798
* @param string $sort_by (optional)
67976799
* @param string $item_condition (optional)
67986800
* @param string $delivery_method (optional)
6801+
* @param int $radius Search radius around the location (km, or miles in the US) (optional)
67996802
* @param string $after (optional)
68006803
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['facebookSearchMarketplace'] to see the possible values for this operation
68016804
*
68026805
* @throws \InvalidArgumentException
68036806
* @return \GuzzleHttp\Promise\PromiseInterface
68046807
*/
6805-
public function facebookSearchMarketplaceAsync($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
6808+
public function facebookSearchMarketplaceAsync($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $radius = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
68066809
{
6807-
return $this->facebookSearchMarketplaceAsyncWithHttpInfo($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $after, $contentType)
6810+
return $this->facebookSearchMarketplaceAsyncWithHttpInfo($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after, $contentType)
68086811
->then(
68096812
function ($response) {
68106813
return $response[0];
@@ -6818,23 +6821,24 @@ function ($response) {
68186821
* Search Marketplace
68196822
*
68206823
* @param string $query Search keywords (required)
6821-
* @param string $location Marketplace location slug (optional, default to 'nyc')
6824+
* @param string $location Marketplace location slug or numeric place id (optional, default to 'nyc')
68226825
* @param int $min_price (optional)
68236826
* @param int $max_price (optional)
68246827
* @param int $days_since_listed (optional)
68256828
* @param string $sort_by (optional)
68266829
* @param string $item_condition (optional)
68276830
* @param string $delivery_method (optional)
6831+
* @param int $radius Search radius around the location (km, or miles in the US) (optional)
68286832
* @param string $after (optional)
68296833
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['facebookSearchMarketplace'] to see the possible values for this operation
68306834
*
68316835
* @throws \InvalidArgumentException
68326836
* @return \GuzzleHttp\Promise\PromiseInterface
68336837
*/
6834-
public function facebookSearchMarketplaceAsyncWithHttpInfo($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
6838+
public function facebookSearchMarketplaceAsyncWithHttpInfo($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $radius = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
68356839
{
68366840
$returnType = 'mixed';
6837-
$request = $this->facebookSearchMarketplaceRequest($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $after, $contentType);
6841+
$request = $this->facebookSearchMarketplaceRequest($query, $location, $min_price, $max_price, $days_since_listed, $sort_by, $item_condition, $delivery_method, $radius, $after, $contentType);
68386842

68396843
return $this->client
68406844
->sendAsync($request, $this->createHttpClientOption())
@@ -6876,20 +6880,21 @@ function ($exception) {
68766880
* Create request for operation 'facebookSearchMarketplace'
68776881
*
68786882
* @param string $query Search keywords (required)
6879-
* @param string $location Marketplace location slug (optional, default to 'nyc')
6883+
* @param string $location Marketplace location slug or numeric place id (optional, default to 'nyc')
68806884
* @param int $min_price (optional)
68816885
* @param int $max_price (optional)
68826886
* @param int $days_since_listed (optional)
68836887
* @param string $sort_by (optional)
68846888
* @param string $item_condition (optional)
68856889
* @param string $delivery_method (optional)
6890+
* @param int $radius Search radius around the location (km, or miles in the US) (optional)
68866891
* @param string $after (optional)
68876892
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['facebookSearchMarketplace'] to see the possible values for this operation
68886893
*
68896894
* @throws \InvalidArgumentException
68906895
* @return \GuzzleHttp\Psr7\Request
68916896
*/
6892-
public function facebookSearchMarketplaceRequest($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
6897+
public function facebookSearchMarketplaceRequest($query, $location = 'nyc', $min_price = null, $max_price = null, $days_since_listed = null, $sort_by = null, $item_condition = null, $delivery_method = null, $radius = null, $after = null, string $contentType = self::contentTypes['facebookSearchMarketplace'][0])
68936898
{
68946899

68956900
// verify the required parameter 'query' is set
@@ -6908,6 +6913,7 @@ public function facebookSearchMarketplaceRequest($query, $location = 'nyc', $min
69086913

69096914

69106915

6916+
69116917
$resourcePath = '/v1/facebook/marketplace/search';
69126918
$formParams = [];
69136919
$queryParams = [];
@@ -6988,6 +6994,15 @@ public function facebookSearchMarketplaceRequest($query, $location = 'nyc', $min
69886994
false // required
69896995
) ?? []);
69906996
// query params
6997+
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
6998+
$radius,
6999+
'radius', // param base name
7000+
'integer', // openApiType
7001+
'form', // style
7002+
true, // explode
7003+
false // required
7004+
) ?? []);
7005+
// query params
69917006
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
69927007
$after,
69937008
'after', // param base name

0 commit comments

Comments
 (0)