late-sdk 0.0.723 → 0.0.725
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/docs/AdAudiencesApi.md +74 -2
- data/docs/AdCreativesApi.md +80 -0
- data/docs/ListAdVideos200Response.md +22 -0
- data/docs/ReplaceAdAudienceCompanies200Response.md +20 -0
- data/docs/ReplaceAdAudienceCompaniesRequest.md +18 -0
- data/docs/ReplaceAdAudienceCompaniesRequestCompaniesInner.md +24 -0
- data/docs/UploadedOrDerivedAudience.md +4 -2
- data/lib/zernio-sdk/api/ad_audiences_api.rb +78 -4
- data/lib/zernio-sdk/api/ad_creatives_api.rb +88 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +1 -1
- data/lib/zernio-sdk/models/list_ad_videos200_response.rb +167 -0
- data/lib/zernio-sdk/models/replace_ad_audience_companies200_response.rb +157 -0
- data/lib/zernio-sdk/models/replace_ad_audience_companies_request.rb +185 -0
- data/lib/zernio-sdk/models/replace_ad_audience_companies_request_companies_inner.rb +231 -0
- data/lib/zernio-sdk/models/uploaded_or_derived_audience.rb +13 -3
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +167 -9
- data/spec/api/ad_audiences_api_spec.rb +15 -2
- data/spec/api/ad_creatives_api_spec.rb +16 -0
- data/spec/models/list_ad_videos200_response_spec.rb +48 -0
- data/spec/models/replace_ad_audience_companies200_response_spec.rb +42 -0
- data/spec/models/replace_ad_audience_companies_request_companies_inner_spec.rb +54 -0
- data/spec/models/replace_ad_audience_companies_request_spec.rb +36 -0
- data/spec/models/uploaded_or_derived_audience_spec.rb +6 -0
- data/zernio-sdk-0.0.725.gem +0 -0
- metadata +18 -2
- data/zernio-sdk-0.0.723.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65aaf8b2bc3bb1e402c75d2e6c50db0a9177f9085a7c66b77b7ef2a3474f1eda
|
|
4
|
+
data.tar.gz: 710864477441e625408d5d03282ca1899b23477cfa86d187f0f33fa3101e2754
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15df9bcbbcbcf159e4ce2a1f314b7e5de4337625c9890ebc5246851f81aef238007c4f2ac8fc19031a1d8f994d2d567708fa06b2e9934cf1e6128f2252dd25e1
|
|
7
|
+
data.tar.gz: e3617905c7f2f098c9a77c6a3f0ab2a339b40e77f14335349e165d08c2fc3fee48c625f039f70222ec0a5006809e93a073b26900e9980d70a684aa89f6072c5e
|
data/README.md
CHANGED
|
@@ -121,6 +121,7 @@ Class | Method | HTTP request | Description
|
|
|
121
121
|
*Zernio::AdAudiencesApi* | [**delete_ad_audience**](docs/AdAudiencesApi.md#delete_ad_audience) | **DELETE** /v1/ads/audiences/{audienceId} | Delete custom audience
|
|
122
122
|
*Zernio::AdAudiencesApi* | [**get_ad_audience**](docs/AdAudiencesApi.md#get_ad_audience) | **GET** /v1/ads/audiences/{audienceId} | Get audience details
|
|
123
123
|
*Zernio::AdAudiencesApi* | [**list_ad_audiences**](docs/AdAudiencesApi.md#list_ad_audiences) | **GET** /v1/ads/audiences | List custom audiences
|
|
124
|
+
*Zernio::AdAudiencesApi* | [**replace_ad_audience_companies**](docs/AdAudiencesApi.md#replace_ad_audience_companies) | **POST** /v1/ads/audiences/{audienceId}/companies | Replace audience companies
|
|
124
125
|
*Zernio::AdAudiencesApi* | [**update_ad_audience**](docs/AdAudiencesApi.md#update_ad_audience) | **PUT** /v1/ads/audiences/{audienceId} | Update an audience
|
|
125
126
|
*Zernio::AdCampaignsApi* | [**boost_post**](docs/AdCampaignsApi.md#boost_post) | **POST** /v1/ads/boost | Boost post as ad
|
|
126
127
|
*Zernio::AdCampaignsApi* | [**bulk_update_ad_campaign_status**](docs/AdCampaignsApi.md#bulk_update_ad_campaign_status) | **POST** /v1/ads/campaigns/bulk-status | Pause or resume many campaigns
|
|
@@ -153,6 +154,7 @@ Class | Method | HTTP request | Description
|
|
|
153
154
|
*Zernio::AdCreativesApi* | [**list_ad_catalogs**](docs/AdCreativesApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs
|
|
154
155
|
*Zernio::AdCreativesApi* | [**list_ad_creatives**](docs/AdCreativesApi.md#list_ad_creatives) | **GET** /v1/ads/creatives | Creative library
|
|
155
156
|
*Zernio::AdCreativesApi* | [**list_ad_images**](docs/AdCreativesApi.md#list_ad_images) | **GET** /v1/ads/images | Ad image library
|
|
157
|
+
*Zernio::AdCreativesApi* | [**list_ad_videos**](docs/AdCreativesApi.md#list_ad_videos) | **GET** /v1/ads/videos | Ad video library
|
|
156
158
|
*Zernio::AdCreativesApi* | [**update_ad_creative**](docs/AdCreativesApi.md#update_ad_creative) | **PUT** /v1/ads/creatives/{creativeId} | Rename a creative
|
|
157
159
|
*Zernio::AdCreativesApi* | [**upload_ad_image**](docs/AdCreativesApi.md#upload_ad_image) | **POST** /v1/ads/images | Upload an ad image from base64
|
|
158
160
|
*Zernio::AdInsightsApi* | [**create_ad_insights_report**](docs/AdInsightsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run
|
|
@@ -1501,6 +1503,7 @@ Class | Method | HTTP request | Description
|
|
|
1501
1503
|
- [Zernio::ListAdKeywords200ResponseKeywordsInner](docs/ListAdKeywords200ResponseKeywordsInner.md)
|
|
1502
1504
|
- [Zernio::ListAdLabels200Response](docs/ListAdLabels200Response.md)
|
|
1503
1505
|
- [Zernio::ListAdStudies200Response](docs/ListAdStudies200Response.md)
|
|
1506
|
+
- [Zernio::ListAdVideos200Response](docs/ListAdVideos200Response.md)
|
|
1504
1507
|
- [Zernio::ListAds202Response](docs/ListAds202Response.md)
|
|
1505
1508
|
- [Zernio::ListAdsBusinessCenters200Response](docs/ListAdsBusinessCenters200Response.md)
|
|
1506
1509
|
- [Zernio::ListApiKeys200Response](docs/ListApiKeys200Response.md)
|
|
@@ -1758,6 +1761,9 @@ Class | Method | HTTP request | Description
|
|
|
1758
1761
|
- [Zernio::RemoveConversionAssociations200Response](docs/RemoveConversionAssociations200Response.md)
|
|
1759
1762
|
- [Zernio::RemoveDiscordMemberRole200Response](docs/RemoveDiscordMemberRole200Response.md)
|
|
1760
1763
|
- [Zernio::RemoveWhatsAppGroupParticipantsRequest](docs/RemoveWhatsAppGroupParticipantsRequest.md)
|
|
1764
|
+
- [Zernio::ReplaceAdAudienceCompanies200Response](docs/ReplaceAdAudienceCompanies200Response.md)
|
|
1765
|
+
- [Zernio::ReplaceAdAudienceCompaniesRequest](docs/ReplaceAdAudienceCompaniesRequest.md)
|
|
1766
|
+
- [Zernio::ReplaceAdAudienceCompaniesRequestCompaniesInner](docs/ReplaceAdAudienceCompaniesRequestCompaniesInner.md)
|
|
1761
1767
|
- [Zernio::ReplyToGoogleBusinessReview200Response](docs/ReplyToGoogleBusinessReview200Response.md)
|
|
1762
1768
|
- [Zernio::ReplyToGoogleBusinessReviewRequest](docs/ReplyToGoogleBusinessReviewRequest.md)
|
|
1763
1769
|
- [Zernio::ReplyToInboxPost200Response](docs/ReplyToInboxPost200Response.md)
|
data/docs/AdAudiencesApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
9
9
|
| [**delete_ad_audience**](AdAudiencesApi.md#delete_ad_audience) | **DELETE** /v1/ads/audiences/{audienceId} | Delete custom audience |
|
|
10
10
|
| [**get_ad_audience**](AdAudiencesApi.md#get_ad_audience) | **GET** /v1/ads/audiences/{audienceId} | Get audience details |
|
|
11
11
|
| [**list_ad_audiences**](AdAudiencesApi.md#list_ad_audiences) | **GET** /v1/ads/audiences | List custom audiences |
|
|
12
|
+
| [**replace_ad_audience_companies**](AdAudiencesApi.md#replace_ad_audience_companies) | **POST** /v1/ads/audiences/{audienceId}/companies | Replace audience companies |
|
|
12
13
|
| [**update_ad_audience**](AdAudiencesApi.md#update_ad_audience) | **PUT** /v1/ads/audiences/{audienceId} | Update an audience |
|
|
13
14
|
|
|
14
15
|
|
|
@@ -18,7 +19,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
18
19
|
|
|
19
20
|
Add users to audience
|
|
20
21
|
|
|
21
|
-
Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request.
|
|
22
|
+
Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request. customer_list only. A LinkedIn `company_list` audience takes company rows, not people: send those to `POST /v1/ads/audiences/{audienceId}/companies`. This endpoint 422s for every other audience type.
|
|
22
23
|
|
|
23
24
|
### Examples
|
|
24
25
|
|
|
@@ -89,7 +90,7 @@ end
|
|
|
89
90
|
|
|
90
91
|
Create custom audience
|
|
91
92
|
|
|
92
|
-
Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`.
|
|
93
|
+
Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only; `company_list`, `engagement` and `website_retargeting` are LinkedIn-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. How the audience gets filled depends on the type: - `customer_list` is created empty. Add members with `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status is `pending`). - `company_list` is filled AT CREATION from the `companies` array below, which is required. To change the list afterwards send the new full list to `POST /v1/ads/audiences/{audienceId}/companies` (a replace, not a merge). The `/users` endpoint rejects these audiences with a 422. - `website`, `website_retargeting`, `engagement`, `meta_engagement` and `lookalike` fill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all. Create is not idempotent, never auto-retry.
|
|
93
94
|
|
|
94
95
|
### Examples
|
|
95
96
|
|
|
@@ -367,6 +368,77 @@ end
|
|
|
367
368
|
- **Accept**: application/json
|
|
368
369
|
|
|
369
370
|
|
|
371
|
+
## replace_ad_audience_companies
|
|
372
|
+
|
|
373
|
+
> <ReplaceAdAudienceCompanies200Response> replace_ad_audience_companies(audience_id, replace_ad_audience_companies_request)
|
|
374
|
+
|
|
375
|
+
Replace audience companies
|
|
376
|
+
|
|
377
|
+
Upload the company rows of a LinkedIn `company_list` audience (account-based marketing). LinkedIn-only, every other platform returns 422. A LinkedIn audience segment holds exactly one uploaded list, so the list you send here REPLACES the segment's list instead of being appended to it: always send the full set of companies. LinkedIn returns only the identifier of the uploaded file, never its rows, so the merge cannot be done for you, keep the source list on your side. LinkedIn does not document how quickly companies dropped from the list stop being targeted, so treat removals as eventual rather than immediate. Rows are plain text (not hashed), matched against LinkedIn's own company graph. Matching is asynchronous: LinkedIn takes up to 48h for a new audience and up to 24h for a later update, and the audience stays `processing` meanwhile. LinkedIn recommends at least 1,000 companies for a usable match rate, and caps a list at 300,000. The initial list is sent with `companies` on `POST /v1/ads/audiences`; this endpoint is for every change after that.
|
|
378
|
+
|
|
379
|
+
### Examples
|
|
380
|
+
|
|
381
|
+
```ruby
|
|
382
|
+
require 'time'
|
|
383
|
+
require 'zernio-sdk'
|
|
384
|
+
# setup authorization
|
|
385
|
+
Zernio.configure do |config|
|
|
386
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
387
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
api_instance = Zernio::AdAudiencesApi.new
|
|
391
|
+
audience_id = 'audience_id_example' # String |
|
|
392
|
+
replace_ad_audience_companies_request = Zernio::ReplaceAdAudienceCompaniesRequest.new({companies: [Zernio::ReplaceAdAudienceCompaniesRequestCompaniesInner.new]}) # ReplaceAdAudienceCompaniesRequest |
|
|
393
|
+
|
|
394
|
+
begin
|
|
395
|
+
# Replace audience companies
|
|
396
|
+
result = api_instance.replace_ad_audience_companies(audience_id, replace_ad_audience_companies_request)
|
|
397
|
+
p result
|
|
398
|
+
rescue Zernio::ApiError => e
|
|
399
|
+
puts "Error when calling AdAudiencesApi->replace_ad_audience_companies: #{e}"
|
|
400
|
+
end
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
#### Using the replace_ad_audience_companies_with_http_info variant
|
|
404
|
+
|
|
405
|
+
This returns an Array which contains the response data, status code and headers.
|
|
406
|
+
|
|
407
|
+
> <Array(<ReplaceAdAudienceCompanies200Response>, Integer, Hash)> replace_ad_audience_companies_with_http_info(audience_id, replace_ad_audience_companies_request)
|
|
408
|
+
|
|
409
|
+
```ruby
|
|
410
|
+
begin
|
|
411
|
+
# Replace audience companies
|
|
412
|
+
data, status_code, headers = api_instance.replace_ad_audience_companies_with_http_info(audience_id, replace_ad_audience_companies_request)
|
|
413
|
+
p status_code # => 2xx
|
|
414
|
+
p headers # => { ... }
|
|
415
|
+
p data # => <ReplaceAdAudienceCompanies200Response>
|
|
416
|
+
rescue Zernio::ApiError => e
|
|
417
|
+
puts "Error when calling AdAudiencesApi->replace_ad_audience_companies_with_http_info: #{e}"
|
|
418
|
+
end
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Parameters
|
|
422
|
+
|
|
423
|
+
| Name | Type | Description | Notes |
|
|
424
|
+
| ---- | ---- | ----------- | ----- |
|
|
425
|
+
| **audience_id** | **String** | | |
|
|
426
|
+
| **replace_ad_audience_companies_request** | [**ReplaceAdAudienceCompaniesRequest**](ReplaceAdAudienceCompaniesRequest.md) | | |
|
|
427
|
+
|
|
428
|
+
### Return type
|
|
429
|
+
|
|
430
|
+
[**ReplaceAdAudienceCompanies200Response**](ReplaceAdAudienceCompanies200Response.md)
|
|
431
|
+
|
|
432
|
+
### Authorization
|
|
433
|
+
|
|
434
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
435
|
+
|
|
436
|
+
### HTTP request headers
|
|
437
|
+
|
|
438
|
+
- **Content-Type**: application/json
|
|
439
|
+
- **Accept**: application/json
|
|
440
|
+
|
|
441
|
+
|
|
370
442
|
## update_ad_audience
|
|
371
443
|
|
|
372
444
|
> <CreateAdAudience201Response> update_ad_audience(audience_id, update_ad_audience_request)
|
data/docs/AdCreativesApi.md
CHANGED
|
@@ -13,6 +13,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
13
13
|
| [**list_ad_catalogs**](AdCreativesApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs |
|
|
14
14
|
| [**list_ad_creatives**](AdCreativesApi.md#list_ad_creatives) | **GET** /v1/ads/creatives | Creative library |
|
|
15
15
|
| [**list_ad_images**](AdCreativesApi.md#list_ad_images) | **GET** /v1/ads/images | Ad image library |
|
|
16
|
+
| [**list_ad_videos**](AdCreativesApi.md#list_ad_videos) | **GET** /v1/ads/videos | Ad video library |
|
|
16
17
|
| [**update_ad_creative**](AdCreativesApi.md#update_ad_creative) | **PUT** /v1/ads/creatives/{creativeId} | Rename a creative |
|
|
17
18
|
| [**upload_ad_image**](AdCreativesApi.md#upload_ad_image) | **POST** /v1/ads/images | Upload an ad image from base64 |
|
|
18
19
|
|
|
@@ -674,6 +675,85 @@ end
|
|
|
674
675
|
- **Accept**: application/json
|
|
675
676
|
|
|
676
677
|
|
|
678
|
+
## list_ad_videos
|
|
679
|
+
|
|
680
|
+
> <ListAdVideos200Response> list_ad_videos(account_id, ad_account_id, opts)
|
|
681
|
+
|
|
682
|
+
Ad video library
|
|
683
|
+
|
|
684
|
+
Lists the ad account's video library (Meta's `/act_X/advideos`), rows returned verbatim. The default projection covers id, title, status, poster frames and length; `fields` is a raw-passthrough override. Any `id` here is reusable as `video.id` on the create endpoints, so N ads that differ only in copy share one upload. This is the only way to reach a video uploaded OUTSIDE Zernio (Ads Manager, another tool); videos we uploaded also come back as `creative.videoId` on GET /v1/ads. Meta transcodes asynchronously, so a row is only usable once `status.video_status` reads `ready`. There is no upload operation here: upload by URL inline via `video.url` on POST /v1/ads/create.
|
|
685
|
+
|
|
686
|
+
### Examples
|
|
687
|
+
|
|
688
|
+
```ruby
|
|
689
|
+
require 'time'
|
|
690
|
+
require 'zernio-sdk'
|
|
691
|
+
# setup authorization
|
|
692
|
+
Zernio.configure do |config|
|
|
693
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
694
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
api_instance = Zernio::AdCreativesApi.new
|
|
698
|
+
account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
699
|
+
ad_account_id = 'ad_account_id_example' # String | Meta ad account id (act_<n>).
|
|
700
|
+
opts = {
|
|
701
|
+
fields: 'fields_example', # String | Comma-separated Graph field override (supports nested {} projections).
|
|
702
|
+
limit: 56, # Integer | Rows per page
|
|
703
|
+
after: 'after_example' # String | Cursor from paging.after of the previous page.
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
begin
|
|
707
|
+
# Ad video library
|
|
708
|
+
result = api_instance.list_ad_videos(account_id, ad_account_id, opts)
|
|
709
|
+
p result
|
|
710
|
+
rescue Zernio::ApiError => e
|
|
711
|
+
puts "Error when calling AdCreativesApi->list_ad_videos: #{e}"
|
|
712
|
+
end
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
#### Using the list_ad_videos_with_http_info variant
|
|
716
|
+
|
|
717
|
+
This returns an Array which contains the response data, status code and headers.
|
|
718
|
+
|
|
719
|
+
> <Array(<ListAdVideos200Response>, Integer, Hash)> list_ad_videos_with_http_info(account_id, ad_account_id, opts)
|
|
720
|
+
|
|
721
|
+
```ruby
|
|
722
|
+
begin
|
|
723
|
+
# Ad video library
|
|
724
|
+
data, status_code, headers = api_instance.list_ad_videos_with_http_info(account_id, ad_account_id, opts)
|
|
725
|
+
p status_code # => 2xx
|
|
726
|
+
p headers # => { ... }
|
|
727
|
+
p data # => <ListAdVideos200Response>
|
|
728
|
+
rescue Zernio::ApiError => e
|
|
729
|
+
puts "Error when calling AdCreativesApi->list_ad_videos_with_http_info: #{e}"
|
|
730
|
+
end
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
### Parameters
|
|
734
|
+
|
|
735
|
+
| Name | Type | Description | Notes |
|
|
736
|
+
| ---- | ---- | ----------- | ----- |
|
|
737
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
738
|
+
| **ad_account_id** | **String** | Meta ad account id (act_<n>). | |
|
|
739
|
+
| **fields** | **String** | Comma-separated Graph field override (supports nested {} projections). | [optional] |
|
|
740
|
+
| **limit** | **Integer** | Rows per page | [optional][default to 25] |
|
|
741
|
+
| **after** | **String** | Cursor from paging.after of the previous page. | [optional] |
|
|
742
|
+
|
|
743
|
+
### Return type
|
|
744
|
+
|
|
745
|
+
[**ListAdVideos200Response**](ListAdVideos200Response.md)
|
|
746
|
+
|
|
747
|
+
### Authorization
|
|
748
|
+
|
|
749
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
750
|
+
|
|
751
|
+
### HTTP request headers
|
|
752
|
+
|
|
753
|
+
- **Content-Type**: Not defined
|
|
754
|
+
- **Accept**: application/json
|
|
755
|
+
|
|
756
|
+
|
|
677
757
|
## update_ad_creative
|
|
678
758
|
|
|
679
759
|
> <UpdateAdCreative200Response> update_ad_creative(creative_id, update_ad_creative_request)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListAdVideos200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **data** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **paging** | [**GetAdsActivityLog200ResponsePaging**](GetAdsActivityLog200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListAdVideos200Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::ReplaceAdAudienceCompanies200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **message** | **String** | | [optional] |
|
|
8
|
+
| **num_received** | **Integer** | Rows sent to LinkedIn. Matching happens asynchronously, so this is not the matched company count. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::ReplaceAdAudienceCompanies200Response.new(
|
|
16
|
+
message: null,
|
|
17
|
+
num_received: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::ReplaceAdAudienceCompaniesRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **companies** | [**Array<ReplaceAdAudienceCompaniesRequestCompaniesInner>**](ReplaceAdAudienceCompaniesRequestCompaniesInner.md) | The complete company list. Each row needs at least one of name, domain, website or linkedinPageUrl. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::ReplaceAdAudienceCompaniesRequest.new(
|
|
15
|
+
companies: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::ReplaceAdAudienceCompaniesRequestCompaniesInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | | [optional] |
|
|
8
|
+
| **domain** | **String** | | [optional] |
|
|
9
|
+
| **website** | **String** | | [optional] |
|
|
10
|
+
| **linkedin_page_url** | **String** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::ReplaceAdAudienceCompaniesRequestCompaniesInner.new(
|
|
18
|
+
name: null,
|
|
19
|
+
domain: null,
|
|
20
|
+
website: null,
|
|
21
|
+
linkedin_page_url: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
| **trigger** | **String** | Required for engagement audiences. The action, validated by LinkedIn against `sourceType`. Common values: VIDEO_ADS FIRST_QUARTILE / MIDPOINT / THIRD_QUARTILE / FULL_COMPLETE; LEAD_GEN_FORMS VIEW_FORM / LEAD_FORM_SUBMIT; ORGANIZATION_PAGES VIEW / CTA_CLICK; EVENT_PAGES RSVPED / VIDEO_VIEWED / ENGAGEMENT / CLICK. | [optional] |
|
|
15
15
|
| **lookback_days** | **Integer** | Required for engagement audiences. Rolling window. | [optional] |
|
|
16
16
|
| **engagement_sources** | **Array<String>** | Required for engagement audiences. Campaign URNs for the ad source types, organization URNs for pages and events. LinkedIn creates one rule per source, all sharing the same trigger and lookbackDays. | [optional] |
|
|
17
|
-
| **companies** | [**Array<UploadedOrDerivedAudienceCompaniesInner>**](UploadedOrDerivedAudienceCompaniesInner.md) | Required for company_list audiences (LinkedIn only): plain-text company rows for account targeting. Each row needs at least one identifier. LinkedIn recommends 1,000+ companies for a usable match rate and takes up to 48h to process the list. | [optional] |
|
|
17
|
+
| **companies** | [**Array<UploadedOrDerivedAudienceCompaniesInner>**](UploadedOrDerivedAudienceCompaniesInner.md) | Required for company_list audiences (LinkedIn only): plain-text company rows for account targeting. Each row needs at least one identifier. Not hashed, LinkedIn matches these against its own company graph. LinkedIn recommends 1,000+ companies for a usable match rate and takes up to 48h to process the list. Replace the list later with POST /v1/ads/audiences/{audienceId}/companies. | [optional] |
|
|
18
18
|
| **pixel_id** | **String** | Required for website audiences | [optional] |
|
|
19
19
|
| **retention_days** | **Integer** | Required for website (max 180) and meta_engagement (max 365) audiences. | [optional] |
|
|
20
20
|
| **engagement_source** | **String** | Required for meta_engagement audiences (Meta only): what people engaged with. `page` = a Facebook Page, `instagram` = an IG professional account, `video` = a video. The source object must be eligible for engagement audiences or Meta rejects with subcode 1713151 (\"Invalid Event Name\"), surfaced verbatim. | [optional] |
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
| **source_audience_id** | **String** | Required for lookalike audiences | [optional] |
|
|
24
24
|
| **country** | **String** | 2-letter code, required for lookalike audiences | [optional] |
|
|
25
25
|
| **ratio** | **Float** | Required for lookalike audiences | [optional] |
|
|
26
|
-
| **
|
|
26
|
+
| **url_contains** | **String** | website only. Narrows the audience from all visitors to visitors of URLs containing this substring. Ignored when `rule` is supplied. | [optional] |
|
|
27
|
+
| **rule** | **Object** | Optional raw Meta rule, replacing the one we build. Omit it for all visitors of `pixelId`, or use `urlContains` for the common page-match case. For `website` this is Meta's Flexible Audience Rule and is VALIDATED before we call Meta: every entry in `inclusions.rules` (and `exclusions.rules`) must carry `event_sources`, `retention_seconds` AND `filter`. Meta rejects a rule missing any of the three with code 100 / subcode 1713098 (\"Invalid rule JSON format\"), so a bad shape is a 400 here instead. The pre-2018 flat shapes (`{url: ...}`, `{event: ...}`) are not accepted by Meta at all (subcode 1870029). Example, visitors of /checkout in the last 30 days: `{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"<pixelId>\",\"type\":\"pixel\"}],\"retention_seconds\":2592000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"url\",\"operator\":\"i_contains\",\"value\":\"/checkout\"}]}}]}}` Note Meta DERIVES `retention_days` from `retention_seconds` and stores `event_sources[].id` as a number, so a rule read back will not be byte-identical to the one you sent. For `meta_engagement` the rule is forwarded verbatim and NOT validated: that type has two dialects (the `video` source uses a legacy flat array), so no single schema covers both. | [optional] |
|
|
27
28
|
| **customer_file_source** | **String** | Data source declaration for GDPR compliance (customer_list only) | [optional] |
|
|
28
29
|
|
|
29
30
|
## Example
|
|
@@ -51,6 +52,7 @@ instance = Zernio::UploadedOrDerivedAudience.new(
|
|
|
51
52
|
source_audience_id: null,
|
|
52
53
|
country: null,
|
|
53
54
|
ratio: null,
|
|
55
|
+
url_contains: null,
|
|
54
56
|
rule: null,
|
|
55
57
|
customer_file_source: null
|
|
56
58
|
)
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Add users to audience
|
|
23
|
-
# Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request.
|
|
23
|
+
# Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request. customer_list only. A LinkedIn `company_list` audience takes company rows, not people: send those to `POST /v1/ads/audiences/{audienceId}/companies`. This endpoint 422s for every other audience type.
|
|
24
24
|
# @param audience_id [String]
|
|
25
25
|
# @param add_users_to_ad_audience_request [AddUsersToAdAudienceRequest]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Add users to audience
|
|
34
|
-
# Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request.
|
|
34
|
+
# Upload user data to a customer_list audience. Data is SHA256-hashed server-side before sending to the platform. Email is used on every platform; phone is used on Meta only (other platforms ignore it). On TikTok and Pinterest, the first upload also provisions the audience (deferred create). LinkedIn uploads are full-replace. Max 10,000 users per request. customer_list only. A LinkedIn `company_list` audience takes company rows, not people: send those to `POST /v1/ads/audiences/{audienceId}/companies`. This endpoint 422s for every other audience type.
|
|
35
35
|
# @param audience_id [String]
|
|
36
36
|
# @param add_users_to_ad_audience_request [AddUsersToAdAudienceRequest]
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
@@ -94,7 +94,7 @@ module Zernio
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Create custom audience
|
|
97
|
-
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`.
|
|
97
|
+
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only; `company_list`, `engagement` and `website_retargeting` are LinkedIn-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. How the audience gets filled depends on the type: - `customer_list` is created empty. Add members with `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status is `pending`). - `company_list` is filled AT CREATION from the `companies` array below, which is required. To change the list afterwards send the new full list to `POST /v1/ads/audiences/{audienceId}/companies` (a replace, not a merge). The `/users` endpoint rejects these audiences with a 422. - `website`, `website_retargeting`, `engagement`, `meta_engagement` and `lookalike` fill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all. Create is not idempotent, never auto-retry.
|
|
98
98
|
# @param create_ad_audience_request [CreateAdAudienceRequest]
|
|
99
99
|
# @param [Hash] opts the optional parameters
|
|
100
100
|
# @return [CreateAdAudience201Response]
|
|
@@ -104,7 +104,7 @@ module Zernio
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
# Create custom audience
|
|
107
|
-
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`.
|
|
107
|
+
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest; `website` and `lookalike` are Meta-only; `company_list`, `engagement` and `website_retargeting` are LinkedIn-only. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. How the audience gets filled depends on the type: - `customer_list` is created empty. Add members with `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status is `pending`). - `company_list` is filled AT CREATION from the `companies` array below, which is required. To change the list afterwards send the new full list to `POST /v1/ads/audiences/{audienceId}/companies` (a replace, not a merge). The `/users` endpoint rejects these audiences with a 422. - `website`, `website_retargeting`, `engagement`, `meta_engagement` and `lookalike` fill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all. Create is not idempotent, never auto-retry.
|
|
108
108
|
# @param create_ad_audience_request [CreateAdAudienceRequest]
|
|
109
109
|
# @param [Hash] opts the optional parameters
|
|
110
110
|
# @return [Array<(CreateAdAudience201Response, Integer, Hash)>] CreateAdAudience201Response data, response status code and response headers
|
|
@@ -372,6 +372,80 @@ module Zernio
|
|
|
372
372
|
return data, status_code, headers
|
|
373
373
|
end
|
|
374
374
|
|
|
375
|
+
# Replace audience companies
|
|
376
|
+
# Upload the company rows of a LinkedIn `company_list` audience (account-based marketing). LinkedIn-only, every other platform returns 422. A LinkedIn audience segment holds exactly one uploaded list, so the list you send here REPLACES the segment's list instead of being appended to it: always send the full set of companies. LinkedIn returns only the identifier of the uploaded file, never its rows, so the merge cannot be done for you, keep the source list on your side. LinkedIn does not document how quickly companies dropped from the list stop being targeted, so treat removals as eventual rather than immediate. Rows are plain text (not hashed), matched against LinkedIn's own company graph. Matching is asynchronous: LinkedIn takes up to 48h for a new audience and up to 24h for a later update, and the audience stays `processing` meanwhile. LinkedIn recommends at least 1,000 companies for a usable match rate, and caps a list at 300,000. The initial list is sent with `companies` on `POST /v1/ads/audiences`; this endpoint is for every change after that.
|
|
377
|
+
# @param audience_id [String]
|
|
378
|
+
# @param replace_ad_audience_companies_request [ReplaceAdAudienceCompaniesRequest]
|
|
379
|
+
# @param [Hash] opts the optional parameters
|
|
380
|
+
# @return [ReplaceAdAudienceCompanies200Response]
|
|
381
|
+
def replace_ad_audience_companies(audience_id, replace_ad_audience_companies_request, opts = {})
|
|
382
|
+
data, _status_code, _headers = replace_ad_audience_companies_with_http_info(audience_id, replace_ad_audience_companies_request, opts)
|
|
383
|
+
data
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Replace audience companies
|
|
387
|
+
# Upload the company rows of a LinkedIn `company_list` audience (account-based marketing). LinkedIn-only, every other platform returns 422. A LinkedIn audience segment holds exactly one uploaded list, so the list you send here REPLACES the segment's list instead of being appended to it: always send the full set of companies. LinkedIn returns only the identifier of the uploaded file, never its rows, so the merge cannot be done for you, keep the source list on your side. LinkedIn does not document how quickly companies dropped from the list stop being targeted, so treat removals as eventual rather than immediate. Rows are plain text (not hashed), matched against LinkedIn's own company graph. Matching is asynchronous: LinkedIn takes up to 48h for a new audience and up to 24h for a later update, and the audience stays `processing` meanwhile. LinkedIn recommends at least 1,000 companies for a usable match rate, and caps a list at 300,000. The initial list is sent with `companies` on `POST /v1/ads/audiences`; this endpoint is for every change after that.
|
|
388
|
+
# @param audience_id [String]
|
|
389
|
+
# @param replace_ad_audience_companies_request [ReplaceAdAudienceCompaniesRequest]
|
|
390
|
+
# @param [Hash] opts the optional parameters
|
|
391
|
+
# @return [Array<(ReplaceAdAudienceCompanies200Response, Integer, Hash)>] ReplaceAdAudienceCompanies200Response data, response status code and response headers
|
|
392
|
+
def replace_ad_audience_companies_with_http_info(audience_id, replace_ad_audience_companies_request, opts = {})
|
|
393
|
+
if @api_client.config.debugging
|
|
394
|
+
@api_client.config.logger.debug 'Calling API: AdAudiencesApi.replace_ad_audience_companies ...'
|
|
395
|
+
end
|
|
396
|
+
# verify the required parameter 'audience_id' is set
|
|
397
|
+
if @api_client.config.client_side_validation && audience_id.nil?
|
|
398
|
+
fail ArgumentError, "Missing the required parameter 'audience_id' when calling AdAudiencesApi.replace_ad_audience_companies"
|
|
399
|
+
end
|
|
400
|
+
# verify the required parameter 'replace_ad_audience_companies_request' is set
|
|
401
|
+
if @api_client.config.client_side_validation && replace_ad_audience_companies_request.nil?
|
|
402
|
+
fail ArgumentError, "Missing the required parameter 'replace_ad_audience_companies_request' when calling AdAudiencesApi.replace_ad_audience_companies"
|
|
403
|
+
end
|
|
404
|
+
# resource path
|
|
405
|
+
local_var_path = '/v1/ads/audiences/{audienceId}/companies'.sub('{' + 'audienceId' + '}', CGI.escape(audience_id.to_s))
|
|
406
|
+
|
|
407
|
+
# query parameters
|
|
408
|
+
query_params = opts[:query_params] || {}
|
|
409
|
+
|
|
410
|
+
# header parameters
|
|
411
|
+
header_params = opts[:header_params] || {}
|
|
412
|
+
# HTTP header 'Accept' (if needed)
|
|
413
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
414
|
+
# HTTP header 'Content-Type'
|
|
415
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
416
|
+
if !content_type.nil?
|
|
417
|
+
header_params['Content-Type'] = content_type
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# form parameters
|
|
421
|
+
form_params = opts[:form_params] || {}
|
|
422
|
+
|
|
423
|
+
# http body (model)
|
|
424
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(replace_ad_audience_companies_request)
|
|
425
|
+
|
|
426
|
+
# return_type
|
|
427
|
+
return_type = opts[:debug_return_type] || 'ReplaceAdAudienceCompanies200Response'
|
|
428
|
+
|
|
429
|
+
# auth_names
|
|
430
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
431
|
+
|
|
432
|
+
new_options = opts.merge(
|
|
433
|
+
:operation => :"AdAudiencesApi.replace_ad_audience_companies",
|
|
434
|
+
:header_params => header_params,
|
|
435
|
+
:query_params => query_params,
|
|
436
|
+
:form_params => form_params,
|
|
437
|
+
:body => post_body,
|
|
438
|
+
:auth_names => auth_names,
|
|
439
|
+
:return_type => return_type
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
443
|
+
if @api_client.config.debugging
|
|
444
|
+
@api_client.config.logger.debug "API called: AdAudiencesApi#replace_ad_audience_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
445
|
+
end
|
|
446
|
+
return data, status_code, headers
|
|
447
|
+
end
|
|
448
|
+
|
|
375
449
|
# Update an audience
|
|
376
450
|
# Update an audience. `saved_targeting` audiences accept `name`, `description`, and `spec` (full replacement, no merge, Zernio-only, no platform call). Platform audiences (uploaded/website/lookalike) accept `name` and `description` only, updated on the platform first and then mirrored locally; their rules are immutable, so `spec` returns 400 for them. Platform audience updates are Meta-only for now (other platforms return 501). Ads already created from a saved_targeting audience are unaffected, they snapshot the targeting at creation.
|
|
377
451
|
# @param audience_id [String]
|
|
@@ -681,6 +681,94 @@ module Zernio
|
|
|
681
681
|
return data, status_code, headers
|
|
682
682
|
end
|
|
683
683
|
|
|
684
|
+
# Ad video library
|
|
685
|
+
# Lists the ad account's video library (Meta's `/act_X/advideos`), rows returned verbatim. The default projection covers id, title, status, poster frames and length; `fields` is a raw-passthrough override. Any `id` here is reusable as `video.id` on the create endpoints, so N ads that differ only in copy share one upload. This is the only way to reach a video uploaded OUTSIDE Zernio (Ads Manager, another tool); videos we uploaded also come back as `creative.videoId` on GET /v1/ads. Meta transcodes asynchronously, so a row is only usable once `status.video_status` reads `ready`. There is no upload operation here: upload by URL inline via `video.url` on POST /v1/ads/create.
|
|
686
|
+
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
687
|
+
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
688
|
+
# @param [Hash] opts the optional parameters
|
|
689
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
690
|
+
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
691
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
692
|
+
# @return [ListAdVideos200Response]
|
|
693
|
+
def list_ad_videos(account_id, ad_account_id, opts = {})
|
|
694
|
+
data, _status_code, _headers = list_ad_videos_with_http_info(account_id, ad_account_id, opts)
|
|
695
|
+
data
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
# Ad video library
|
|
699
|
+
# Lists the ad account's video library (Meta's `/act_X/advideos`), rows returned verbatim. The default projection covers id, title, status, poster frames and length; `fields` is a raw-passthrough override. Any `id` here is reusable as `video.id` on the create endpoints, so N ads that differ only in copy share one upload. This is the only way to reach a video uploaded OUTSIDE Zernio (Ads Manager, another tool); videos we uploaded also come back as `creative.videoId` on GET /v1/ads. Meta transcodes asynchronously, so a row is only usable once `status.video_status` reads `ready`. There is no upload operation here: upload by URL inline via `video.url` on POST /v1/ads/create.
|
|
700
|
+
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
701
|
+
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
702
|
+
# @param [Hash] opts the optional parameters
|
|
703
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
704
|
+
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
705
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
706
|
+
# @return [Array<(ListAdVideos200Response, Integer, Hash)>] ListAdVideos200Response data, response status code and response headers
|
|
707
|
+
def list_ad_videos_with_http_info(account_id, ad_account_id, opts = {})
|
|
708
|
+
if @api_client.config.debugging
|
|
709
|
+
@api_client.config.logger.debug 'Calling API: AdCreativesApi.list_ad_videos ...'
|
|
710
|
+
end
|
|
711
|
+
# verify the required parameter 'account_id' is set
|
|
712
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
713
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCreativesApi.list_ad_videos"
|
|
714
|
+
end
|
|
715
|
+
# verify the required parameter 'ad_account_id' is set
|
|
716
|
+
if @api_client.config.client_side_validation && ad_account_id.nil?
|
|
717
|
+
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdCreativesApi.list_ad_videos"
|
|
718
|
+
end
|
|
719
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
720
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdCreativesApi.list_ad_videos, must be smaller than or equal to 100.'
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
724
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdCreativesApi.list_ad_videos, must be greater than or equal to 1.'
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
# resource path
|
|
728
|
+
local_var_path = '/v1/ads/videos'
|
|
729
|
+
|
|
730
|
+
# query parameters
|
|
731
|
+
query_params = opts[:query_params] || {}
|
|
732
|
+
query_params[:'accountId'] = account_id
|
|
733
|
+
query_params[:'adAccountId'] = ad_account_id
|
|
734
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
735
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
736
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
737
|
+
|
|
738
|
+
# header parameters
|
|
739
|
+
header_params = opts[:header_params] || {}
|
|
740
|
+
# HTTP header 'Accept' (if needed)
|
|
741
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
742
|
+
|
|
743
|
+
# form parameters
|
|
744
|
+
form_params = opts[:form_params] || {}
|
|
745
|
+
|
|
746
|
+
# http body (model)
|
|
747
|
+
post_body = opts[:debug_body]
|
|
748
|
+
|
|
749
|
+
# return_type
|
|
750
|
+
return_type = opts[:debug_return_type] || 'ListAdVideos200Response'
|
|
751
|
+
|
|
752
|
+
# auth_names
|
|
753
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
754
|
+
|
|
755
|
+
new_options = opts.merge(
|
|
756
|
+
:operation => :"AdCreativesApi.list_ad_videos",
|
|
757
|
+
:header_params => header_params,
|
|
758
|
+
:query_params => query_params,
|
|
759
|
+
:form_params => form_params,
|
|
760
|
+
:body => post_body,
|
|
761
|
+
:auth_names => auth_names,
|
|
762
|
+
:return_type => return_type
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug "API called: AdCreativesApi#list_ad_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
768
|
+
end
|
|
769
|
+
return data, status_code, headers
|
|
770
|
+
end
|
|
771
|
+
|
|
684
772
|
# Rename a creative
|
|
685
773
|
# Renames a creative. Creatives are immutable on Meta beyond `name` — for content changes create a new creative (POST /v1/ads/creatives) and swap it onto the ad (PUT /v1/ads/{adId} with `creative`).
|
|
686
774
|
# @param creative_id [String] Platform creative id
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# Meta (facebook, instagram) and LinkedIn.
|
|
17
|
+
# Meta (facebook, instagram) and LinkedIn. Creates a single VIDEO ad. Mutually exclusive with `imageUrl`. Supply `url` to upload a file, or `id` to reuse a video already on the ad account (list them with GET /v1/ads/videos). Works on the single-ad and attach (`adSetId`) shapes; for Meta multi-creative, set `video` per entry inside `creatives[]` instead. For LinkedIn the video is uploaded to LinkedIn under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO; LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame) — supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.
|
|
18
18
|
class CreateStandaloneAdRequestVideo < ApiModelBase
|
|
19
19
|
# Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s. Provide either `url` or `id`.
|
|
20
20
|
attr_accessor :url
|