late-sdk 0.0.710 → 0.0.712
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/AdDailyMetrics.md +10 -10
- data/docs/AdMetrics.md +10 -10
- data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +10 -10
- data/docs/GetInstagramAudio200Response.md +18 -0
- data/docs/InstagramApi.md +148 -0
- data/docs/InstagramAudioAsset.md +38 -0
- data/docs/InstagramPlatformData.md +3 -1
- data/docs/InstagramPlatformDataAudioConfiguration.md +22 -0
- data/docs/SearchInstagramAudio200Response.md +18 -0
- data/lib/zernio-sdk/api/instagram_api.rb +160 -0
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +10 -10
- data/lib/zernio-sdk/models/ad_metrics.rb +10 -10
- data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +10 -10
- data/lib/zernio-sdk/models/get_instagram_audio200_response.rb +147 -0
- data/lib/zernio-sdk/models/instagram_audio_asset.rb +293 -0
- data/lib/zernio-sdk/models/instagram_platform_data.rb +11 -2
- data/lib/zernio-sdk/models/instagram_platform_data_audio_configuration.rb +242 -0
- data/lib/zernio-sdk/models/search_instagram_audio200_response.rb +149 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +141 -11
- data/spec/api/instagram_api_spec.rb +27 -0
- data/spec/models/get_instagram_audio200_response_spec.rb +36 -0
- data/spec/models/instagram_audio_asset_spec.rb +100 -0
- data/spec/models/instagram_platform_data_audio_configuration_spec.rb +48 -0
- data/spec/models/instagram_platform_data_spec.rb +6 -0
- data/spec/models/search_instagram_audio200_response_spec.rb +36 -0
- data/zernio-sdk-0.0.712.gem +0 -0
- metadata +19 -3
- data/zernio-sdk-0.0.710.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: 2e2dede122bdc22380ddb34f95c88d683fb5293de67a7b1f103d172227d3d0a8
|
|
4
|
+
data.tar.gz: 5d62e5125f5b1e31caee6e2ba5d25eea8102e738ffa2e6a3acbd05f831435ac6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27298a74f36d392ccd5ea40600ab1ddff6d7e61f9fd1c033ae7486b4f0b0e015854fe5bff5972c66b7dbcba5a57f4a532b7068f260d3204dc4e8318c5d4e8388
|
|
7
|
+
data.tar.gz: 35950d25ac955a78cb99a5c4d9c8e6e84ac353043cc01b76740f74b2d73cd1ce86b3982bcc28ca0c4e92c745a4aaf1855a590d1dd880ae995821265321c5a089
|
data/README.md
CHANGED
|
@@ -348,9 +348,11 @@ Class | Method | HTTP request | Description
|
|
|
348
348
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_top_accounts**](docs/InboxAnalyticsApi.md#get_inbox_top_accounts) | **GET** /v1/analytics/inbox/top-accounts | Get top accounts by inbox volume
|
|
349
349
|
*Zernio::InboxAnalyticsApi* | [**get_inbox_volume**](docs/InboxAnalyticsApi.md#get_inbox_volume) | **GET** /v1/analytics/inbox/volume | Get inbox messaging volume
|
|
350
350
|
*Zernio::InboxAnalyticsApi* | [**list_inbox_conversation_analytics**](docs/InboxAnalyticsApi.md#list_inbox_conversation_analytics) | **GET** /v1/analytics/inbox/conversations | List conversation analytics
|
|
351
|
+
*Zernio::InstagramApi* | [**get_instagram_audio**](docs/InstagramApi.md#get_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio/{audioId} | Get Instagram audio metadata
|
|
351
352
|
*Zernio::InstagramApi* | [**get_instagram_publishing_limit**](docs/InstagramApi.md#get_instagram_publishing_limit) | **GET** /v1/accounts/{accountId}/instagram/publishing-limit | Get Instagram publishing limit
|
|
352
353
|
*Zernio::InstagramApi* | [**get_instagram_story_insights**](docs/InstagramApi.md#get_instagram_story_insights) | **GET** /v1/accounts/{accountId}/instagram/stories/{storyId}/insights | Get Instagram story insights
|
|
353
354
|
*Zernio::InstagramApi* | [**list_instagram_stories**](docs/InstagramApi.md#list_instagram_stories) | **GET** /v1/accounts/{accountId}/instagram/stories | List active Instagram stories
|
|
355
|
+
*Zernio::InstagramApi* | [**search_instagram_audio**](docs/InstagramApi.md#search_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio | Search Instagram audio
|
|
354
356
|
*Zernio::InvitesApi* | [**create_invite_token**](docs/InvitesApi.md#create_invite_token) | **POST** /v1/invite/tokens | Create invite token
|
|
355
357
|
*Zernio::LeadGenApi* | [**archive_lead_form**](docs/LeadGenApi.md#archive_lead_form) | **DELETE** /v1/ads/lead-forms/{formId} | Archive a lead form
|
|
356
358
|
*Zernio::LeadGenApi* | [**create_lead_form**](docs/LeadGenApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form
|
|
@@ -1209,6 +1211,7 @@ Class | Method | HTTP request | Description
|
|
|
1209
1211
|
- [Zernio::GetInboxVolume200ResponseTimeseriesInner](docs/GetInboxVolume200ResponseTimeseriesInner.md)
|
|
1210
1212
|
- [Zernio::GetInboxVolume400Response](docs/GetInboxVolume400Response.md)
|
|
1211
1213
|
- [Zernio::GetInstagramAccountInsights404Response](docs/GetInstagramAccountInsights404Response.md)
|
|
1214
|
+
- [Zernio::GetInstagramAudio200Response](docs/GetInstagramAudio200Response.md)
|
|
1212
1215
|
- [Zernio::GetInstagramFollowStatus200Response](docs/GetInstagramFollowStatus200Response.md)
|
|
1213
1216
|
- [Zernio::GetInstagramPublishingLimit200Response](docs/GetInstagramPublishingLimit200Response.md)
|
|
1214
1217
|
- [Zernio::GetInstagramStoryInsights200Response](docs/GetInstagramStoryInsights200Response.md)
|
|
@@ -1399,9 +1402,11 @@ Class | Method | HTTP request | Description
|
|
|
1399
1402
|
- [Zernio::InstagramAccountInsightsResponseMetricsValueBreakdownsInner](docs/InstagramAccountInsightsResponseMetricsValueBreakdownsInner.md)
|
|
1400
1403
|
- [Zernio::InstagramAccountInsightsResponseMetricsValueValuesInner](docs/InstagramAccountInsightsResponseMetricsValueValuesInner.md)
|
|
1401
1404
|
- [Zernio::InstagramAccountInsightsResponseUnavailableMetricsInner](docs/InstagramAccountInsightsResponseUnavailableMetricsInner.md)
|
|
1405
|
+
- [Zernio::InstagramAudioAsset](docs/InstagramAudioAsset.md)
|
|
1402
1406
|
- [Zernio::InstagramDemographicsResponse](docs/InstagramDemographicsResponse.md)
|
|
1403
1407
|
- [Zernio::InstagramDemographicsResponseDemographicsValueInner](docs/InstagramDemographicsResponseDemographicsValueInner.md)
|
|
1404
1408
|
- [Zernio::InstagramPlatformData](docs/InstagramPlatformData.md)
|
|
1409
|
+
- [Zernio::InstagramPlatformDataAudioConfiguration](docs/InstagramPlatformDataAudioConfiguration.md)
|
|
1405
1410
|
- [Zernio::InstagramPlatformDataTrialParams](docs/InstagramPlatformDataTrialParams.md)
|
|
1406
1411
|
- [Zernio::InstagramPlatformDataUserTagsInner](docs/InstagramPlatformDataUserTagsInner.md)
|
|
1407
1412
|
- [Zernio::LikeInboxComment200Response](docs/LikeInboxComment200Response.md)
|
|
@@ -1756,6 +1761,7 @@ Class | Method | HTTP request | Description
|
|
|
1756
1761
|
- [Zernio::SearchInboxConversations200ResponseMeta](docs/SearchInboxConversations200ResponseMeta.md)
|
|
1757
1762
|
- [Zernio::SearchInboxConversations200ResponseMetaAccountsSkippedInner](docs/SearchInboxConversations200ResponseMetaAccountsSkippedInner.md)
|
|
1758
1763
|
- [Zernio::SearchInboxConversations200ResponseMetaFailedAccountsInner](docs/SearchInboxConversations200ResponseMetaFailedAccountsInner.md)
|
|
1764
|
+
- [Zernio::SearchInstagramAudio200Response](docs/SearchInstagramAudio200Response.md)
|
|
1759
1765
|
- [Zernio::SearchReddit200Response](docs/SearchReddit200Response.md)
|
|
1760
1766
|
- [Zernio::SearchTweets200Response](docs/SearchTweets200Response.md)
|
|
1761
1767
|
- [Zernio::SearchTweets200ResponseMeta](docs/SearchTweets200ResponseMeta.md)
|
data/docs/AdDailyMetrics.md
CHANGED
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
| **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
|
|
19
19
|
| **purchase_value** | **Float** | Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only. | [optional] |
|
|
20
20
|
| **roas** | **Float** | 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. | [optional] |
|
|
21
|
-
| **video_play_actions** | **Integer** |
|
|
22
|
-
| **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Meta `video_30_sec_watched_actions`
|
|
23
|
-
| **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Meta `video_thruplay_watched_actions`
|
|
24
|
-
| **video_p25_watched_actions** | **Integer** | Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Meta `video_p25_watched_actions`. | [optional] |
|
|
25
|
-
| **video_p50_watched_actions** | **Integer** | Views reaching 50% of the video's length. Meta `video_p50_watched_actions`. | [optional] |
|
|
26
|
-
| **video_p75_watched_actions** | **Integer** | Views reaching 75% of the video's length. Meta `video_p75_watched_actions`. | [optional] |
|
|
27
|
-
| **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Meta `video_p95_watched_actions`
|
|
28
|
-
| **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Meta `video_p100_watched_actions`. | [optional] |
|
|
29
|
-
| **video_avg_time_watched_actions** | **Float** | Average seconds watched per play
|
|
30
|
-
| **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays. | [optional] |
|
|
21
|
+
| **video_play_actions** | **Integer** | 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`. | [optional] |
|
|
22
|
+
| **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only). | [optional] |
|
|
23
|
+
| **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only). | [optional] |
|
|
24
|
+
| **video_p25_watched_actions** | **Integer** | Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`. | [optional] |
|
|
25
|
+
| **video_p50_watched_actions** | **Integer** | Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`. | [optional] |
|
|
26
|
+
| **video_p75_watched_actions** | **Integer** | Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`. | [optional] |
|
|
27
|
+
| **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only). | [optional] |
|
|
28
|
+
| **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`. | [optional] |
|
|
29
|
+
| **video_avg_time_watched_actions** | **Float** | Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`. | [optional] |
|
|
30
|
+
| **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays (ThruPlay is Meta-only). | [optional] |
|
|
31
31
|
| **funnel** | [**AdFunnelCounts**](AdFunnelCounts.md) | | [optional] |
|
|
32
32
|
| **engagement_breakdown** | [**AdEngagementCounts**](AdEngagementCounts.md) | | [optional] |
|
|
33
33
|
| **last_synced_at** | **Time** | Present on individual ads only, not on campaign aggregations | [optional] |
|
data/docs/AdMetrics.md
CHANGED
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
| **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
|
|
19
19
|
| **purchase_value** | **Float** | Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only. | [optional] |
|
|
20
20
|
| **roas** | **Float** | 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. | [optional] |
|
|
21
|
-
| **video_play_actions** | **Integer** |
|
|
22
|
-
| **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Meta `video_30_sec_watched_actions`
|
|
23
|
-
| **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Meta `video_thruplay_watched_actions`
|
|
24
|
-
| **video_p25_watched_actions** | **Integer** | Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Meta `video_p25_watched_actions`. | [optional] |
|
|
25
|
-
| **video_p50_watched_actions** | **Integer** | Views reaching 50% of the video's length. Meta `video_p50_watched_actions`. | [optional] |
|
|
26
|
-
| **video_p75_watched_actions** | **Integer** | Views reaching 75% of the video's length. Meta `video_p75_watched_actions`. | [optional] |
|
|
27
|
-
| **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Meta `video_p95_watched_actions`
|
|
28
|
-
| **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Meta `video_p100_watched_actions`. | [optional] |
|
|
29
|
-
| **video_avg_time_watched_actions** | **Float** | Average seconds watched per play
|
|
30
|
-
| **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays. | [optional] |
|
|
21
|
+
| **video_play_actions** | **Integer** | 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`. | [optional] |
|
|
22
|
+
| **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only). | [optional] |
|
|
23
|
+
| **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only). | [optional] |
|
|
24
|
+
| **video_p25_watched_actions** | **Integer** | Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`. | [optional] |
|
|
25
|
+
| **video_p50_watched_actions** | **Integer** | Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`. | [optional] |
|
|
26
|
+
| **video_p75_watched_actions** | **Integer** | Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`. | [optional] |
|
|
27
|
+
| **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only). | [optional] |
|
|
28
|
+
| **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`. | [optional] |
|
|
29
|
+
| **video_avg_time_watched_actions** | **Float** | Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`. | [optional] |
|
|
30
|
+
| **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays (ThruPlay is Meta-only). | [optional] |
|
|
31
31
|
| **funnel** | [**AdFunnelCounts**](AdFunnelCounts.md) | | [optional] |
|
|
32
32
|
| **engagement_breakdown** | [**AdEngagementCounts**](AdEngagementCounts.md) | | [optional] |
|
|
33
33
|
| **last_synced_at** | **Time** | Present on individual ads only, not on campaign aggregations | [optional] |
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
| **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
|
|
19
19
|
| **purchase_value** | **Float** | Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only. | [optional] |
|
|
20
20
|
| **roas** | **Float** | 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. | [optional] |
|
|
21
|
-
| **video_play_actions** | **Integer** |
|
|
22
|
-
| **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Meta `video_30_sec_watched_actions`
|
|
23
|
-
| **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Meta `video_thruplay_watched_actions`
|
|
24
|
-
| **video_p25_watched_actions** | **Integer** | Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Meta `video_p25_watched_actions`. | [optional] |
|
|
25
|
-
| **video_p50_watched_actions** | **Integer** | Views reaching 50% of the video's length. Meta `video_p50_watched_actions`. | [optional] |
|
|
26
|
-
| **video_p75_watched_actions** | **Integer** | Views reaching 75% of the video's length. Meta `video_p75_watched_actions`. | [optional] |
|
|
27
|
-
| **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Meta `video_p95_watched_actions`
|
|
28
|
-
| **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Meta `video_p100_watched_actions`. | [optional] |
|
|
29
|
-
| **video_avg_time_watched_actions** | **Float** | Average seconds watched per play
|
|
30
|
-
| **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays. | [optional] |
|
|
21
|
+
| **video_play_actions** | **Integer** | 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`. | [optional] |
|
|
22
|
+
| **video30_sec_watched_actions** | **Integer** | Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only). | [optional] |
|
|
23
|
+
| **video_thruplay_watched_actions** | **Integer** | ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only). | [optional] |
|
|
24
|
+
| **video_p25_watched_actions** | **Integer** | Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`. | [optional] |
|
|
25
|
+
| **video_p50_watched_actions** | **Integer** | Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`. | [optional] |
|
|
26
|
+
| **video_p75_watched_actions** | **Integer** | Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`. | [optional] |
|
|
27
|
+
| **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only). | [optional] |
|
|
28
|
+
| **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`. | [optional] |
|
|
29
|
+
| **video_avg_time_watched_actions** | **Float** | Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`. | [optional] |
|
|
30
|
+
| **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays (ThruPlay is Meta-only). | [optional] |
|
|
31
31
|
| **funnel** | [**AdFunnelCounts**](AdFunnelCounts.md) | | [optional] |
|
|
32
32
|
| **engagement_breakdown** | [**AdEngagementCounts**](AdEngagementCounts.md) | | [optional] |
|
|
33
33
|
| **last_synced_at** | **Time** | Present on individual ads only, not on campaign aggregations | [optional] |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::GetInstagramAudio200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio** | [**InstagramAudioAsset**](InstagramAudioAsset.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::GetInstagramAudio200Response.new(
|
|
15
|
+
audio: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/InstagramApi.md
CHANGED
|
@@ -4,9 +4,82 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_instagram_audio**](InstagramApi.md#get_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio/{audioId} | Get Instagram audio metadata |
|
|
7
8
|
| [**get_instagram_publishing_limit**](InstagramApi.md#get_instagram_publishing_limit) | **GET** /v1/accounts/{accountId}/instagram/publishing-limit | Get Instagram publishing limit |
|
|
8
9
|
| [**get_instagram_story_insights**](InstagramApi.md#get_instagram_story_insights) | **GET** /v1/accounts/{accountId}/instagram/stories/{storyId}/insights | Get Instagram story insights |
|
|
9
10
|
| [**list_instagram_stories**](InstagramApi.md#list_instagram_stories) | **GET** /v1/accounts/{accountId}/instagram/stories | List active Instagram stories |
|
|
11
|
+
| [**search_instagram_audio**](InstagramApi.md#search_instagram_audio) | **GET** /v1/accounts/{accountId}/instagram/audio | Search Instagram audio |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## get_instagram_audio
|
|
15
|
+
|
|
16
|
+
> <GetInstagramAudio200Response> get_instagram_audio(account_id, audio_id)
|
|
17
|
+
|
|
18
|
+
Get Instagram audio metadata
|
|
19
|
+
|
|
20
|
+
Fetch one audio asset's metadata by ID. Use it to re-validate a stored `audioId` before a scheduled Reel publishes, or to refresh the preview `downloadUrl` (Meta expires preview URLs after roughly 1.5 days). Same connection requirement as the search endpoint: Facebook-Login Instagram accounts only.
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'zernio-sdk'
|
|
27
|
+
# setup authorization
|
|
28
|
+
Zernio.configure do |config|
|
|
29
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
30
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
api_instance = Zernio::InstagramApi.new
|
|
34
|
+
account_id = 'account_id_example' # String | The ID of the Instagram account
|
|
35
|
+
audio_id = 'audio_id_example' # String | Instagram audio asset ID
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
# Get Instagram audio metadata
|
|
39
|
+
result = api_instance.get_instagram_audio(account_id, audio_id)
|
|
40
|
+
p result
|
|
41
|
+
rescue Zernio::ApiError => e
|
|
42
|
+
puts "Error when calling InstagramApi->get_instagram_audio: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Using the get_instagram_audio_with_http_info variant
|
|
47
|
+
|
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
|
49
|
+
|
|
50
|
+
> <Array(<GetInstagramAudio200Response>, Integer, Hash)> get_instagram_audio_with_http_info(account_id, audio_id)
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
begin
|
|
54
|
+
# Get Instagram audio metadata
|
|
55
|
+
data, status_code, headers = api_instance.get_instagram_audio_with_http_info(account_id, audio_id)
|
|
56
|
+
p status_code # => 2xx
|
|
57
|
+
p headers # => { ... }
|
|
58
|
+
p data # => <GetInstagramAudio200Response>
|
|
59
|
+
rescue Zernio::ApiError => e
|
|
60
|
+
puts "Error when calling InstagramApi->get_instagram_audio_with_http_info: #{e}"
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
| Name | Type | Description | Notes |
|
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
|
68
|
+
| **account_id** | **String** | The ID of the Instagram account | |
|
|
69
|
+
| **audio_id** | **String** | Instagram audio asset ID | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**GetInstagramAudio200Response**](GetInstagramAudio200Response.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
10
83
|
|
|
11
84
|
|
|
12
85
|
## get_instagram_publishing_limit
|
|
@@ -217,3 +290,78 @@ end
|
|
|
217
290
|
- **Content-Type**: Not defined
|
|
218
291
|
- **Accept**: application/json
|
|
219
292
|
|
|
293
|
+
|
|
294
|
+
## search_instagram_audio
|
|
295
|
+
|
|
296
|
+
> <SearchInstagramAudio200Response> search_instagram_audio(account_id, audio_type, opts)
|
|
297
|
+
|
|
298
|
+
Search Instagram audio
|
|
299
|
+
|
|
300
|
+
Search Instagram's audio catalog (licensed music or original sounds), or list what is currently trending by omitting `q`. Returns up to ~30 assets; Meta exposes no pagination on this edge. Pass the returned `audioId` as `platformSpecificData.audioConfiguration.audioId` when creating a Reel to publish it with that track. Requires an Instagram account connected via **Facebook Login**. Meta hosts this catalog on graph.facebook.com only, so accounts connected with classic Instagram Login receive a 400 (`instagram_audio_requires_facebook_login`) and must be reconnected choosing the Facebook option.
|
|
301
|
+
|
|
302
|
+
### Examples
|
|
303
|
+
|
|
304
|
+
```ruby
|
|
305
|
+
require 'time'
|
|
306
|
+
require 'zernio-sdk'
|
|
307
|
+
# setup authorization
|
|
308
|
+
Zernio.configure do |config|
|
|
309
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
310
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
api_instance = Zernio::InstagramApi.new
|
|
314
|
+
account_id = 'account_id_example' # String | The ID of the Instagram account
|
|
315
|
+
audio_type = 'music' # String | Catalog to search: licensed music or original sounds from Reels.
|
|
316
|
+
opts = {
|
|
317
|
+
q: 'q_example' # String | Search keywords. Omit to get the current trending list.
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
begin
|
|
321
|
+
# Search Instagram audio
|
|
322
|
+
result = api_instance.search_instagram_audio(account_id, audio_type, opts)
|
|
323
|
+
p result
|
|
324
|
+
rescue Zernio::ApiError => e
|
|
325
|
+
puts "Error when calling InstagramApi->search_instagram_audio: #{e}"
|
|
326
|
+
end
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
#### Using the search_instagram_audio_with_http_info variant
|
|
330
|
+
|
|
331
|
+
This returns an Array which contains the response data, status code and headers.
|
|
332
|
+
|
|
333
|
+
> <Array(<SearchInstagramAudio200Response>, Integer, Hash)> search_instagram_audio_with_http_info(account_id, audio_type, opts)
|
|
334
|
+
|
|
335
|
+
```ruby
|
|
336
|
+
begin
|
|
337
|
+
# Search Instagram audio
|
|
338
|
+
data, status_code, headers = api_instance.search_instagram_audio_with_http_info(account_id, audio_type, opts)
|
|
339
|
+
p status_code # => 2xx
|
|
340
|
+
p headers # => { ... }
|
|
341
|
+
p data # => <SearchInstagramAudio200Response>
|
|
342
|
+
rescue Zernio::ApiError => e
|
|
343
|
+
puts "Error when calling InstagramApi->search_instagram_audio_with_http_info: #{e}"
|
|
344
|
+
end
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Parameters
|
|
348
|
+
|
|
349
|
+
| Name | Type | Description | Notes |
|
|
350
|
+
| ---- | ---- | ----------- | ----- |
|
|
351
|
+
| **account_id** | **String** | The ID of the Instagram account | |
|
|
352
|
+
| **audio_type** | **String** | Catalog to search: licensed music or original sounds from Reels. | |
|
|
353
|
+
| **q** | **String** | Search keywords. Omit to get the current trending list. | [optional] |
|
|
354
|
+
|
|
355
|
+
### Return type
|
|
356
|
+
|
|
357
|
+
[**SearchInstagramAudio200Response**](SearchInstagramAudio200Response.md)
|
|
358
|
+
|
|
359
|
+
### Authorization
|
|
360
|
+
|
|
361
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
362
|
+
|
|
363
|
+
### HTTP request headers
|
|
364
|
+
|
|
365
|
+
- **Content-Type**: Not defined
|
|
366
|
+
- **Accept**: application/json
|
|
367
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Zernio::InstagramAudioAsset
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio_id** | **String** | Audio asset ID. Pass it as platformSpecificData.audioConfiguration.audioId when creating a Reel. | [optional] |
|
|
8
|
+
| **title** | **String** | Track or sound title. | [optional] |
|
|
9
|
+
| **audio_type** | **String** | Catalog type of the asset. | [optional] |
|
|
10
|
+
| **duration_in_ms** | **Integer** | Asset duration in milliseconds. | [optional] |
|
|
11
|
+
| **display_artist** | **String** | Artist name (licensed music only). | [optional] |
|
|
12
|
+
| **cover_artwork_thumbnail_url** | **String** | Cover artwork thumbnail (licensed music only). | [optional] |
|
|
13
|
+
| **download_url** | **String** | Temporary preview URL. Meta expires it after roughly 1.5 days; re-fetch the asset to refresh it. | [optional] |
|
|
14
|
+
| **ig_username** | **String** | Creator username (original sounds only). | [optional] |
|
|
15
|
+
| **profile_picture_url** | **String** | Creator profile picture (original sounds only). | [optional] |
|
|
16
|
+
| **is_ads_eligible** | **Boolean** | Whether the asset is eligible for ads use. | [optional] |
|
|
17
|
+
| **on_platform_audio_preview_link** | **String** | Instagram web link to preview the audio. | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'zernio-sdk'
|
|
23
|
+
|
|
24
|
+
instance = Zernio::InstagramAudioAsset.new(
|
|
25
|
+
audio_id: 482851939985510,
|
|
26
|
+
title: null,
|
|
27
|
+
audio_type: null,
|
|
28
|
+
duration_in_ms: null,
|
|
29
|
+
display_artist: null,
|
|
30
|
+
cover_artwork_thumbnail_url: null,
|
|
31
|
+
download_url: null,
|
|
32
|
+
ig_username: null,
|
|
33
|
+
profile_picture_url: null,
|
|
34
|
+
is_ads_eligible: null,
|
|
35
|
+
on_platform_audio_preview_link: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
| **first_comment** | **String** | Optional first comment to add after the post is created (not applied to Stories) | [optional] |
|
|
11
11
|
| **trial_params** | [**InstagramPlatformDataTrialParams**](InstagramPlatformDataTrialParams.md) | | [optional] |
|
|
12
12
|
| **user_tags** | [**Array<InstagramPlatformDataUserTagsInner>**](InstagramPlatformDataUserTagsInner.md) | Tag Instagram users by username. The tag shape depends on the media: photos require x/y coordinates, Reels and videos take username only (coordinates are ignored), stories accept optional coordinates. For carousels, use mediaIndex to target specific slides (defaults to 0); video slides take username-only tags. Photo tags without valid coordinates are skipped. | [optional] |
|
|
13
|
-
| **audio_name** | **String** | Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once. | [optional] |
|
|
13
|
+
| **audio_name** | **String** | Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once. Unrelated to audioConfiguration, which attaches a catalog track. | [optional] |
|
|
14
|
+
| **audio_configuration** | [**InstagramPlatformDataAudioConfiguration**](InstagramPlatformDataAudioConfiguration.md) | | [optional] |
|
|
14
15
|
| **thumb_offset** | **Integer** | Millisecond offset from video start for the Reel cover frame. Ignored when instagramThumbnail or reelCover is provided. Defaults to 0. | [optional] |
|
|
15
16
|
| **instagram_thumbnail** | **String** | Custom cover image URL for Instagram Reels (JPG or PNG, publicly accessible). Overrides thumbOffset when provided. Also accepted as reelCover (alias). | [optional] |
|
|
16
17
|
| **reel_cover** | **String** | Alias for instagramThumbnail. If both are provided, instagramThumbnail takes priority. | [optional] |
|
|
@@ -29,6 +30,7 @@ instance = Zernio::InstagramPlatformData.new(
|
|
|
29
30
|
trial_params: null,
|
|
30
31
|
user_tags: null,
|
|
31
32
|
audio_name: My Podcast Intro,
|
|
33
|
+
audio_configuration: null,
|
|
32
34
|
thumb_offset: 5000,
|
|
33
35
|
instagram_thumbnail: null,
|
|
34
36
|
reel_cover: null,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::InstagramPlatformDataAudioConfiguration
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio_id** | **String** | Audio asset ID from the audio search endpoint. | |
|
|
8
|
+
| **audio_volume** | **Integer** | Volume of the attached audio track, 0-100. Defaults to 100. | [optional] |
|
|
9
|
+
| **video_volume** | **Integer** | Volume of the video's own sound, 0-100. Defaults to 100. Set 0 to mute the original video audio. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::InstagramPlatformDataAudioConfiguration.new(
|
|
17
|
+
audio_id: 482851939985510,
|
|
18
|
+
audio_volume: 80,
|
|
19
|
+
video_volume: 100
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::SearchInstagramAudio200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **audio** | [**Array<InstagramAudioAsset>**](InstagramAudioAsset.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::SearchInstagramAudio200Response.new(
|
|
15
|
+
audio: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -19,6 +19,80 @@ module Zernio
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Get Instagram audio metadata
|
|
23
|
+
# Fetch one audio asset's metadata by ID. Use it to re-validate a stored `audioId` before a scheduled Reel publishes, or to refresh the preview `downloadUrl` (Meta expires preview URLs after roughly 1.5 days). Same connection requirement as the search endpoint: Facebook-Login Instagram accounts only.
|
|
24
|
+
# @param account_id [String] The ID of the Instagram account
|
|
25
|
+
# @param audio_id [String] Instagram audio asset ID
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [GetInstagramAudio200Response]
|
|
28
|
+
def get_instagram_audio(account_id, audio_id, opts = {})
|
|
29
|
+
data, _status_code, _headers = get_instagram_audio_with_http_info(account_id, audio_id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get Instagram audio metadata
|
|
34
|
+
# Fetch one audio asset's metadata by ID. Use it to re-validate a stored `audioId` before a scheduled Reel publishes, or to refresh the preview `downloadUrl` (Meta expires preview URLs after roughly 1.5 days). Same connection requirement as the search endpoint: Facebook-Login Instagram accounts only.
|
|
35
|
+
# @param account_id [String] The ID of the Instagram account
|
|
36
|
+
# @param audio_id [String] Instagram audio asset ID
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(GetInstagramAudio200Response, Integer, Hash)>] GetInstagramAudio200Response data, response status code and response headers
|
|
39
|
+
def get_instagram_audio_with_http_info(account_id, audio_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.get_instagram_audio ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'account_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling InstagramApi.get_instagram_audio"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'audio_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && audio_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'audio_id' when calling InstagramApi.get_instagram_audio"
|
|
50
|
+
end
|
|
51
|
+
pattern = Regexp.new(/^\d{1,30}$/)
|
|
52
|
+
if @api_client.config.client_side_validation && audio_id !~ pattern
|
|
53
|
+
fail ArgumentError, "invalid value for 'audio_id' when calling InstagramApi.get_instagram_audio, must conform to the pattern #{pattern}."
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# resource path
|
|
57
|
+
local_var_path = '/v1/accounts/{accountId}/instagram/audio/{audioId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'audioId' + '}', CGI.escape(audio_id.to_s))
|
|
58
|
+
|
|
59
|
+
# query parameters
|
|
60
|
+
query_params = opts[:query_params] || {}
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body]
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'GetInstagramAudio200Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"InstagramApi.get_instagram_audio",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: InstagramApi#get_instagram_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
22
96
|
# Get Instagram publishing limit
|
|
23
97
|
# Returns the account's remaining content-publishing quota for Instagram's rolling 24-hour window, so you can pace publishing and warn before the cap is reached. `quotaUsage` counts containers published since the start of the window. Always compare against the returned `quotaTotal` rather than hardcoding a number: Meta's prose documentation and the live API disagree on the value, and the live value is authoritative.
|
|
24
98
|
# @param account_id [String] The ID of the Instagram account
|
|
@@ -213,5 +287,91 @@ module Zernio
|
|
|
213
287
|
end
|
|
214
288
|
return data, status_code, headers
|
|
215
289
|
end
|
|
290
|
+
|
|
291
|
+
# Search Instagram audio
|
|
292
|
+
# Search Instagram's audio catalog (licensed music or original sounds), or list what is currently trending by omitting `q`. Returns up to ~30 assets; Meta exposes no pagination on this edge. Pass the returned `audioId` as `platformSpecificData.audioConfiguration.audioId` when creating a Reel to publish it with that track. Requires an Instagram account connected via **Facebook Login**. Meta hosts this catalog on graph.facebook.com only, so accounts connected with classic Instagram Login receive a 400 (`instagram_audio_requires_facebook_login`) and must be reconnected choosing the Facebook option.
|
|
293
|
+
# @param account_id [String] The ID of the Instagram account
|
|
294
|
+
# @param audio_type [String] Catalog to search: licensed music or original sounds from Reels.
|
|
295
|
+
# @param [Hash] opts the optional parameters
|
|
296
|
+
# @option opts [String] :q Search keywords. Omit to get the current trending list.
|
|
297
|
+
# @return [SearchInstagramAudio200Response]
|
|
298
|
+
def search_instagram_audio(account_id, audio_type, opts = {})
|
|
299
|
+
data, _status_code, _headers = search_instagram_audio_with_http_info(account_id, audio_type, opts)
|
|
300
|
+
data
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Search Instagram audio
|
|
304
|
+
# Search Instagram's audio catalog (licensed music or original sounds), or list what is currently trending by omitting `q`. Returns up to ~30 assets; Meta exposes no pagination on this edge. Pass the returned `audioId` as `platformSpecificData.audioConfiguration.audioId` when creating a Reel to publish it with that track. Requires an Instagram account connected via **Facebook Login**. Meta hosts this catalog on graph.facebook.com only, so accounts connected with classic Instagram Login receive a 400 (`instagram_audio_requires_facebook_login`) and must be reconnected choosing the Facebook option.
|
|
305
|
+
# @param account_id [String] The ID of the Instagram account
|
|
306
|
+
# @param audio_type [String] Catalog to search: licensed music or original sounds from Reels.
|
|
307
|
+
# @param [Hash] opts the optional parameters
|
|
308
|
+
# @option opts [String] :q Search keywords. Omit to get the current trending list.
|
|
309
|
+
# @return [Array<(SearchInstagramAudio200Response, Integer, Hash)>] SearchInstagramAudio200Response data, response status code and response headers
|
|
310
|
+
def search_instagram_audio_with_http_info(account_id, audio_type, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: InstagramApi.search_instagram_audio ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'account_id' is set
|
|
315
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling InstagramApi.search_instagram_audio"
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'audio_type' is set
|
|
319
|
+
if @api_client.config.client_side_validation && audio_type.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'audio_type' when calling InstagramApi.search_instagram_audio"
|
|
321
|
+
end
|
|
322
|
+
# verify enum value
|
|
323
|
+
allowable_values = ["music", "original_sound"]
|
|
324
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(audio_type)
|
|
325
|
+
fail ArgumentError, "invalid value for \"audio_type\", must be one of #{allowable_values}"
|
|
326
|
+
end
|
|
327
|
+
if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length > 200
|
|
328
|
+
fail ArgumentError, 'invalid value for "opts[:"q"]" when calling InstagramApi.search_instagram_audio, the character length must be smaller than or equal to 200.'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length < 1
|
|
332
|
+
fail ArgumentError, 'invalid value for "opts[:"q"]" when calling InstagramApi.search_instagram_audio, the character length must be greater than or equal to 1.'
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# resource path
|
|
336
|
+
local_var_path = '/v1/accounts/{accountId}/instagram/audio'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
337
|
+
|
|
338
|
+
# query parameters
|
|
339
|
+
query_params = opts[:query_params] || {}
|
|
340
|
+
query_params[:'audioType'] = audio_type
|
|
341
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
342
|
+
|
|
343
|
+
# header parameters
|
|
344
|
+
header_params = opts[:header_params] || {}
|
|
345
|
+
# HTTP header 'Accept' (if needed)
|
|
346
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
347
|
+
|
|
348
|
+
# form parameters
|
|
349
|
+
form_params = opts[:form_params] || {}
|
|
350
|
+
|
|
351
|
+
# http body (model)
|
|
352
|
+
post_body = opts[:debug_body]
|
|
353
|
+
|
|
354
|
+
# return_type
|
|
355
|
+
return_type = opts[:debug_return_type] || 'SearchInstagramAudio200Response'
|
|
356
|
+
|
|
357
|
+
# auth_names
|
|
358
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
359
|
+
|
|
360
|
+
new_options = opts.merge(
|
|
361
|
+
:operation => :"InstagramApi.search_instagram_audio",
|
|
362
|
+
:header_params => header_params,
|
|
363
|
+
:query_params => query_params,
|
|
364
|
+
:form_params => form_params,
|
|
365
|
+
:body => post_body,
|
|
366
|
+
:auth_names => auth_names,
|
|
367
|
+
:return_type => return_type
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
371
|
+
if @api_client.config.debugging
|
|
372
|
+
@api_client.config.logger.debug "API called: InstagramApi#search_instagram_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
373
|
+
end
|
|
374
|
+
return data, status_code, headers
|
|
375
|
+
end
|
|
216
376
|
end
|
|
217
377
|
end
|