late-sdk 0.0.714 → 0.0.716
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 +15 -10
- data/docs/AdAnalyticsResponse.md +22 -0
- data/docs/{GetAdAnalytics200ResponseAd.md → AdAnalyticsResponseAd.md} +2 -4
- data/docs/AdCampaignsApi.md +12 -12
- data/docs/AdDailyMetrics.md +14 -0
- data/docs/AdEngagementCounts.md +1 -1
- data/docs/AdInsightsApi.md +8 -8
- data/docs/AdMetrics.md +14 -0
- data/docs/AdTreeResponse.md +22 -0
- data/docs/AdsListResponse.md +22 -0
- data/docs/AdsTimelineResponse.md +20 -0
- data/docs/{GetAdsTimeline200ResponseRowsInner.md → AdsTimelineResponseRowsInner.md} +2 -2
- data/docs/CampaignAnalyticsResponse.md +22 -0
- data/docs/{GetCampaignAnalytics200ResponseAnalytics.md → CampaignAnalyticsResponseAnalytics.md} +3 -3
- data/docs/{GetCampaignAnalytics200ResponseAnalyticsDailyInner.md → CampaignAnalyticsResponseAnalyticsDailyInner.md} +16 -2
- data/docs/{GetCampaignAnalytics200ResponseCampaign.md → CampaignAnalyticsResponseCampaign.md} +2 -2
- data/docs/GetAdAnalytics202Response.md +22 -0
- data/docs/GetAdTree202Response.md +22 -0
- data/docs/GetAdsTimeline202Response.md +20 -0
- data/docs/GetCampaignAnalytics202Response.md +22 -0
- data/docs/ListAds202Response.md +22 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +9 -9
- data/lib/zernio-sdk/api/ad_insights_api.rb +6 -6
- data/lib/zernio-sdk/models/{get_ad_analytics200_response.rb → ad_analytics_response.rb} +15 -15
- data/lib/zernio-sdk/models/{get_ad_analytics200_response_ad.rb → ad_analytics_response_ad.rb} +4 -47
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +73 -1
- data/lib/zernio-sdk/models/ad_engagement_counts.rb +1 -1
- data/lib/zernio-sdk/models/ad_metrics.rb +73 -1
- data/lib/zernio-sdk/models/{get_ad_tree200_response.rb → ad_tree_response.rb} +17 -17
- data/lib/zernio-sdk/models/{list_ads200_response.rb → ads_list_response.rb} +17 -17
- data/lib/zernio-sdk/models/{get_ads_timeline200_response.rb → ads_timeline_response.rb} +17 -17
- data/lib/zernio-sdk/models/{get_ads_timeline200_response_rows_inner.rb → ads_timeline_response_rows_inner.rb} +3 -3
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response.rb → campaign_analytics_response.rb} +15 -15
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics.rb → campaign_analytics_response_analytics.rb} +4 -4
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics_daily_inner.rb → campaign_analytics_response_analytics_daily_inner.rb} +76 -4
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_campaign.rb → campaign_analytics_response_campaign.rb} +3 -3
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +213 -0
- data/lib/zernio-sdk/models/get_ad_tree202_response.rb +215 -0
- data/lib/zernio-sdk/models/get_ads_timeline202_response.rb +206 -0
- data/lib/zernio-sdk/models/get_campaign_analytics202_response.rb +213 -0
- data/lib/zernio-sdk/models/list_ads202_response.rb +215 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +15 -10
- data/openapi.yaml +205 -123
- data/spec/api/ad_campaigns_api_spec.rb +3 -3
- data/spec/api/ad_insights_api_spec.rb +2 -2
- data/spec/models/{get_campaign_analytics200_response_campaign_spec.rb → ad_analytics_response_ad_spec.rb} +6 -6
- data/spec/models/{get_ad_analytics200_response_spec.rb → ad_analytics_response_spec.rb} +8 -8
- data/spec/models/ad_daily_metrics_spec.rb +42 -0
- data/spec/models/ad_metrics_spec.rb +42 -0
- data/spec/models/{get_ad_tree200_response_spec.rb → ad_tree_response_spec.rb} +8 -8
- data/spec/models/{list_ads200_response_spec.rb → ads_list_response_spec.rb} +8 -8
- data/spec/models/{get_ads_timeline200_response_rows_inner_spec.rb → ads_timeline_response_rows_inner_spec.rb} +6 -6
- data/spec/models/{get_ads_timeline200_response_spec.rb → ads_timeline_response_spec.rb} +8 -8
- data/spec/models/{get_campaign_analytics200_response_analytics_daily_inner_spec.rb → campaign_analytics_response_analytics_daily_inner_spec.rb} +48 -6
- data/spec/models/{get_campaign_analytics200_response_analytics_spec.rb → campaign_analytics_response_analytics_spec.rb} +6 -6
- data/spec/models/{get_ad_analytics200_response_ad_spec.rb → campaign_analytics_response_campaign_spec.rb} +6 -16
- data/spec/models/{get_campaign_analytics200_response_spec.rb → campaign_analytics_response_spec.rb} +8 -8
- data/spec/models/get_ad_analytics202_response_spec.rb +52 -0
- data/spec/models/get_ad_tree202_response_spec.rb +52 -0
- data/spec/models/get_ads_timeline202_response_spec.rb +46 -0
- data/spec/models/get_campaign_analytics202_response_spec.rb +52 -0
- data/spec/models/list_ads202_response_spec.rb +52 -0
- data/zernio-sdk-0.0.716.gem +0 -0
- metadata +1654 -1634
- data/docs/GetAdAnalytics200Response.md +0 -22
- data/docs/GetAdTree200Response.md +0 -22
- data/docs/GetAdsTimeline200Response.md +0 -20
- data/docs/GetCampaignAnalytics200Response.md +0 -22
- data/docs/ListAds200Response.md +0 -22
- data/zernio-sdk-0.0.714.gem +0 -0
data/openapi.yaml
CHANGED
|
@@ -519,6 +519,10 @@ components:
|
|
|
519
519
|
Optional client-generated unique key (e.g. a UUID) that makes retries
|
|
520
520
|
safe. Same key + same body replays the original response; same key +
|
|
521
521
|
different body → 422; key still processing → 409.
|
|
522
|
+
headers:
|
|
523
|
+
BackfillRetryAfter:
|
|
524
|
+
description: Recommended delay before retrying, in seconds.
|
|
525
|
+
schema: { type: integer, example: 60 }
|
|
522
526
|
responses:
|
|
523
527
|
IdempotencyKeyInFlight:
|
|
524
528
|
description: Same Idempotency-Key still processing; retry after a short backoff
|
|
@@ -6866,6 +6870,124 @@ components:
|
|
|
6866
6870
|
properties:
|
|
6867
6871
|
user:
|
|
6868
6872
|
$ref: '#/components/schemas/User'
|
|
6873
|
+
AdsListResponse:
|
|
6874
|
+
type: object
|
|
6875
|
+
properties:
|
|
6876
|
+
ads:
|
|
6877
|
+
type: array
|
|
6878
|
+
items: { $ref: '#/components/schemas/Ad' }
|
|
6879
|
+
pagination: { $ref: '#/components/schemas/Pagination' }
|
|
6880
|
+
backfillPending:
|
|
6881
|
+
type: boolean
|
|
6882
|
+
description: Present and true while historical data is being backfilled.
|
|
6883
|
+
AdTreeResponse:
|
|
6884
|
+
type: object
|
|
6885
|
+
properties:
|
|
6886
|
+
campaigns:
|
|
6887
|
+
type: array
|
|
6888
|
+
items: { $ref: '#/components/schemas/AdTreeCampaign' }
|
|
6889
|
+
pagination: { $ref: '#/components/schemas/Pagination' }
|
|
6890
|
+
backfillPending:
|
|
6891
|
+
type: boolean
|
|
6892
|
+
description: Present and true while historical data is being backfilled.
|
|
6893
|
+
AdsTimelineResponse:
|
|
6894
|
+
type: object
|
|
6895
|
+
properties:
|
|
6896
|
+
backfillPending:
|
|
6897
|
+
type: boolean
|
|
6898
|
+
description: Present and true while historical data is being backfilled.
|
|
6899
|
+
rows:
|
|
6900
|
+
type: array
|
|
6901
|
+
items:
|
|
6902
|
+
type: object
|
|
6903
|
+
properties:
|
|
6904
|
+
date: { type: string, format: date }
|
|
6905
|
+
spend: { type: number, description: "Native currency units (matches /ads/tree convention)." }
|
|
6906
|
+
impressions: { type: integer }
|
|
6907
|
+
reach: { type: integer, description: "Reach summed across the account's ads for this single day. A person seen by two ads the same day counts twice, and reach is de-duplicated per day only: do NOT sum it across days (people reached on multiple days would be double-counted)." }
|
|
6908
|
+
clicks: { type: integer }
|
|
6909
|
+
engagement: { type: integer }
|
|
6910
|
+
ctr: { type: number, description: "Click-through rate as a percentage (0–100)." }
|
|
6911
|
+
cpc: { type: number, description: "Cost per click in native currency." }
|
|
6912
|
+
cpm: { type: number, description: "Cost per 1000 impressions in native currency." }
|
|
6913
|
+
conversions: { type: number, description: "Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07)." }
|
|
6914
|
+
costPerConversion: { type: number }
|
|
6915
|
+
actions:
|
|
6916
|
+
type: object
|
|
6917
|
+
additionalProperties: { type: number }
|
|
6918
|
+
description: "Per-action-type counts merged across all ads on this day. Keys are platform-native action types."
|
|
6919
|
+
actionValues:
|
|
6920
|
+
type: object
|
|
6921
|
+
additionalProperties: { type: number }
|
|
6922
|
+
description: "Monetary mirror of `actions` in native currency."
|
|
6923
|
+
purchaseValue: { type: number, description: "Sum of purchase-type action values on this day, native currency." }
|
|
6924
|
+
roas: { type: number, description: "Derived purchaseValue / spend." }
|
|
6925
|
+
CampaignAnalyticsResponse:
|
|
6926
|
+
type: object
|
|
6927
|
+
properties:
|
|
6928
|
+
backfillPending:
|
|
6929
|
+
type: boolean
|
|
6930
|
+
description: Present and true while historical data is being backfilled.
|
|
6931
|
+
campaign:
|
|
6932
|
+
type: object
|
|
6933
|
+
properties:
|
|
6934
|
+
id: { type: string }
|
|
6935
|
+
name: { type: [string, "null"] }
|
|
6936
|
+
platform: { type: string }
|
|
6937
|
+
status: { type: [string, "null"], description: "Effective campaign status (ACTIVE when any child ad is active)." }
|
|
6938
|
+
currency:
|
|
6939
|
+
type: [string, "null"]
|
|
6940
|
+
description: "ISO 4217 code of the ad account (e.g. USD, THB). All money values in `summary` and `daily` are in this currency."
|
|
6941
|
+
analytics:
|
|
6942
|
+
type: object
|
|
6943
|
+
properties:
|
|
6944
|
+
summary: { $ref: '#/components/schemas/AdMetrics' }
|
|
6945
|
+
daily:
|
|
6946
|
+
type: array
|
|
6947
|
+
items:
|
|
6948
|
+
allOf:
|
|
6949
|
+
- { $ref: '#/components/schemas/AdMetrics' }
|
|
6950
|
+
- type: object
|
|
6951
|
+
properties:
|
|
6952
|
+
date: { type: string, format: date }
|
|
6953
|
+
breakdowns:
|
|
6954
|
+
type: object
|
|
6955
|
+
additionalProperties:
|
|
6956
|
+
type: array
|
|
6957
|
+
items: { type: object }
|
|
6958
|
+
AdAnalyticsResponse:
|
|
6959
|
+
type: object
|
|
6960
|
+
properties:
|
|
6961
|
+
backfillPending:
|
|
6962
|
+
type: boolean
|
|
6963
|
+
description: Present and true while historical data is being backfilled.
|
|
6964
|
+
ad:
|
|
6965
|
+
type: object
|
|
6966
|
+
properties:
|
|
6967
|
+
id: { type: string }
|
|
6968
|
+
name: { type: string }
|
|
6969
|
+
platform: { type: string }
|
|
6970
|
+
status: { type: string }
|
|
6971
|
+
currency:
|
|
6972
|
+
type: [string, "null"]
|
|
6973
|
+
description: "ISO 4217 code of the ad account that owns this ad (e.g. USD, THB, INR). All money values in `summary` and `daily` are in this currency. Null only on legacy ads synced before currency was persisted."
|
|
6974
|
+
analytics:
|
|
6975
|
+
type: object
|
|
6976
|
+
properties:
|
|
6977
|
+
summary: { $ref: '#/components/schemas/AdMetrics' }
|
|
6978
|
+
daily:
|
|
6979
|
+
type: array
|
|
6980
|
+
items:
|
|
6981
|
+
allOf:
|
|
6982
|
+
- { $ref: '#/components/schemas/AdMetrics' }
|
|
6983
|
+
- type: object
|
|
6984
|
+
properties:
|
|
6985
|
+
date: { type: string, format: date }
|
|
6986
|
+
breakdowns:
|
|
6987
|
+
type: object
|
|
6988
|
+
additionalProperties:
|
|
6989
|
+
type: array
|
|
6990
|
+
items: { type: object }
|
|
6869
6991
|
AdMetrics:
|
|
6870
6992
|
type: object
|
|
6871
6993
|
properties:
|
|
@@ -6908,6 +7030,20 @@ components:
|
|
|
6908
7030
|
roas:
|
|
6909
7031
|
type: number
|
|
6910
7032
|
description: "Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level."
|
|
7033
|
+
costPerAction:
|
|
7034
|
+
type: object
|
|
7035
|
+
additionalProperties:
|
|
7036
|
+
type: number
|
|
7037
|
+
description: "Derived `spend / actions[type]` for every action type with a non-zero count, in ad-account native currency. Same keys as `actions`. Rounded to 4 decimals because cheap actions cost well under a cent. Recomputed from summed spend + counts at every rollup level. Empty object when spend is 0 or no actions are reported."
|
|
7038
|
+
example:
|
|
7039
|
+
link_click: 0.1052
|
|
7040
|
+
offsite_conversion.fb_pixel_purchase: 4.0114
|
|
7041
|
+
outboundClicks: { type: integer, description: "Clicks leading off Meta's surfaces to the advertiser's destination. Meta-only; other platforms report 0." }
|
|
7042
|
+
outboundClicksCtr: { type: number, description: "Derived `outboundClicks / impressions * 100`, recomputed from sums at every rollup level." }
|
|
7043
|
+
inlineLinkClicks: { type: integer, description: "In-session link clicks. Differs from the attributed `link_click` count in `actions`/`engagementBreakdown.linkClicks`, which uses the attribution window. Meta-only." }
|
|
7044
|
+
inlineLinkClickCtr: { type: number, description: "Derived `inlineLinkClicks / impressions * 100`, recomputed from sums at every rollup level." }
|
|
7045
|
+
uniqueClicks: { type: integer, description: "People who clicked at least once. NOT additive: summed across days/children it overcounts people who clicked on multiple days or ads, so treat rollups as an upper bound (same caveat as `reach`). Meta-only." }
|
|
7046
|
+
uniqueCtr: { type: number, description: "Derived `uniqueClicks / impressions * 100` (NOT Meta's reach-based unique_ctr). Inherits the non-additivity caveat of `uniqueClicks`." }
|
|
6911
7047
|
videoPlayActions:
|
|
6912
7048
|
type: integer
|
|
6913
7049
|
description: "Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`."
|
|
@@ -6982,7 +7118,7 @@ components:
|
|
|
6982
7118
|
saves: { type: integer, description: "Saves of the ad's post (`onsite_conversion.post_save`)." }
|
|
6983
7119
|
pageLikes: { type: integer, description: "New Page likes attributed to the ad (`like`)." }
|
|
6984
7120
|
videoViews: { type: integer, description: "3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`." }
|
|
6985
|
-
linkClicks: { type: integer, description: "Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session
|
|
7121
|
+
linkClicks: { type: integer, description: "Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session count in the sibling `inlineLinkClicks` field." }
|
|
6986
7122
|
AdDailyMetrics:
|
|
6987
7123
|
description: |
|
|
6988
7124
|
One day of metrics. Same fields as `AdMetrics` plus the `date` they
|
|
@@ -36954,18 +37090,21 @@ paths:
|
|
|
36954
37090
|
description: Paginated ads
|
|
36955
37091
|
content:
|
|
36956
37092
|
application/json:
|
|
36957
|
-
schema:
|
|
36958
|
-
type: object
|
|
36959
|
-
properties:
|
|
36960
|
-
ads:
|
|
36961
|
-
type: array
|
|
36962
|
-
items: { $ref: '#/components/schemas/Ad' }
|
|
36963
|
-
backfillPending:
|
|
36964
|
-
type: boolean
|
|
36965
|
-
description: "Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested."
|
|
36966
|
-
pagination: { $ref: '#/components/schemas/Pagination' }
|
|
37093
|
+
schema: { $ref: '#/components/schemas/AdsListResponse' }
|
|
36967
37094
|
'202':
|
|
36968
|
-
description:
|
|
37095
|
+
description: Historical data is incomplete and backfill remains pending.
|
|
37096
|
+
headers:
|
|
37097
|
+
Retry-After:
|
|
37098
|
+
$ref: '#/components/headers/BackfillRetryAfter'
|
|
37099
|
+
content:
|
|
37100
|
+
application/json:
|
|
37101
|
+
schema:
|
|
37102
|
+
allOf:
|
|
37103
|
+
- { $ref: '#/components/schemas/AdsListResponse' }
|
|
37104
|
+
- type: object
|
|
37105
|
+
required: [backfillPending]
|
|
37106
|
+
properties:
|
|
37107
|
+
backfillPending: { type: boolean, const: true }
|
|
36969
37108
|
'400': { $ref: '#/components/responses/BadRequest' }
|
|
36970
37109
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
36971
37110
|
'403':
|
|
@@ -37939,18 +38078,21 @@ paths:
|
|
|
37939
38078
|
description: Nested campaign tree with pagination
|
|
37940
38079
|
content:
|
|
37941
38080
|
application/json:
|
|
37942
|
-
schema:
|
|
37943
|
-
type: object
|
|
37944
|
-
properties:
|
|
37945
|
-
campaigns:
|
|
37946
|
-
type: array
|
|
37947
|
-
items: { $ref: '#/components/schemas/AdTreeCampaign' }
|
|
37948
|
-
backfillPending:
|
|
37949
|
-
type: boolean
|
|
37950
|
-
description: "Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested."
|
|
37951
|
-
pagination: { $ref: '#/components/schemas/Pagination' }
|
|
38081
|
+
schema: { $ref: '#/components/schemas/AdTreeResponse' }
|
|
37952
38082
|
'202':
|
|
37953
|
-
description:
|
|
38083
|
+
description: Historical data is incomplete and backfill remains pending.
|
|
38084
|
+
headers:
|
|
38085
|
+
Retry-After:
|
|
38086
|
+
$ref: '#/components/headers/BackfillRetryAfter'
|
|
38087
|
+
content:
|
|
38088
|
+
application/json:
|
|
38089
|
+
schema:
|
|
38090
|
+
allOf:
|
|
38091
|
+
- { $ref: '#/components/schemas/AdTreeResponse' }
|
|
38092
|
+
- type: object
|
|
38093
|
+
required: [backfillPending]
|
|
38094
|
+
properties:
|
|
38095
|
+
backfillPending: { type: boolean, const: true }
|
|
37954
38096
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
37955
38097
|
'403':
|
|
37956
38098
|
description: Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.
|
|
@@ -37989,40 +38131,21 @@ paths:
|
|
|
37989
38131
|
description: Daily time series of aggregate metrics. Empty `rows` means the account has no ad activity in the range.
|
|
37990
38132
|
content:
|
|
37991
38133
|
application/json:
|
|
37992
|
-
schema:
|
|
37993
|
-
type: object
|
|
37994
|
-
properties:
|
|
37995
|
-
rows:
|
|
37996
|
-
type: array
|
|
37997
|
-
items:
|
|
37998
|
-
type: object
|
|
37999
|
-
properties:
|
|
38000
|
-
date: { type: string, format: date }
|
|
38001
|
-
spend: { type: number, description: "Native currency units (matches /ads/tree convention)." }
|
|
38002
|
-
impressions: { type: integer }
|
|
38003
|
-
reach: { type: integer, description: "Reach summed across the account's ads for this single day. A person seen by two ads the same day counts twice, and reach is de-duplicated per day only: do NOT sum it across days (people reached on multiple days would be double-counted)." }
|
|
38004
|
-
clicks: { type: integer }
|
|
38005
|
-
engagement: { type: integer }
|
|
38006
|
-
ctr: { type: number, description: "Click-through rate as a percentage (0–100)." }
|
|
38007
|
-
cpc: { type: number, description: "Cost per click in native currency." }
|
|
38008
|
-
cpm: { type: number, description: "Cost per 1000 impressions in native currency." }
|
|
38009
|
-
conversions: { type: number, description: "Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07)." }
|
|
38010
|
-
costPerConversion: { type: number }
|
|
38011
|
-
actions:
|
|
38012
|
-
type: object
|
|
38013
|
-
additionalProperties: { type: number }
|
|
38014
|
-
description: "Per-action-type counts merged across all ads on this day. Keys are platform-native action types."
|
|
38015
|
-
actionValues:
|
|
38016
|
-
type: object
|
|
38017
|
-
additionalProperties: { type: number }
|
|
38018
|
-
description: "Monetary mirror of `actions` in native currency."
|
|
38019
|
-
purchaseValue: { type: number, description: "Sum of purchase-type action values on this day, native currency." }
|
|
38020
|
-
roas: { type: number, description: "Derived purchaseValue / spend." }
|
|
38021
|
-
backfillPending:
|
|
38022
|
-
type: boolean
|
|
38023
|
-
description: "Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested."
|
|
38134
|
+
schema: { $ref: '#/components/schemas/AdsTimelineResponse' }
|
|
38024
38135
|
'202':
|
|
38025
|
-
description:
|
|
38136
|
+
description: Historical data is incomplete and backfill remains pending.
|
|
38137
|
+
headers:
|
|
38138
|
+
Retry-After:
|
|
38139
|
+
$ref: '#/components/headers/BackfillRetryAfter'
|
|
38140
|
+
content:
|
|
38141
|
+
application/json:
|
|
38142
|
+
schema:
|
|
38143
|
+
allOf:
|
|
38144
|
+
- { $ref: '#/components/schemas/AdsTimelineResponse' }
|
|
38145
|
+
- type: object
|
|
38146
|
+
required: [backfillPending]
|
|
38147
|
+
properties:
|
|
38148
|
+
backfillPending: { type: boolean, const: true }
|
|
38026
38149
|
'400': { $ref: '#/components/responses/BadRequest' }
|
|
38027
38150
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
38028
38151
|
'403':
|
|
@@ -38278,43 +38401,23 @@ paths:
|
|
|
38278
38401
|
responses:
|
|
38279
38402
|
'200':
|
|
38280
38403
|
description: Campaign analytics
|
|
38404
|
+
content:
|
|
38405
|
+
application/json:
|
|
38406
|
+
schema: { $ref: '#/components/schemas/CampaignAnalyticsResponse' }
|
|
38407
|
+
'202':
|
|
38408
|
+
description: Historical data is incomplete and backfill remains pending.
|
|
38409
|
+
headers:
|
|
38410
|
+
Retry-After:
|
|
38411
|
+
$ref: '#/components/headers/BackfillRetryAfter'
|
|
38281
38412
|
content:
|
|
38282
38413
|
application/json:
|
|
38283
38414
|
schema:
|
|
38284
|
-
|
|
38285
|
-
|
|
38286
|
-
|
|
38287
|
-
|
|
38288
|
-
properties:
|
|
38289
|
-
id: { type: string }
|
|
38290
|
-
name: { type: [string, "null"] }
|
|
38291
|
-
platform: { type: string }
|
|
38292
|
-
status: { type: [string, "null"], description: "Effective campaign status (ACTIVE when any child ad is active)." }
|
|
38293
|
-
currency:
|
|
38294
|
-
type: [string, "null"]
|
|
38295
|
-
description: "ISO 4217 code of the ad account (e.g. USD, THB). All money values in `summary` and `daily` are in this currency."
|
|
38296
|
-
backfillPending:
|
|
38297
|
-
type: boolean
|
|
38298
|
-
description: "Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested."
|
|
38299
|
-
analytics:
|
|
38300
|
-
type: object
|
|
38415
|
+
allOf:
|
|
38416
|
+
- { $ref: '#/components/schemas/CampaignAnalyticsResponse' }
|
|
38417
|
+
- type: object
|
|
38418
|
+
required: [backfillPending]
|
|
38301
38419
|
properties:
|
|
38302
|
-
|
|
38303
|
-
daily:
|
|
38304
|
-
type: array
|
|
38305
|
-
items:
|
|
38306
|
-
allOf:
|
|
38307
|
-
- { $ref: '#/components/schemas/AdMetrics' }
|
|
38308
|
-
- type: object
|
|
38309
|
-
properties:
|
|
38310
|
-
date: { type: string, format: date }
|
|
38311
|
-
breakdowns:
|
|
38312
|
-
type: object
|
|
38313
|
-
additionalProperties:
|
|
38314
|
-
type: array
|
|
38315
|
-
items: { type: object }
|
|
38316
|
-
'202':
|
|
38317
|
-
description: "Part of the requested date range predates the ingested history; a background backfill job has been queued. The body has the same shape as the 200 response, carries the currently-available data, and includes `backfillPending: true`. A `Retry-After` header carries the recommended poll interval in seconds. Allow the job a short time to run (typically 1-3 minutes) and submit the request again; once ingestion completes the same request returns 200 with the full range."
|
|
38420
|
+
backfillPending: { type: boolean, const: true }
|
|
38318
38421
|
'400':
|
|
38319
38422
|
description: "Invalid parameter (e.g. an unknown `breakdowns` dimension). The message lists the offending value(s) and the supported set."
|
|
38320
38423
|
content:
|
|
@@ -38730,44 +38833,23 @@ paths:
|
|
|
38730
38833
|
responses:
|
|
38731
38834
|
'200':
|
|
38732
38835
|
description: Ad analytics
|
|
38836
|
+
content:
|
|
38837
|
+
application/json:
|
|
38838
|
+
schema: { $ref: '#/components/schemas/AdAnalyticsResponse' }
|
|
38839
|
+
'202':
|
|
38840
|
+
description: Historical data is incomplete and backfill remains pending.
|
|
38841
|
+
headers:
|
|
38842
|
+
Retry-After:
|
|
38843
|
+
$ref: '#/components/headers/BackfillRetryAfter'
|
|
38733
38844
|
content:
|
|
38734
38845
|
application/json:
|
|
38735
38846
|
schema:
|
|
38736
|
-
|
|
38737
|
-
|
|
38738
|
-
|
|
38739
|
-
|
|
38740
|
-
properties:
|
|
38741
|
-
id: { type: string }
|
|
38742
|
-
name: { type: string }
|
|
38743
|
-
platform: { type: string }
|
|
38744
|
-
trigger: { type: string, enum: [comment, story_reply] }
|
|
38745
|
-
status: { type: string }
|
|
38746
|
-
currency:
|
|
38747
|
-
type: [string, "null"]
|
|
38748
|
-
description: "ISO 4217 code of the ad account that owns this ad (e.g. USD, THB, INR). All money values in `summary` and `daily` are in this currency. Null only on legacy ads synced before currency was persisted."
|
|
38749
|
-
backfillPending:
|
|
38750
|
-
type: boolean
|
|
38751
|
-
description: "Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested."
|
|
38752
|
-
analytics:
|
|
38753
|
-
type: object
|
|
38847
|
+
allOf:
|
|
38848
|
+
- { $ref: '#/components/schemas/AdAnalyticsResponse' }
|
|
38849
|
+
- type: object
|
|
38850
|
+
required: [backfillPending]
|
|
38754
38851
|
properties:
|
|
38755
|
-
|
|
38756
|
-
daily:
|
|
38757
|
-
type: array
|
|
38758
|
-
items:
|
|
38759
|
-
allOf:
|
|
38760
|
-
- { $ref: '#/components/schemas/AdMetrics' }
|
|
38761
|
-
- type: object
|
|
38762
|
-
properties:
|
|
38763
|
-
date: { type: string, format: date }
|
|
38764
|
-
breakdowns:
|
|
38765
|
-
type: object
|
|
38766
|
-
additionalProperties:
|
|
38767
|
-
type: array
|
|
38768
|
-
items: { type: object }
|
|
38769
|
-
'202':
|
|
38770
|
-
description: "Part of the requested date range predates the ingested history; a background backfill job has been queued. The body has the same shape as the 200 response, carries the currently-available data, and includes `backfillPending: true`. A `Retry-After` header carries the recommended poll interval in seconds. Allow the job a short time to run (typically 1-3 minutes) and submit the request again; once ingestion completes the same request returns 200 with the full range."
|
|
38852
|
+
backfillPending: { type: boolean, const: true }
|
|
38771
38853
|
'400':
|
|
38772
38854
|
description: "Invalid parameter (e.g. an unknown `breakdowns` dimension). The message lists the offending value(s) and the supported set."
|
|
38773
38855
|
content:
|
|
@@ -194,7 +194,7 @@ describe 'AdCampaignsApi' do
|
|
|
194
194
|
# @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end.
|
|
195
195
|
# @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
|
|
196
196
|
# @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset.
|
|
197
|
-
# @return [
|
|
197
|
+
# @return [AdTreeResponse]
|
|
198
198
|
describe 'get_ad_tree test' do
|
|
199
199
|
it 'should work' do
|
|
200
200
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -210,7 +210,7 @@ describe 'AdCampaignsApi' do
|
|
|
210
210
|
# @option opts [Date] :from_date Inclusive start of metrics range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
211
211
|
# @option opts [Date] :to_date Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
212
212
|
# @option opts [String] :platform Restrict to one platform.
|
|
213
|
-
# @return [
|
|
213
|
+
# @return [AdsTimelineResponse]
|
|
214
214
|
describe 'get_ads_timeline test' do
|
|
215
215
|
it 'should work' do
|
|
216
216
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -281,7 +281,7 @@ describe 'AdCampaignsApi' do
|
|
|
281
281
|
# @option opts [String] :effective_instagram_media_id Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
|
|
282
282
|
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
283
283
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
284
|
-
# @return [
|
|
284
|
+
# @return [AdsListResponse]
|
|
285
285
|
describe 'list_ads test' do
|
|
286
286
|
it 'should work' do
|
|
287
287
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -76,7 +76,7 @@ describe 'AdInsightsApi' do
|
|
|
76
76
|
# @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
77
77
|
# @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
78
78
|
# @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region. **TikTok**: gender, age, country_code, platform, ac, language. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot `value` plus a resolved `name`. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
|
|
79
|
-
# @return [
|
|
79
|
+
# @return [AdAnalyticsResponse]
|
|
80
80
|
describe 'get_ad_analytics test' do
|
|
81
81
|
it 'should work' do
|
|
82
82
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -125,7 +125,7 @@ describe 'AdInsightsApi' do
|
|
|
125
125
|
# @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
126
126
|
# @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
127
127
|
# @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region, platform_position, impression_device, video_asset, image_asset, body_asset, title_asset. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot `value` plus a resolved `name`. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
|
|
128
|
-
# @return [
|
|
128
|
+
# @return [CampaignAnalyticsResponse]
|
|
129
129
|
describe 'get_campaign_analytics test' do
|
|
130
130
|
it 'should work' do
|
|
131
131
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -14,16 +14,16 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zernio::
|
|
17
|
+
# Unit tests for Zernio::AdAnalyticsResponseAd
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zernio::
|
|
21
|
-
#let(:instance) { Zernio::
|
|
20
|
+
describe Zernio::AdAnalyticsResponseAd do
|
|
21
|
+
#let(:instance) { Zernio::AdAnalyticsResponseAd.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of AdAnalyticsResponseAd' do
|
|
24
|
+
it 'should create an instance of AdAnalyticsResponseAd' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::AdAnalyticsResponseAd)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -14,26 +14,26 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zernio::
|
|
17
|
+
# Unit tests for Zernio::AdAnalyticsResponse
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zernio::
|
|
21
|
-
#let(:instance) { Zernio::
|
|
20
|
+
describe Zernio::AdAnalyticsResponse do
|
|
21
|
+
#let(:instance) { Zernio::AdAnalyticsResponse.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of AdAnalyticsResponse' do
|
|
24
|
+
it 'should create an instance of AdAnalyticsResponse' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::AdAnalyticsResponse)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "backfill_pending"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
describe 'test attribute "
|
|
36
|
+
describe 'test attribute "ad"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
39
|
end
|
|
@@ -111,6 +111,48 @@ describe Zernio::AdDailyMetrics do
|
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
describe 'test attribute "cost_per_action"' do
|
|
115
|
+
it 'should work' do
|
|
116
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
describe 'test attribute "outbound_clicks"' do
|
|
121
|
+
it 'should work' do
|
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
describe 'test attribute "outbound_clicks_ctr"' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
describe 'test attribute "inline_link_clicks"' do
|
|
133
|
+
it 'should work' do
|
|
134
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
describe 'test attribute "inline_link_click_ctr"' do
|
|
139
|
+
it 'should work' do
|
|
140
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
describe 'test attribute "unique_clicks"' do
|
|
145
|
+
it 'should work' do
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
describe 'test attribute "unique_ctr"' do
|
|
151
|
+
it 'should work' do
|
|
152
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
114
156
|
describe 'test attribute "video_play_actions"' do
|
|
115
157
|
it 'should work' do
|
|
116
158
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -111,6 +111,48 @@ describe Zernio::AdMetrics do
|
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
describe 'test attribute "cost_per_action"' do
|
|
115
|
+
it 'should work' do
|
|
116
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
describe 'test attribute "outbound_clicks"' do
|
|
121
|
+
it 'should work' do
|
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
describe 'test attribute "outbound_clicks_ctr"' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
describe 'test attribute "inline_link_clicks"' do
|
|
133
|
+
it 'should work' do
|
|
134
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
describe 'test attribute "inline_link_click_ctr"' do
|
|
139
|
+
it 'should work' do
|
|
140
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
describe 'test attribute "unique_clicks"' do
|
|
145
|
+
it 'should work' do
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
describe 'test attribute "unique_ctr"' do
|
|
151
|
+
it 'should work' do
|
|
152
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
114
156
|
describe 'test attribute "video_play_actions"' do
|
|
115
157
|
it 'should work' do
|
|
116
158
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -14,16 +14,16 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zernio::
|
|
17
|
+
# Unit tests for Zernio::AdTreeResponse
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zernio::
|
|
21
|
-
#let(:instance) { Zernio::
|
|
20
|
+
describe Zernio::AdTreeResponse do
|
|
21
|
+
#let(:instance) { Zernio::AdTreeResponse.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of AdTreeResponse' do
|
|
24
|
+
it 'should create an instance of AdTreeResponse' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::AdTreeResponse)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -33,13 +33,13 @@ describe Zernio::GetAdTree200Response do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
describe 'test attribute "
|
|
36
|
+
describe 'test attribute "pagination"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "
|
|
42
|
+
describe 'test attribute "backfill_pending"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
45
|
end
|