Skip to content

Commit 8f286fe

Browse files
author
scrapebadger-bot
committed
chore: regenerate SDK from OpenAPI spec
1 parent d3bbc75 commit 8f286fe

4 files changed

Lines changed: 1298 additions & 392 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Class | Method | HTTP request | Description
221221
*EBayApi* | [**ebaySearchListings**](docs/Api/EBayApi.md#ebaysearchlistings) | **GET** /v1/ebay/search | Search listings
222222
*FacebookApi* | [**facebookBrowseAMarketplaceCategory**](docs/Api/FacebookApi.md#facebookbrowseamarketplacecategory) | **GET** /v1/facebook/marketplace/category/{category} | Browse a Marketplace category
223223
*FacebookApi* | [**facebookGetAMarketplaceItem**](docs/Api/FacebookApi.md#facebookgetamarketplaceitem) | **GET** /v1/facebook/marketplace/item/{item_id} | Get a Marketplace item
224+
*FacebookApi* | [**facebookGetAdvertiserPageInfo**](docs/Api/FacebookApi.md#facebookgetadvertiserpageinfo) | **GET** /v1/facebook/ads/pages/{page_id} | Get advertiser page info
224225
*FacebookApi* | [**facebookGetAnAd**](docs/Api/FacebookApi.md#facebookgetanad) | **GET** /v1/facebook/ads/{ad_archive_id} | Get an ad
225226
*FacebookApi* | [**facebookGetGroupDetail**](docs/Api/FacebookApi.md#facebookgetgroupdetail) | **GET** /v1/facebook/groups/{group_id} | Get group detail
226227
*FacebookApi* | [**facebookGetGroupPosts**](docs/Api/FacebookApi.md#facebookgetgroupposts) | **GET** /v1/facebook/groups/{group_id}/posts | Get group posts
@@ -232,6 +233,7 @@ Class | Method | HTTP request | Description
232233
*FacebookApi* | [**facebookGetProfilePosts**](docs/Api/FacebookApi.md#facebookgetprofileposts) | **GET** /v1/facebook/profiles/{identifier}/posts | Get profile posts
233234
*FacebookApi* | [**facebookListCategories**](docs/Api/FacebookApi.md#facebooklistcategories) | **GET** /v1/facebook/marketplace/categories | List categories
234235
*FacebookApi* | [**facebookListLocations**](docs/Api/FacebookApi.md#facebooklistlocations) | **GET** /v1/facebook/marketplace/locations | List locations
236+
*FacebookApi* | [**facebookSearchAdvertiserPages**](docs/Api/FacebookApi.md#facebooksearchadvertiserpages) | **GET** /v1/facebook/ads/pages/search | Search advertiser pages
235237
*FacebookApi* | [**facebookSearchEvents**](docs/Api/FacebookApi.md#facebooksearchevents) | **GET** /v1/facebook/search/events | Search events
236238
*FacebookApi* | [**facebookSearchEverything**](docs/Api/FacebookApi.md#facebooksearcheverything) | **GET** /v1/facebook/search | Search everything
237239
*FacebookApi* | [**facebookSearchGroups**](docs/Api/FacebookApi.md#facebooksearchgroups) | **GET** /v1/facebook/search/groups | Search groups

docs/Api/FacebookApi.md

Lines changed: 135 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All URIs are relative to https://scrapebadger.com, except if the operation defin
66
| ------------- | ------------- | ------------- |
77
| [**facebookBrowseAMarketplaceCategory()**](FacebookApi.md#facebookBrowseAMarketplaceCategory) | **GET** /v1/facebook/marketplace/category/{category} | Browse a Marketplace category |
88
| [**facebookGetAMarketplaceItem()**](FacebookApi.md#facebookGetAMarketplaceItem) | **GET** /v1/facebook/marketplace/item/{item_id} | Get a Marketplace item |
9+
| [**facebookGetAdvertiserPageInfo()**](FacebookApi.md#facebookGetAdvertiserPageInfo) | **GET** /v1/facebook/ads/pages/{page_id} | Get advertiser page info |
910
| [**facebookGetAnAd()**](FacebookApi.md#facebookGetAnAd) | **GET** /v1/facebook/ads/{ad_archive_id} | Get an ad |
1011
| [**facebookGetGroupDetail()**](FacebookApi.md#facebookGetGroupDetail) | **GET** /v1/facebook/groups/{group_id} | Get group detail |
1112
| [**facebookGetGroupPosts()**](FacebookApi.md#facebookGetGroupPosts) | **GET** /v1/facebook/groups/{group_id}/posts | Get group posts |
@@ -17,6 +18,7 @@ All URIs are relative to https://scrapebadger.com, except if the operation defin
1718
| [**facebookGetProfilePosts()**](FacebookApi.md#facebookGetProfilePosts) | **GET** /v1/facebook/profiles/{identifier}/posts | Get profile posts |
1819
| [**facebookListCategories()**](FacebookApi.md#facebookListCategories) | **GET** /v1/facebook/marketplace/categories | List categories |
1920
| [**facebookListLocations()**](FacebookApi.md#facebookListLocations) | **GET** /v1/facebook/marketplace/locations | List locations |
21+
| [**facebookSearchAdvertiserPages()**](FacebookApi.md#facebookSearchAdvertiserPages) | **GET** /v1/facebook/ads/pages/search | Search advertiser pages |
2022
| [**facebookSearchEvents()**](FacebookApi.md#facebookSearchEvents) | **GET** /v1/facebook/search/events | Search events |
2123
| [**facebookSearchEverything()**](FacebookApi.md#facebookSearchEverything) | **GET** /v1/facebook/search | Search everything |
2224
| [**facebookSearchGroups()**](FacebookApi.md#facebookSearchGroups) | **GET** /v1/facebook/search/groups | Search groups |
@@ -162,15 +164,79 @@ try {
162164
[[Back to Model list]](../../README.md#models)
163165
[[Back to README]](../../README.md)
164166

167+
## `facebookGetAdvertiserPageInfo()`
168+
169+
```php
170+
facebookGetAdvertiserPageInfo($page_id, $country): mixed
171+
```
172+
173+
Get advertiser page info
174+
175+
Get advertiser page info: category, followers, page transparency (creation date, name history, managing organization, admin-account locations), related pages, and ad spend (for political/issue advertisers).
176+
177+
### Example
178+
179+
```php
180+
<?php
181+
require_once(__DIR__ . '/vendor/autoload.php');
182+
183+
184+
// Configure API key authorization: ApiKeyAuth
185+
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
186+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
187+
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
188+
189+
190+
$apiInstance = new ScrapeBadger\Api\FacebookApi(
191+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
192+
// This is optional, `GuzzleHttp\Client` will be used as default.
193+
new GuzzleHttp\Client(),
194+
$config
195+
);
196+
$page_id = 'page_id_example'; // string
197+
$country = 'US'; // string
198+
199+
try {
200+
$result = $apiInstance->facebookGetAdvertiserPageInfo($page_id, $country);
201+
print_r($result);
202+
} catch (Exception $e) {
203+
echo 'Exception when calling FacebookApi->facebookGetAdvertiserPageInfo: ', $e->getMessage(), PHP_EOL;
204+
}
205+
```
206+
207+
### Parameters
208+
209+
| Name | Type | Description | Notes |
210+
| ------------- | ------------- | ------------- | ------------- |
211+
| **page_id** | **string**| | |
212+
| **country** | **string**| | [optional] [default to &#39;US&#39;] |
213+
214+
### Return type
215+
216+
**mixed**
217+
218+
### Authorization
219+
220+
[ApiKeyAuth](../../README.md#ApiKeyAuth)
221+
222+
### HTTP request headers
223+
224+
- **Content-Type**: Not defined
225+
- **Accept**: `application/json`
226+
227+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
228+
[[Back to Model list]](../../README.md#models)
229+
[[Back to README]](../../README.md)
230+
165231
## `facebookGetAnAd()`
166232

167233
```php
168-
facebookGetAnAd($ad_archive_id): mixed
234+
facebookGetAnAd($ad_archive_id, $country): mixed
169235
```
170236

171237
Get an ad
172238

173-
Get a single Ad Library ad by its archive id.
239+
Get a single Ad Library ad by its archive id. For EU/UK-targeted ads the response also includes transparency insights (payer/beneficiary, total EU reach, and age/gender/country reach breakdowns).
174240

175241
### Example
176242

@@ -192,9 +258,10 @@ $apiInstance = new ScrapeBadger\Api\FacebookApi(
192258
$config
193259
);
194260
$ad_archive_id = 'ad_archive_id_example'; // string
261+
$country = 'US'; // string | ISO country code (an EU code returns EU transparency)
195262

196263
try {
197-
$result = $apiInstance->facebookGetAnAd($ad_archive_id);
264+
$result = $apiInstance->facebookGetAnAd($ad_archive_id, $country);
198265
print_r($result);
199266
} catch (Exception $e) {
200267
echo 'Exception when calling FacebookApi->facebookGetAnAd: ', $e->getMessage(), PHP_EOL;
@@ -206,6 +273,7 @@ try {
206273
| Name | Type | Description | Notes |
207274
| ------------- | ------------- | ------------- | ------------- |
208275
| **ad_archive_id** | **string**| | |
276+
| **country** | **string**| ISO country code (an EU code returns EU transparency) | [optional] [default to &#39;US&#39;] |
209277

210278
### Return type
211279

@@ -848,6 +916,70 @@ This endpoint does not need any parameter.
848916
[[Back to Model list]](../../README.md#models)
849917
[[Back to README]](../../README.md)
850918

919+
## `facebookSearchAdvertiserPages()`
920+
921+
```php
922+
facebookSearchAdvertiserPages($query, $country): mixed
923+
```
924+
925+
Search advertiser pages
926+
927+
Search advertiser Pages in the Ad Library — returns page ids, categories, likes/followers, verification and Instagram handles.
928+
929+
### Example
930+
931+
```php
932+
<?php
933+
require_once(__DIR__ . '/vendor/autoload.php');
934+
935+
936+
// Configure API key authorization: ApiKeyAuth
937+
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
938+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
939+
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
940+
941+
942+
$apiInstance = new ScrapeBadger\Api\FacebookApi(
943+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
944+
// This is optional, `GuzzleHttp\Client` will be used as default.
945+
new GuzzleHttp\Client(),
946+
$config
947+
);
948+
$query = 'query_example'; // string | Advertiser name or keyword
949+
$country = 'US'; // string
950+
951+
try {
952+
$result = $apiInstance->facebookSearchAdvertiserPages($query, $country);
953+
print_r($result);
954+
} catch (Exception $e) {
955+
echo 'Exception when calling FacebookApi->facebookSearchAdvertiserPages: ', $e->getMessage(), PHP_EOL;
956+
}
957+
```
958+
959+
### Parameters
960+
961+
| Name | Type | Description | Notes |
962+
| ------------- | ------------- | ------------- | ------------- |
963+
| **query** | **string**| Advertiser name or keyword | |
964+
| **country** | **string**| | [optional] [default to &#39;US&#39;] |
965+
966+
### Return type
967+
968+
**mixed**
969+
970+
### Authorization
971+
972+
[ApiKeyAuth](../../README.md#ApiKeyAuth)
973+
974+
### HTTP request headers
975+
976+
- **Content-Type**: Not defined
977+
- **Accept**: `application/json`
978+
979+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
980+
[[Back to Model list]](../../README.md#models)
981+
[[Back to README]](../../README.md)
982+
851983
## `facebookSearchEvents()`
852984

853985
```php

0 commit comments

Comments
 (0)