zernio-sdk 0.0.742 → 0.0.744
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 +3 -0
- data/docs/AdCreativesApi.md +70 -0
- data/docs/GetAdMedia200Response.md +22 -0
- data/docs/GetAdMedia200ResponseMediaInner.md +28 -0
- data/docs/UpdateWhatsAppTemplate200ResponseTemplate.md +2 -2
- data/docs/WhatsAppApi.md +1 -1
- data/lib/zernio-sdk/api/ad_creatives_api.rb +63 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +2 -2
- data/lib/zernio-sdk/models/get_ad_media200_response.rb +168 -0
- data/lib/zernio-sdk/models/get_ad_media200_response_media_inner.rb +231 -0
- data/lib/zernio-sdk/models/update_whats_app_template200_response_template.rb +1 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +2 -0
- data/openapi.yaml +58 -1
- data/spec/api/ad_creatives_api_spec.rb +12 -0
- data/spec/api/whats_app_api_spec.rb +1 -1
- data/spec/models/get_ad_media200_response_media_inner_spec.rb +70 -0
- data/spec/models/get_ad_media200_response_spec.rb +48 -0
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ddb21a6e5fea75b66dbf1826e7827fc60615bed899cc9e969ad29e6cb1fff626
|
|
4
|
+
data.tar.gz: f896eb87c19e97117f159f9337e5b2c4ee4ba79539fba2baf025f2c629354b2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a71aa3e78d47b0051b5e86e9e7d411fd376093beb1aa937010d9f6e0a262e3ed48d501ce697bac4fae5197156a2a5a18d43e49dbb5f781a401c026435370c7b
|
|
7
|
+
data.tar.gz: 90c8d2833dab6faf82a051d01547e2ed226b9095cab447334b809279024d51f6939b4eca27731d119cee47f1c7188d3bfbb17f8bd725b5187d1334bf8173544b
|
data/README.md
CHANGED
|
@@ -159,6 +159,7 @@ Class | Method | HTTP request | Description
|
|
|
159
159
|
*Zernio::AdCreativesApi* | [**delete_ad_video**](docs/AdCreativesApi.md#delete_ad_video) | **DELETE** /v1/ads/videos/{videoId} | Delete an ad video
|
|
160
160
|
*Zernio::AdCreativesApi* | [**generate_ad_previews**](docs/AdCreativesApi.md#generate_ad_previews) | **POST** /v1/ads/preview | Render pre-create ad previews
|
|
161
161
|
*Zernio::AdCreativesApi* | [**get_ad_creative**](docs/AdCreativesApi.md#get_ad_creative) | **GET** /v1/ads/creatives/{creativeId} | Creative details
|
|
162
|
+
*Zernio::AdCreativesApi* | [**get_ad_media**](docs/AdCreativesApi.md#get_ad_media) | **GET** /v1/ads/{adId}/media | Direct video and image URLs for an ad
|
|
162
163
|
*Zernio::AdCreativesApi* | [**get_ad_previews**](docs/AdCreativesApi.md#get_ad_previews) | **GET** /v1/ads/{adId}/preview | Render previews of an existing ad
|
|
163
164
|
*Zernio::AdCreativesApi* | [**list_ad_catalog_product_sets**](docs/AdCreativesApi.md#list_ad_catalog_product_sets) | **GET** /v1/ads/catalogs/{catalogId}/product-sets | List a catalog's product sets
|
|
164
165
|
*Zernio::AdCreativesApi* | [**list_ad_catalogs**](docs/AdCreativesApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs
|
|
@@ -1137,6 +1138,8 @@ Class | Method | HTTP request | Description
|
|
|
1137
1138
|
- [Zernio::GetAdCreative200Response](docs/GetAdCreative200Response.md)
|
|
1138
1139
|
- [Zernio::GetAdInsightsReport200Response](docs/GetAdInsightsReport200Response.md)
|
|
1139
1140
|
- [Zernio::GetAdInsightsReport200ResponsePaging](docs/GetAdInsightsReport200ResponsePaging.md)
|
|
1141
|
+
- [Zernio::GetAdMedia200Response](docs/GetAdMedia200Response.md)
|
|
1142
|
+
- [Zernio::GetAdMedia200ResponseMediaInner](docs/GetAdMedia200ResponseMediaInner.md)
|
|
1140
1143
|
- [Zernio::GetAdPreviews200Response](docs/GetAdPreviews200Response.md)
|
|
1141
1144
|
- [Zernio::GetAdSetDetails200Response](docs/GetAdSetDetails200Response.md)
|
|
1142
1145
|
- [Zernio::GetAdTrackingTags200Response](docs/GetAdTrackingTags200Response.md)
|
data/docs/AdCreativesApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
9
9
|
| [**delete_ad_video**](AdCreativesApi.md#delete_ad_video) | **DELETE** /v1/ads/videos/{videoId} | Delete an ad video |
|
|
10
10
|
| [**generate_ad_previews**](AdCreativesApi.md#generate_ad_previews) | **POST** /v1/ads/preview | Render pre-create ad previews |
|
|
11
11
|
| [**get_ad_creative**](AdCreativesApi.md#get_ad_creative) | **GET** /v1/ads/creatives/{creativeId} | Creative details |
|
|
12
|
+
| [**get_ad_media**](AdCreativesApi.md#get_ad_media) | **GET** /v1/ads/{adId}/media | Direct video and image URLs for an ad |
|
|
12
13
|
| [**get_ad_previews**](AdCreativesApi.md#get_ad_previews) | **GET** /v1/ads/{adId}/preview | Render previews of an existing ad |
|
|
13
14
|
| [**list_ad_catalog_product_sets**](AdCreativesApi.md#list_ad_catalog_product_sets) | **GET** /v1/ads/catalogs/{catalogId}/product-sets | List a catalog's product sets |
|
|
14
15
|
| [**list_ad_catalogs**](AdCreativesApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs |
|
|
@@ -377,6 +378,75 @@ end
|
|
|
377
378
|
- **Accept**: application/json
|
|
378
379
|
|
|
379
380
|
|
|
381
|
+
## get_ad_media
|
|
382
|
+
|
|
383
|
+
> <GetAdMedia200Response> get_ad_media(ad_id)
|
|
384
|
+
|
|
385
|
+
Direct video and image URLs for an ad
|
|
386
|
+
|
|
387
|
+
Returns the direct signed URLs for every video and image asset used by an ad's live creative, normalised across shapes: single image/video, carousel, Reels/Story (`object_story_spec.video_data`) and dynamic creative (`asset_feed_spec`). Video items include Meta's poster thumbnail and the video's Meta id when available. Reads Meta live rather than the stored creative blob because Meta's signed fbcdn URLs carry an `oe=<hex>` expiration (image_url ~24 h, video source ~12 d). Treat URLs as short-lived — re-fetch this endpoint before serving or downloading assets instead of caching URLs beyond that window.
|
|
388
|
+
|
|
389
|
+
### Examples
|
|
390
|
+
|
|
391
|
+
```ruby
|
|
392
|
+
require 'time'
|
|
393
|
+
require 'zernio-sdk'
|
|
394
|
+
# setup authorization
|
|
395
|
+
Zernio.configure do |config|
|
|
396
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
397
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
api_instance = Zernio::AdCreativesApi.new
|
|
401
|
+
ad_id = 'ad_id_example' # String | Zernio ad id (24-char hex) or platform ad id.
|
|
402
|
+
|
|
403
|
+
begin
|
|
404
|
+
# Direct video and image URLs for an ad
|
|
405
|
+
result = api_instance.get_ad_media(ad_id)
|
|
406
|
+
p result
|
|
407
|
+
rescue Zernio::ApiError => e
|
|
408
|
+
puts "Error when calling AdCreativesApi->get_ad_media: #{e}"
|
|
409
|
+
end
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
#### Using the get_ad_media_with_http_info variant
|
|
413
|
+
|
|
414
|
+
This returns an Array which contains the response data, status code and headers.
|
|
415
|
+
|
|
416
|
+
> <Array(<GetAdMedia200Response>, Integer, Hash)> get_ad_media_with_http_info(ad_id)
|
|
417
|
+
|
|
418
|
+
```ruby
|
|
419
|
+
begin
|
|
420
|
+
# Direct video and image URLs for an ad
|
|
421
|
+
data, status_code, headers = api_instance.get_ad_media_with_http_info(ad_id)
|
|
422
|
+
p status_code # => 2xx
|
|
423
|
+
p headers # => { ... }
|
|
424
|
+
p data # => <GetAdMedia200Response>
|
|
425
|
+
rescue Zernio::ApiError => e
|
|
426
|
+
puts "Error when calling AdCreativesApi->get_ad_media_with_http_info: #{e}"
|
|
427
|
+
end
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Parameters
|
|
431
|
+
|
|
432
|
+
| Name | Type | Description | Notes |
|
|
433
|
+
| ---- | ---- | ----------- | ----- |
|
|
434
|
+
| **ad_id** | **String** | Zernio ad id (24-char hex) or platform ad id. | |
|
|
435
|
+
|
|
436
|
+
### Return type
|
|
437
|
+
|
|
438
|
+
[**GetAdMedia200Response**](GetAdMedia200Response.md)
|
|
439
|
+
|
|
440
|
+
### Authorization
|
|
441
|
+
|
|
442
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
443
|
+
|
|
444
|
+
### HTTP request headers
|
|
445
|
+
|
|
446
|
+
- **Content-Type**: Not defined
|
|
447
|
+
- **Accept**: application/json
|
|
448
|
+
|
|
449
|
+
|
|
380
450
|
## get_ad_previews
|
|
381
451
|
|
|
382
452
|
> <GetAdPreviews200Response> get_ad_previews(ad_id, opts)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::GetAdMedia200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_id** | **String** | | [optional] |
|
|
8
|
+
| **platform** | **String** | 'facebook' or 'instagram' — only Meta is supported for now. | [optional] |
|
|
9
|
+
| **media** | [**Array<GetAdMedia200ResponseMediaInner>**](GetAdMedia200ResponseMediaInner.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::GetAdMedia200Response.new(
|
|
17
|
+
ad_id: null,
|
|
18
|
+
platform: null,
|
|
19
|
+
media: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zernio::GetAdMedia200ResponseMediaInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | | [optional] |
|
|
8
|
+
| **url** | **String** | Direct file URL (signed; short-lived — see description). | [optional] |
|
|
9
|
+
| **thumbnail_url** | **String** | Video poster URL (videos only). | [optional] |
|
|
10
|
+
| **video_id** | **String** | Meta video id (videos only), reusable as video.id on the create endpoints. | [optional] |
|
|
11
|
+
| **length** | **Float** | Video length in seconds (videos only). | [optional] |
|
|
12
|
+
| **index** | **Integer** | 0-based position for carousel children or asset_feed_spec entries. | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zernio-sdk'
|
|
18
|
+
|
|
19
|
+
instance = Zernio::GetAdMedia200ResponseMediaInner.new(
|
|
20
|
+
type: null,
|
|
21
|
+
url: null,
|
|
22
|
+
thumbnail_url: null,
|
|
23
|
+
video_id: null,
|
|
24
|
+
length: null,
|
|
25
|
+
index: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | | [optional] |
|
|
8
8
|
| **name** | **String** | | [optional] |
|
|
9
|
-
| **status** | **String** |
|
|
9
|
+
| **status** | **String** | Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead. | [optional] |
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ require 'zernio-sdk'
|
|
|
16
16
|
instance = Zernio::UpdateWhatsAppTemplate200ResponseTemplate.new(
|
|
17
17
|
id: null,
|
|
18
18
|
name: null,
|
|
19
|
-
status:
|
|
19
|
+
status: PENDING
|
|
20
20
|
)
|
|
21
21
|
```
|
|
22
22
|
|
data/docs/WhatsAppApi.md
CHANGED
|
@@ -2454,7 +2454,7 @@ end
|
|
|
2454
2454
|
|
|
2455
2455
|
Update template
|
|
2456
2456
|
|
|
2457
|
-
Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
|
|
2457
|
+
Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated. A successful update sends the template back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives later on the `whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be edited again until Meta finishes reviewing it.
|
|
2458
2458
|
|
|
2459
2459
|
### Examples
|
|
2460
2460
|
|
|
@@ -375,6 +375,69 @@ module Zernio
|
|
|
375
375
|
return data, status_code, headers
|
|
376
376
|
end
|
|
377
377
|
|
|
378
|
+
# Direct video and image URLs for an ad
|
|
379
|
+
# Returns the direct signed URLs for every video and image asset used by an ad's live creative, normalised across shapes: single image/video, carousel, Reels/Story (`object_story_spec.video_data`) and dynamic creative (`asset_feed_spec`). Video items include Meta's poster thumbnail and the video's Meta id when available. Reads Meta live rather than the stored creative blob because Meta's signed fbcdn URLs carry an `oe=<hex>` expiration (image_url ~24 h, video source ~12 d). Treat URLs as short-lived — re-fetch this endpoint before serving or downloading assets instead of caching URLs beyond that window.
|
|
380
|
+
# @param ad_id [String] Zernio ad id (24-char hex) or platform ad id.
|
|
381
|
+
# @param [Hash] opts the optional parameters
|
|
382
|
+
# @return [GetAdMedia200Response]
|
|
383
|
+
def get_ad_media(ad_id, opts = {})
|
|
384
|
+
data, _status_code, _headers = get_ad_media_with_http_info(ad_id, opts)
|
|
385
|
+
data
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Direct video and image URLs for an ad
|
|
389
|
+
# Returns the direct signed URLs for every video and image asset used by an ad's live creative, normalised across shapes: single image/video, carousel, Reels/Story (`object_story_spec.video_data`) and dynamic creative (`asset_feed_spec`). Video items include Meta's poster thumbnail and the video's Meta id when available. Reads Meta live rather than the stored creative blob because Meta's signed fbcdn URLs carry an `oe=<hex>` expiration (image_url ~24 h, video source ~12 d). Treat URLs as short-lived — re-fetch this endpoint before serving or downloading assets instead of caching URLs beyond that window.
|
|
390
|
+
# @param ad_id [String] Zernio ad id (24-char hex) or platform ad id.
|
|
391
|
+
# @param [Hash] opts the optional parameters
|
|
392
|
+
# @return [Array<(GetAdMedia200Response, Integer, Hash)>] GetAdMedia200Response data, response status code and response headers
|
|
393
|
+
def get_ad_media_with_http_info(ad_id, opts = {})
|
|
394
|
+
if @api_client.config.debugging
|
|
395
|
+
@api_client.config.logger.debug 'Calling API: AdCreativesApi.get_ad_media ...'
|
|
396
|
+
end
|
|
397
|
+
# verify the required parameter 'ad_id' is set
|
|
398
|
+
if @api_client.config.client_side_validation && ad_id.nil?
|
|
399
|
+
fail ArgumentError, "Missing the required parameter 'ad_id' when calling AdCreativesApi.get_ad_media"
|
|
400
|
+
end
|
|
401
|
+
# resource path
|
|
402
|
+
local_var_path = '/v1/ads/{adId}/media'.sub('{' + 'adId' + '}', CGI.escape(ad_id.to_s))
|
|
403
|
+
|
|
404
|
+
# query parameters
|
|
405
|
+
query_params = opts[:query_params] || {}
|
|
406
|
+
|
|
407
|
+
# header parameters
|
|
408
|
+
header_params = opts[:header_params] || {}
|
|
409
|
+
# HTTP header 'Accept' (if needed)
|
|
410
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
411
|
+
|
|
412
|
+
# form parameters
|
|
413
|
+
form_params = opts[:form_params] || {}
|
|
414
|
+
|
|
415
|
+
# http body (model)
|
|
416
|
+
post_body = opts[:debug_body]
|
|
417
|
+
|
|
418
|
+
# return_type
|
|
419
|
+
return_type = opts[:debug_return_type] || 'GetAdMedia200Response'
|
|
420
|
+
|
|
421
|
+
# auth_names
|
|
422
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
423
|
+
|
|
424
|
+
new_options = opts.merge(
|
|
425
|
+
:operation => :"AdCreativesApi.get_ad_media",
|
|
426
|
+
:header_params => header_params,
|
|
427
|
+
:query_params => query_params,
|
|
428
|
+
:form_params => form_params,
|
|
429
|
+
:body => post_body,
|
|
430
|
+
:auth_names => auth_names,
|
|
431
|
+
:return_type => return_type
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
435
|
+
if @api_client.config.debugging
|
|
436
|
+
@api_client.config.logger.debug "API called: AdCreativesApi#get_ad_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
437
|
+
end
|
|
438
|
+
return data, status_code, headers
|
|
439
|
+
end
|
|
440
|
+
|
|
378
441
|
# Render previews of an existing ad
|
|
379
442
|
# Renders an EXISTING ad per placement via Meta's `/{ad_id}/previews`. Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values return Meta's 400 verbatim.
|
|
380
443
|
# @param ad_id [String] Zernio ad id (24-char hex).
|
|
@@ -2422,7 +2422,7 @@ module Zernio
|
|
|
2422
2422
|
end
|
|
2423
2423
|
|
|
2424
2424
|
# Update template
|
|
2425
|
-
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
|
|
2425
|
+
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated. A successful update sends the template back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives later on the `whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be edited again until Meta finishes reviewing it.
|
|
2426
2426
|
# @param template_name [String] Template name
|
|
2427
2427
|
# @param update_whats_app_template_request [UpdateWhatsAppTemplateRequest]
|
|
2428
2428
|
# @param [Hash] opts the optional parameters
|
|
@@ -2433,7 +2433,7 @@ module Zernio
|
|
|
2433
2433
|
end
|
|
2434
2434
|
|
|
2435
2435
|
# Update template
|
|
2436
|
-
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
|
|
2436
|
+
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated. A successful update sends the template back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives later on the `whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be edited again until Meta finishes reviewing it.
|
|
2437
2437
|
# @param template_name [String] Template name
|
|
2438
2438
|
# @param update_whats_app_template_request [UpdateWhatsAppTemplateRequest]
|
|
2439
2439
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class GetAdMedia200Response < ApiModelBase
|
|
18
|
+
attr_accessor :ad_id
|
|
19
|
+
|
|
20
|
+
# 'facebook' or 'instagram' — only Meta is supported for now.
|
|
21
|
+
attr_accessor :platform
|
|
22
|
+
|
|
23
|
+
attr_accessor :media
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'ad_id' => :'adId',
|
|
29
|
+
:'platform' => :'platform',
|
|
30
|
+
:'media' => :'media'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'ad_id' => :'String',
|
|
48
|
+
:'platform' => :'String',
|
|
49
|
+
:'media' => :'Array<GetAdMedia200ResponseMediaInner>'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdMedia200Response` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdMedia200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'ad_id')
|
|
76
|
+
self.ad_id = attributes[:'ad_id']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'platform')
|
|
80
|
+
self.platform = attributes[:'platform']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'media')
|
|
84
|
+
if (value = attributes[:'media']).is_a?(Array)
|
|
85
|
+
self.media = value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
|
+
# @return Array for valid properties with the reasons
|
|
92
|
+
def list_invalid_properties
|
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
94
|
+
invalid_properties = Array.new
|
|
95
|
+
invalid_properties
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check to see if the all the properties in the model are valid
|
|
99
|
+
# @return true if the model is valid
|
|
100
|
+
def valid?
|
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
ad_id == o.ad_id &&
|
|
111
|
+
platform == o.platform &&
|
|
112
|
+
media == o.media
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[ad_id, platform, media].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the object in the form of hash
|
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
|
152
|
+
def to_hash
|
|
153
|
+
hash = {}
|
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
+
value = self.send(attr)
|
|
156
|
+
if value.nil?
|
|
157
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
158
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
hash[param] = _to_hash(value)
|
|
162
|
+
end
|
|
163
|
+
hash
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
end
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class GetAdMedia200ResponseMediaInner < ApiModelBase
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
# Direct file URL (signed; short-lived — see description).
|
|
21
|
+
attr_accessor :url
|
|
22
|
+
|
|
23
|
+
# Video poster URL (videos only).
|
|
24
|
+
attr_accessor :thumbnail_url
|
|
25
|
+
|
|
26
|
+
# Meta video id (videos only), reusable as video.id on the create endpoints.
|
|
27
|
+
attr_accessor :video_id
|
|
28
|
+
|
|
29
|
+
# Video length in seconds (videos only).
|
|
30
|
+
attr_accessor :length
|
|
31
|
+
|
|
32
|
+
# 0-based position for carousel children or asset_feed_spec entries.
|
|
33
|
+
attr_accessor :index
|
|
34
|
+
|
|
35
|
+
class EnumAttributeValidator
|
|
36
|
+
attr_reader :datatype
|
|
37
|
+
attr_reader :allowable_values
|
|
38
|
+
|
|
39
|
+
def initialize(datatype, allowable_values)
|
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
|
41
|
+
case datatype.to_s
|
|
42
|
+
when /Integer/i
|
|
43
|
+
value.to_i
|
|
44
|
+
when /Float/i
|
|
45
|
+
value.to_f
|
|
46
|
+
else
|
|
47
|
+
value
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def valid?(value)
|
|
53
|
+
!value || allowable_values.include?(value)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'type' => :'type',
|
|
61
|
+
:'url' => :'url',
|
|
62
|
+
:'thumbnail_url' => :'thumbnailUrl',
|
|
63
|
+
:'video_id' => :'videoId',
|
|
64
|
+
:'length' => :'length',
|
|
65
|
+
:'index' => :'index'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns all the JSON keys this model knows about
|
|
75
|
+
def self.acceptable_attributes
|
|
76
|
+
acceptable_attribute_map.values
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.openapi_types
|
|
81
|
+
{
|
|
82
|
+
:'type' => :'String',
|
|
83
|
+
:'url' => :'String',
|
|
84
|
+
:'thumbnail_url' => :'String',
|
|
85
|
+
:'video_id' => :'String',
|
|
86
|
+
:'length' => :'Float',
|
|
87
|
+
:'index' => :'Integer'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdMedia200ResponseMediaInner` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdMedia200ResponseMediaInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'type')
|
|
114
|
+
self.type = attributes[:'type']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'url')
|
|
118
|
+
self.url = attributes[:'url']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'thumbnail_url')
|
|
122
|
+
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'video_id')
|
|
126
|
+
self.video_id = attributes[:'video_id']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'length')
|
|
130
|
+
self.length = attributes[:'length']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'index')
|
|
134
|
+
self.index = attributes[:'index']
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
139
|
+
# @return Array for valid properties with the reasons
|
|
140
|
+
def list_invalid_properties
|
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
142
|
+
invalid_properties = Array.new
|
|
143
|
+
invalid_properties
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Check to see if the all the properties in the model are valid
|
|
147
|
+
# @return true if the model is valid
|
|
148
|
+
def valid?
|
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
150
|
+
type_validator = EnumAttributeValidator.new('String', ["image", "video"])
|
|
151
|
+
return false unless type_validator.valid?(@type)
|
|
152
|
+
true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
156
|
+
# @param [Object] type Object to be assigned
|
|
157
|
+
def type=(type)
|
|
158
|
+
validator = EnumAttributeValidator.new('String', ["image", "video"])
|
|
159
|
+
unless validator.valid?(type)
|
|
160
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
161
|
+
end
|
|
162
|
+
@type = type
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Checks equality by comparing each attribute.
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def ==(o)
|
|
168
|
+
return true if self.equal?(o)
|
|
169
|
+
self.class == o.class &&
|
|
170
|
+
type == o.type &&
|
|
171
|
+
url == o.url &&
|
|
172
|
+
thumbnail_url == o.thumbnail_url &&
|
|
173
|
+
video_id == o.video_id &&
|
|
174
|
+
length == o.length &&
|
|
175
|
+
index == o.index
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# @see the `==` method
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def eql?(o)
|
|
181
|
+
self == o
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Calculates hash code according to all attributes.
|
|
185
|
+
# @return [Integer] Hash code
|
|
186
|
+
def hash
|
|
187
|
+
[type, url, thumbnail_url, video_id, length, index].hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Builds the object from hash
|
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
192
|
+
# @return [Object] Returns the model itself
|
|
193
|
+
def self.build_from_hash(attributes)
|
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
|
195
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
196
|
+
transformed_hash = {}
|
|
197
|
+
openapi_types.each_pair do |key, type|
|
|
198
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
199
|
+
transformed_hash["#{key}"] = nil
|
|
200
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
201
|
+
# check to ensure the input is an array given that the attribute
|
|
202
|
+
# is documented as an array but the input is not
|
|
203
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
204
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
205
|
+
end
|
|
206
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
207
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
new(transformed_hash)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the object in the form of hash
|
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
|
215
|
+
def to_hash
|
|
216
|
+
hash = {}
|
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
|
@@ -19,6 +19,7 @@ module Zernio
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :name
|
|
21
21
|
|
|
22
|
+
# Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.
|
|
22
23
|
attr_accessor :status
|
|
23
24
|
|
|
24
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -494,6 +494,8 @@ require 'zernio-sdk/models/get_ad_comments200_response_pagination'
|
|
|
494
494
|
require 'zernio-sdk/models/get_ad_creative200_response'
|
|
495
495
|
require 'zernio-sdk/models/get_ad_insights_report200_response'
|
|
496
496
|
require 'zernio-sdk/models/get_ad_insights_report200_response_paging'
|
|
497
|
+
require 'zernio-sdk/models/get_ad_media200_response'
|
|
498
|
+
require 'zernio-sdk/models/get_ad_media200_response_media_inner'
|
|
497
499
|
require 'zernio-sdk/models/get_ad_previews200_response'
|
|
498
500
|
require 'zernio-sdk/models/get_ad_set_details200_response'
|
|
499
501
|
require 'zernio-sdk/models/get_ad_tracking_tags200_response'
|
data/openapi.yaml
CHANGED
|
@@ -29239,6 +29239,11 @@ paths:
|
|
|
29239
29239
|
description: |
|
|
29240
29240
|
Update a message template's components. Only certain fields can be updated depending on
|
|
29241
29241
|
the template's current approval state. Approved templates can only have components updated.
|
|
29242
|
+
|
|
29243
|
+
A successful update sends the template back to Meta for review, so the `status` returned
|
|
29244
|
+
here is normally `PENDING`. The final outcome arrives later on the
|
|
29245
|
+
`whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be
|
|
29246
|
+
edited again until Meta finishes reviewing it.
|
|
29242
29247
|
security:
|
|
29243
29248
|
- bearerAuth: []
|
|
29244
29249
|
parameters:
|
|
@@ -29292,7 +29297,10 @@ paths:
|
|
|
29292
29297
|
properties:
|
|
29293
29298
|
id: { type: string }
|
|
29294
29299
|
name: { type: string }
|
|
29295
|
-
status:
|
|
29300
|
+
status:
|
|
29301
|
+
type: string
|
|
29302
|
+
description: 'Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.'
|
|
29303
|
+
example: PENDING
|
|
29296
29304
|
'400': { description: Validation error (missing fields) }
|
|
29297
29305
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29298
29306
|
'404': { $ref: '#/components/responses/NotFound' }
|
|
@@ -40277,6 +40285,55 @@ paths:
|
|
|
40277
40285
|
'429': { description: Meta rate limit reached }
|
|
40278
40286
|
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
40279
40287
|
|
|
40288
|
+
/v1/ads/{adId}/media:
|
|
40289
|
+
get:
|
|
40290
|
+
x-resource-group: "ads"
|
|
40291
|
+
operationId: getAdMedia
|
|
40292
|
+
tags: ["Ad Creatives"]
|
|
40293
|
+
x-platforms: ["meta"]
|
|
40294
|
+
summary: Direct video and image URLs for an ad
|
|
40295
|
+
description: |-
|
|
40296
|
+
Returns the direct signed URLs for every video and image asset used by an ad's live
|
|
40297
|
+
creative, normalised across shapes: single image/video, carousel,
|
|
40298
|
+
Reels/Story (`object_story_spec.video_data`) and dynamic
|
|
40299
|
+
creative (`asset_feed_spec`). Video items include Meta's poster thumbnail and the
|
|
40300
|
+
video's Meta id when available.
|
|
40301
|
+
|
|
40302
|
+
Reads Meta live rather than the stored creative blob because Meta's signed fbcdn
|
|
40303
|
+
URLs carry an `oe=<hex>` expiration (image_url ~24 h, video source ~12 d). Treat
|
|
40304
|
+
URLs as short-lived — re-fetch this endpoint before serving or downloading assets
|
|
40305
|
+
instead of caching URLs beyond that window.
|
|
40306
|
+
security:
|
|
40307
|
+
- bearerAuth: []
|
|
40308
|
+
parameters:
|
|
40309
|
+
- { name: adId, in: path, required: true, schema: { type: string }, description: "Zernio ad id (24-char hex) or platform ad id." }
|
|
40310
|
+
responses:
|
|
40311
|
+
'200':
|
|
40312
|
+
description: Media assets
|
|
40313
|
+
content:
|
|
40314
|
+
application/json:
|
|
40315
|
+
schema:
|
|
40316
|
+
type: object
|
|
40317
|
+
properties:
|
|
40318
|
+
adId: { type: string }
|
|
40319
|
+
platform: { type: string, description: "'facebook' or 'instagram' — only Meta is supported for now." }
|
|
40320
|
+
media:
|
|
40321
|
+
type: array
|
|
40322
|
+
items:
|
|
40323
|
+
type: object
|
|
40324
|
+
properties:
|
|
40325
|
+
type: { type: string, enum: [image, video] }
|
|
40326
|
+
url: { type: string, description: "Direct file URL (signed; short-lived — see description)." }
|
|
40327
|
+
thumbnailUrl: { type: string, description: "Video poster URL (videos only)." }
|
|
40328
|
+
videoId: { type: string, description: "Meta video id (videos only), reusable as video.id on the create endpoints." }
|
|
40329
|
+
length: { type: number, description: "Video length in seconds (videos only)." }
|
|
40330
|
+
index: { type: integer, description: "0-based position for carousel children or asset_feed_spec entries." }
|
|
40331
|
+
'400': { description: "Invalid input" }
|
|
40332
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
40333
|
+
'404': { description: Ad not found }
|
|
40334
|
+
'422': { description: No active Meta connection for this ad. Reconnect the account. }
|
|
40335
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
40336
|
+
|
|
40280
40337
|
/v1/ads/keywords/ideas:
|
|
40281
40338
|
post:
|
|
40282
40339
|
x-resource-group: "ads"
|
|
@@ -97,6 +97,18 @@ describe 'AdCreativesApi' do
|
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
+
# unit tests for get_ad_media
|
|
101
|
+
# Direct video and image URLs for an ad
|
|
102
|
+
# Returns the direct signed URLs for every video and image asset used by an ad's live creative, normalised across shapes: single image/video, carousel, Reels/Story (`object_story_spec.video_data`) and dynamic creative (`asset_feed_spec`). Video items include Meta's poster thumbnail and the video's Meta id when available. Reads Meta live rather than the stored creative blob because Meta's signed fbcdn URLs carry an `oe=<hex>` expiration (image_url ~24 h, video source ~12 d). Treat URLs as short-lived — re-fetch this endpoint before serving or downloading assets instead of caching URLs beyond that window.
|
|
103
|
+
# @param ad_id Zernio ad id (24-char hex) or platform ad id.
|
|
104
|
+
# @param [Hash] opts the optional parameters
|
|
105
|
+
# @return [GetAdMedia200Response]
|
|
106
|
+
describe 'get_ad_media test' do
|
|
107
|
+
it 'should work' do
|
|
108
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
100
112
|
# unit tests for get_ad_previews
|
|
101
113
|
# Render previews of an existing ad
|
|
102
114
|
# Renders an EXISTING ad per placement via Meta's `/{ad_id}/previews`. Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values return Meta's 400 verbatim.
|
|
@@ -467,7 +467,7 @@ describe 'WhatsAppApi' do
|
|
|
467
467
|
|
|
468
468
|
# unit tests for update_whats_app_template
|
|
469
469
|
# Update template
|
|
470
|
-
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
|
|
470
|
+
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated. A successful update sends the template back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives later on the `whatsapp.template.status_updated` webhook. A template already in `PENDING` cannot be edited again until Meta finishes reviewing it.
|
|
471
471
|
# @param template_name Template name
|
|
472
472
|
# @param update_whats_app_template_request
|
|
473
473
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::GetAdMedia200ResponseMediaInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::GetAdMedia200ResponseMediaInner do
|
|
21
|
+
#let(:instance) { Zernio::GetAdMedia200ResponseMediaInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GetAdMedia200ResponseMediaInner' do
|
|
24
|
+
it 'should create an instance of GetAdMedia200ResponseMediaInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::GetAdMedia200ResponseMediaInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "type"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["image", "video"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.type = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "url"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "thumbnail_url"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "video_id"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe 'test attribute "length"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "index"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::GetAdMedia200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::GetAdMedia200Response do
|
|
21
|
+
#let(:instance) { Zernio::GetAdMedia200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GetAdMedia200Response' do
|
|
24
|
+
it 'should create an instance of GetAdMedia200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::GetAdMedia200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "ad_id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "platform"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "media"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.744
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -574,6 +574,8 @@ files:
|
|
|
574
574
|
- docs/GetAdCreative200Response.md
|
|
575
575
|
- docs/GetAdInsightsReport200Response.md
|
|
576
576
|
- docs/GetAdInsightsReport200ResponsePaging.md
|
|
577
|
+
- docs/GetAdMedia200Response.md
|
|
578
|
+
- docs/GetAdMedia200ResponseMediaInner.md
|
|
577
579
|
- docs/GetAdPreviews200Response.md
|
|
578
580
|
- docs/GetAdSetDetails200Response.md
|
|
579
581
|
- docs/GetAdTrackingTags200Response.md
|
|
@@ -2392,6 +2394,8 @@ files:
|
|
|
2392
2394
|
- lib/zernio-sdk/models/get_ad_creative200_response.rb
|
|
2393
2395
|
- lib/zernio-sdk/models/get_ad_insights_report200_response.rb
|
|
2394
2396
|
- lib/zernio-sdk/models/get_ad_insights_report200_response_paging.rb
|
|
2397
|
+
- lib/zernio-sdk/models/get_ad_media200_response.rb
|
|
2398
|
+
- lib/zernio-sdk/models/get_ad_media200_response_media_inner.rb
|
|
2395
2399
|
- lib/zernio-sdk/models/get_ad_previews200_response.rb
|
|
2396
2400
|
- lib/zernio-sdk/models/get_ad_set_details200_response.rb
|
|
2397
2401
|
- lib/zernio-sdk/models/get_ad_tracking_tags200_response.rb
|
|
@@ -4169,6 +4173,8 @@ files:
|
|
|
4169
4173
|
- spec/models/get_ad_creative200_response_spec.rb
|
|
4170
4174
|
- spec/models/get_ad_insights_report200_response_paging_spec.rb
|
|
4171
4175
|
- spec/models/get_ad_insights_report200_response_spec.rb
|
|
4176
|
+
- spec/models/get_ad_media200_response_media_inner_spec.rb
|
|
4177
|
+
- spec/models/get_ad_media200_response_spec.rb
|
|
4172
4178
|
- spec/models/get_ad_previews200_response_spec.rb
|
|
4173
4179
|
- spec/models/get_ad_set_details200_response_spec.rb
|
|
4174
4180
|
- spec/models/get_ad_tracking_tags200_response_spec.rb
|
|
@@ -5569,6 +5575,7 @@ test_files:
|
|
|
5569
5575
|
- spec/models/get_posting_frequency200_response_spec.rb
|
|
5570
5576
|
- spec/models/set_telegram_commands_request_commands_inner_spec.rb
|
|
5571
5577
|
- spec/models/update_contact200_response_contact_spec.rb
|
|
5578
|
+
- spec/models/get_ad_media200_response_spec.rb
|
|
5572
5579
|
- spec/models/webhook_payload_message_metadata_referral_spec.rb
|
|
5573
5580
|
- spec/models/analytics_overview_spec.rb
|
|
5574
5581
|
- spec/models/facebook_post_earnings_response_metrics_value_spec.rb
|
|
@@ -6201,6 +6208,7 @@ test_files:
|
|
|
6201
6208
|
- spec/models/select_facebook_page_request_user_profile_spec.rb
|
|
6202
6209
|
- spec/models/get_youtube_playlists200_response_playlists_inner_spec.rb
|
|
6203
6210
|
- spec/models/sync_external_posts200_response_spec.rb
|
|
6211
|
+
- spec/models/get_ad_media200_response_media_inner_spec.rb
|
|
6204
6212
|
- spec/models/update_discord_settings200_response_spec.rb
|
|
6205
6213
|
- spec/models/linked_in_ads_platform_data_follower_spec.rb
|
|
6206
6214
|
- spec/models/create_whats_app_group_chat201_response_group_spec.rb
|