late-sdk 0.0.103 → 0.0.105
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 +4 -29
- data/docs/AdCampaignsApi.md +86 -0
- data/docs/AdTreeAdSet.md +30 -0
- data/docs/AdTreeCampaign.md +40 -0
- data/docs/GetAdTree200Response.md +20 -0
- data/lib/late-sdk/api/ad_campaigns_api.rb +105 -0
- data/lib/late-sdk/models/{hashtag_info.rb → ad_tree_ad_set.rb} +59 -18
- data/lib/late-sdk/models/{check_instagram_hashtags200_response_results_inner.rb → ad_tree_campaign.rb} +113 -24
- data/lib/late-sdk/models/{hashtag_check_response.rb → get_ad_tree200_response.rb} +20 -11
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +3 -21
- data/openapi.yaml +80 -481
- data/spec/api/ad_campaigns_api_spec.rb +19 -0
- data/spec/models/{download_you_tube_video200_response_formats_inner_spec.rb → ad_tree_ad_set_spec.rb} +22 -12
- data/spec/models/ad_tree_campaign_spec.rb +110 -0
- data/spec/models/{transcript_segment_spec.rb → get_ad_tree200_response_spec.rb} +8 -14
- data/zernio-sdk-0.0.105.gem +0 -0
- metadata +14 -86
- data/docs/CaptionResponse.md +0 -18
- data/docs/CheckInstagramHashtags200Response.md +0 -22
- data/docs/CheckInstagramHashtags200ResponseResultsInner.md +0 -24
- data/docs/CheckInstagramHashtags200ResponseSummary.md +0 -22
- data/docs/CheckInstagramHashtagsRequest.md +0 -18
- data/docs/DownloadBlueskyMedia200Response.md +0 -26
- data/docs/DownloadFacebookVideo200Response.md +0 -24
- data/docs/DownloadFormat.md +0 -26
- data/docs/DownloadInstagramMedia200Response.md +0 -22
- data/docs/DownloadResponse.md +0 -26
- data/docs/DownloadTikTokVideo200Response.md +0 -24
- data/docs/DownloadTikTokVideo200ResponseFormatsInner.md +0 -22
- data/docs/DownloadYouTubeVideo200Response.md +0 -24
- data/docs/DownloadYouTubeVideo200ResponseFormatsInner.md +0 -28
- data/docs/GetYouTubeTranscript200Response.md +0 -26
- data/docs/GetYouTubeTranscript200ResponseSegmentsInner.md +0 -22
- data/docs/HashtagCheckResponse.md +0 -18
- data/docs/HashtagInfo.md +0 -22
- data/docs/ToolsApi.md +0 -663
- data/docs/TranscriptResponse.md +0 -22
- data/docs/TranscriptSegment.md +0 -22
- data/lib/late-sdk/api/tools_api.rb +0 -649
- data/lib/late-sdk/models/caption_response.rb +0 -147
- data/lib/late-sdk/models/check_instagram_hashtags200_response.rb +0 -167
- data/lib/late-sdk/models/check_instagram_hashtags200_response_summary.rb +0 -165
- data/lib/late-sdk/models/check_instagram_hashtags_request.rb +0 -175
- data/lib/late-sdk/models/download_bluesky_media200_response.rb +0 -183
- data/lib/late-sdk/models/download_facebook_video200_response.rb +0 -174
- data/lib/late-sdk/models/download_format.rb +0 -183
- data/lib/late-sdk/models/download_instagram_media200_response.rb +0 -165
- data/lib/late-sdk/models/download_response.rb +0 -185
- data/lib/late-sdk/models/download_tik_tok_video200_response.rb +0 -176
- data/lib/late-sdk/models/download_tik_tok_video200_response_formats_inner.rb +0 -165
- data/lib/late-sdk/models/download_you_tube_video200_response.rb +0 -176
- data/lib/late-sdk/models/download_you_tube_video200_response_formats_inner.rb +0 -192
- data/lib/late-sdk/models/get_you_tube_transcript200_response.rb +0 -185
- data/lib/late-sdk/models/get_you_tube_transcript200_response_segments_inner.rb +0 -165
- data/lib/late-sdk/models/transcript_response.rb +0 -167
- data/lib/late-sdk/models/transcript_segment.rb +0 -165
- data/spec/api/tools_api_spec.rb +0 -152
- data/spec/models/caption_response_spec.rb +0 -36
- data/spec/models/check_instagram_hashtags200_response_results_inner_spec.rb +0 -58
- data/spec/models/check_instagram_hashtags200_response_spec.rb +0 -48
- data/spec/models/check_instagram_hashtags200_response_summary_spec.rb +0 -48
- data/spec/models/check_instagram_hashtags_request_spec.rb +0 -36
- data/spec/models/download_bluesky_media200_response_spec.rb +0 -60
- data/spec/models/download_facebook_video200_response_spec.rb +0 -54
- data/spec/models/download_format_spec.rb +0 -60
- data/spec/models/download_instagram_media200_response_spec.rb +0 -48
- data/spec/models/download_response_spec.rb +0 -60
- data/spec/models/download_tik_tok_video200_response_formats_inner_spec.rb +0 -48
- data/spec/models/download_tik_tok_video200_response_spec.rb +0 -54
- data/spec/models/download_you_tube_video200_response_spec.rb +0 -54
- data/spec/models/get_you_tube_transcript200_response_segments_inner_spec.rb +0 -48
- data/spec/models/get_you_tube_transcript200_response_spec.rb +0 -60
- data/spec/models/hashtag_check_response_spec.rb +0 -36
- data/spec/models/hashtag_info_spec.rb +0 -52
- data/spec/models/transcript_response_spec.rb +0 -48
- data/zernio-sdk-0.0.103.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: fdec32e6dc047c86b0c656f521e2fdd3a3dc9dd0b58d52004a2d90c22d483281
|
|
4
|
+
data.tar.gz: 593b2f5834ef0089e734958fc457fbffcd1e2c6af31fcd810c5f21a6b7e447d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0860b4d367c9d977e061453e1ae2c6d69a3a6092e5f5e97c44c3cbd72e3e96c57001549e0c9aa0f2c3be6730b6fdd0cf4d9d002850f80638d39a42e9250a1232'
|
|
7
|
+
data.tar.gz: 47da099750b8b0b36bc38cdbdadfd589b03930fef44255f1d94d40eea7df7451eb182b1366e2227dd9321a0c7f39383e953afc9ae42b2a152847befad6c5908e
|
data/README.md
CHANGED
|
@@ -92,6 +92,7 @@ Class | Method | HTTP request | Description
|
|
|
92
92
|
*Late::AdAudiencesApi* | [**delete_ad_audience**](docs/AdAudiencesApi.md#delete_ad_audience) | **DELETE** /v1/ads/audiences/{audienceId} | Delete a custom audience
|
|
93
93
|
*Late::AdAudiencesApi* | [**get_ad_audience**](docs/AdAudiencesApi.md#get_ad_audience) | **GET** /v1/ads/audiences/{audienceId} | Get audience details
|
|
94
94
|
*Late::AdAudiencesApi* | [**list_ad_audiences**](docs/AdAudiencesApi.md#list_ad_audiences) | **GET** /v1/ads/audiences | List custom audiences
|
|
95
|
+
*Late::AdCampaignsApi* | [**get_ad_tree**](docs/AdCampaignsApi.md#get_ad_tree) | **GET** /v1/ads/tree | Get nested campaign/ad-set/ad tree
|
|
95
96
|
*Late::AdCampaignsApi* | [**list_ad_campaigns**](docs/AdCampaignsApi.md#list_ad_campaigns) | **GET** /v1/ads/campaigns | List campaigns with aggregate metrics
|
|
96
97
|
*Late::AdCampaignsApi* | [**update_ad_campaign_status**](docs/AdCampaignsApi.md#update_ad_campaign_status) | **PUT** /v1/ads/campaigns/{campaignId}/status | Pause or resume a campaign
|
|
97
98
|
*Late::AdsApi* | [**boost_post**](docs/AdsApi.md#boost_post) | **POST** /v1/ads/boost | Boost an existing post as a paid ad
|
|
@@ -251,15 +252,6 @@ Class | Method | HTTP request | Description
|
|
|
251
252
|
*Late::SequencesApi* | [**pause_sequence**](docs/SequencesApi.md#pause_sequence) | **POST** /v1/sequences/{sequenceId}/pause | Pause a sequence
|
|
252
253
|
*Late::SequencesApi* | [**unenroll_contact**](docs/SequencesApi.md#unenroll_contact) | **DELETE** /v1/sequences/{sequenceId}/enroll/{contactId} | Unenroll a contact from a sequence
|
|
253
254
|
*Late::SequencesApi* | [**update_sequence**](docs/SequencesApi.md#update_sequence) | **PATCH** /v1/sequences/{sequenceId} | Update a sequence
|
|
254
|
-
*Late::ToolsApi* | [**check_instagram_hashtags**](docs/ToolsApi.md#check_instagram_hashtags) | **POST** /v1/tools/instagram/hashtag-checker | Check IG hashtag bans
|
|
255
|
-
*Late::ToolsApi* | [**download_bluesky_media**](docs/ToolsApi.md#download_bluesky_media) | **GET** /v1/tools/bluesky/download | Download Bluesky media
|
|
256
|
-
*Late::ToolsApi* | [**download_facebook_video**](docs/ToolsApi.md#download_facebook_video) | **GET** /v1/tools/facebook/download | Download Facebook video
|
|
257
|
-
*Late::ToolsApi* | [**download_instagram_media**](docs/ToolsApi.md#download_instagram_media) | **GET** /v1/tools/instagram/download | Download Instagram media
|
|
258
|
-
*Late::ToolsApi* | [**download_linked_in_video**](docs/ToolsApi.md#download_linked_in_video) | **GET** /v1/tools/linkedin/download | Download LinkedIn video
|
|
259
|
-
*Late::ToolsApi* | [**download_tik_tok_video**](docs/ToolsApi.md#download_tik_tok_video) | **GET** /v1/tools/tiktok/download | Download TikTok video
|
|
260
|
-
*Late::ToolsApi* | [**download_twitter_media**](docs/ToolsApi.md#download_twitter_media) | **GET** /v1/tools/twitter/download | Download Twitter/X media
|
|
261
|
-
*Late::ToolsApi* | [**download_you_tube_video**](docs/ToolsApi.md#download_you_tube_video) | **GET** /v1/tools/youtube/download | Download YouTube video
|
|
262
|
-
*Late::ToolsApi* | [**get_you_tube_transcript**](docs/ToolsApi.md#get_you_tube_transcript) | **GET** /v1/tools/youtube/transcript | Get YouTube transcript
|
|
263
255
|
*Late::TwitterEngagementApi* | [**bookmark_post**](docs/TwitterEngagementApi.md#bookmark_post) | **POST** /v1/twitter/bookmark | Bookmark a tweet
|
|
264
256
|
*Late::TwitterEngagementApi* | [**follow_user**](docs/TwitterEngagementApi.md#follow_user) | **POST** /v1/twitter/follow | Follow a user
|
|
265
257
|
*Late::TwitterEngagementApi* | [**remove_bookmark**](docs/TwitterEngagementApi.md#remove_bookmark) | **DELETE** /v1/twitter/bookmark | Remove bookmark
|
|
@@ -340,6 +332,8 @@ Class | Method | HTTP request | Description
|
|
|
340
332
|
- [Late::AdCampaign](docs/AdCampaign.md)
|
|
341
333
|
- [Late::AdMetrics](docs/AdMetrics.md)
|
|
342
334
|
- [Late::AdSchedule](docs/AdSchedule.md)
|
|
335
|
+
- [Late::AdTreeAdSet](docs/AdTreeAdSet.md)
|
|
336
|
+
- [Late::AdTreeCampaign](docs/AdTreeCampaign.md)
|
|
343
337
|
- [Late::AddBroadcastRecipients200Response](docs/AddBroadcastRecipients200Response.md)
|
|
344
338
|
- [Late::AddBroadcastRecipientsRequest](docs/AddBroadcastRecipientsRequest.md)
|
|
345
339
|
- [Late::AddMessageReactionRequest](docs/AddMessageReactionRequest.md)
|
|
@@ -381,11 +375,6 @@ Class | Method | HTTP request | Description
|
|
|
381
375
|
- [Late::CancelBroadcast200ResponseBroadcast](docs/CancelBroadcast200ResponseBroadcast.md)
|
|
382
376
|
- [Late::CancelWhatsAppBroadcastSchedule200Response](docs/CancelWhatsAppBroadcastSchedule200Response.md)
|
|
383
377
|
- [Late::CancelWhatsAppBroadcastSchedule200ResponseBroadcast](docs/CancelWhatsAppBroadcastSchedule200ResponseBroadcast.md)
|
|
384
|
-
- [Late::CaptionResponse](docs/CaptionResponse.md)
|
|
385
|
-
- [Late::CheckInstagramHashtags200Response](docs/CheckInstagramHashtags200Response.md)
|
|
386
|
-
- [Late::CheckInstagramHashtags200ResponseResultsInner](docs/CheckInstagramHashtags200ResponseResultsInner.md)
|
|
387
|
-
- [Late::CheckInstagramHashtags200ResponseSummary](docs/CheckInstagramHashtags200ResponseSummary.md)
|
|
388
|
-
- [Late::CheckInstagramHashtagsRequest](docs/CheckInstagramHashtagsRequest.md)
|
|
389
378
|
- [Late::CompleteTelegramConnect200Response](docs/CompleteTelegramConnect200Response.md)
|
|
390
379
|
- [Late::ConnectBlueskyCredentials200Response](docs/ConnectBlueskyCredentials200Response.md)
|
|
391
380
|
- [Late::ConnectBlueskyCredentialsRequest](docs/ConnectBlueskyCredentialsRequest.md)
|
|
@@ -469,15 +458,6 @@ Class | Method | HTTP request | Description
|
|
|
469
458
|
- [Late::DeleteInboxReviewReplyRequest](docs/DeleteInboxReviewReplyRequest.md)
|
|
470
459
|
- [Late::DeleteQueueSlot200Response](docs/DeleteQueueSlot200Response.md)
|
|
471
460
|
- [Late::DeleteWhatsAppGroupRequest](docs/DeleteWhatsAppGroupRequest.md)
|
|
472
|
-
- [Late::DownloadBlueskyMedia200Response](docs/DownloadBlueskyMedia200Response.md)
|
|
473
|
-
- [Late::DownloadFacebookVideo200Response](docs/DownloadFacebookVideo200Response.md)
|
|
474
|
-
- [Late::DownloadFormat](docs/DownloadFormat.md)
|
|
475
|
-
- [Late::DownloadInstagramMedia200Response](docs/DownloadInstagramMedia200Response.md)
|
|
476
|
-
- [Late::DownloadResponse](docs/DownloadResponse.md)
|
|
477
|
-
- [Late::DownloadTikTokVideo200Response](docs/DownloadTikTokVideo200Response.md)
|
|
478
|
-
- [Late::DownloadTikTokVideo200ResponseFormatsInner](docs/DownloadTikTokVideo200ResponseFormatsInner.md)
|
|
479
|
-
- [Late::DownloadYouTubeVideo200Response](docs/DownloadYouTubeVideo200Response.md)
|
|
480
|
-
- [Late::DownloadYouTubeVideo200ResponseFormatsInner](docs/DownloadYouTubeVideo200ResponseFormatsInner.md)
|
|
481
461
|
- [Late::EditInboxMessage200Response](docs/EditInboxMessage200Response.md)
|
|
482
462
|
- [Late::EditInboxMessage200ResponseData](docs/EditInboxMessage200ResponseData.md)
|
|
483
463
|
- [Late::EditInboxMessageRequest](docs/EditInboxMessageRequest.md)
|
|
@@ -511,6 +491,7 @@ Class | Method | HTTP request | Description
|
|
|
511
491
|
- [Late::GetAdAnalytics200ResponseAnalytics](docs/GetAdAnalytics200ResponseAnalytics.md)
|
|
512
492
|
- [Late::GetAdAnalytics200ResponseAnalyticsDailyInner](docs/GetAdAnalytics200ResponseAnalyticsDailyInner.md)
|
|
513
493
|
- [Late::GetAdAudience200Response](docs/GetAdAudience200Response.md)
|
|
494
|
+
- [Late::GetAdTree200Response](docs/GetAdTree200Response.md)
|
|
514
495
|
- [Late::GetAllAccountsHealth200Response](docs/GetAllAccountsHealth200Response.md)
|
|
515
496
|
- [Late::GetAllAccountsHealth200ResponseAccountsInner](docs/GetAllAccountsHealth200ResponseAccountsInner.md)
|
|
516
497
|
- [Late::GetAllAccountsHealth200ResponseSummary](docs/GetAllAccountsHealth200ResponseSummary.md)
|
|
@@ -667,15 +648,11 @@ Class | Method | HTTP request | Description
|
|
|
667
648
|
- [Late::GetYouTubeDailyViews400Response](docs/GetYouTubeDailyViews400Response.md)
|
|
668
649
|
- [Late::GetYouTubeDailyViews403Response](docs/GetYouTubeDailyViews403Response.md)
|
|
669
650
|
- [Late::GetYouTubeDailyViews500Response](docs/GetYouTubeDailyViews500Response.md)
|
|
670
|
-
- [Late::GetYouTubeTranscript200Response](docs/GetYouTubeTranscript200Response.md)
|
|
671
|
-
- [Late::GetYouTubeTranscript200ResponseSegmentsInner](docs/GetYouTubeTranscript200ResponseSegmentsInner.md)
|
|
672
651
|
- [Late::GetYoutubePlaylists200Response](docs/GetYoutubePlaylists200Response.md)
|
|
673
652
|
- [Late::GetYoutubePlaylists200ResponsePlaylistsInner](docs/GetYoutubePlaylists200ResponsePlaylistsInner.md)
|
|
674
653
|
- [Late::GoogleBusinessPlatformData](docs/GoogleBusinessPlatformData.md)
|
|
675
654
|
- [Late::GoogleBusinessPlatformDataCallToAction](docs/GoogleBusinessPlatformDataCallToAction.md)
|
|
676
655
|
- [Late::HandleOAuthCallbackRequest](docs/HandleOAuthCallbackRequest.md)
|
|
677
|
-
- [Late::HashtagCheckResponse](docs/HashtagCheckResponse.md)
|
|
678
|
-
- [Late::HashtagInfo](docs/HashtagInfo.md)
|
|
679
656
|
- [Late::HideInboxComment200Response](docs/HideInboxComment200Response.md)
|
|
680
657
|
- [Late::HideInboxCommentRequest](docs/HideInboxCommentRequest.md)
|
|
681
658
|
- [Late::ImportWhatsAppContacts200Response](docs/ImportWhatsAppContacts200Response.md)
|
|
@@ -904,8 +881,6 @@ Class | Method | HTTP request | Description
|
|
|
904
881
|
- [Late::TestWebhookRequest](docs/TestWebhookRequest.md)
|
|
905
882
|
- [Late::ThreadsPlatformData](docs/ThreadsPlatformData.md)
|
|
906
883
|
- [Late::TikTokPlatformData](docs/TikTokPlatformData.md)
|
|
907
|
-
- [Late::TranscriptResponse](docs/TranscriptResponse.md)
|
|
908
|
-
- [Late::TranscriptSegment](docs/TranscriptSegment.md)
|
|
909
884
|
- [Late::TwitterPlatformData](docs/TwitterPlatformData.md)
|
|
910
885
|
- [Late::TwitterPlatformDataPoll](docs/TwitterPlatformDataPoll.md)
|
|
911
886
|
- [Late::TwitterPlatformDataThreadItemsInner](docs/TwitterPlatformDataThreadItemsInner.md)
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -4,10 +4,96 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_ad_tree**](AdCampaignsApi.md#get_ad_tree) | **GET** /v1/ads/tree | Get nested campaign/ad-set/ad tree |
|
|
7
8
|
| [**list_ad_campaigns**](AdCampaignsApi.md#list_ad_campaigns) | **GET** /v1/ads/campaigns | List campaigns with aggregate metrics |
|
|
8
9
|
| [**update_ad_campaign_status**](AdCampaignsApi.md#update_ad_campaign_status) | **PUT** /v1/ads/campaigns/{campaignId}/status | Pause or resume a campaign |
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
## get_ad_tree
|
|
13
|
+
|
|
14
|
+
> <GetAdTree200Response> get_ad_tree(opts)
|
|
15
|
+
|
|
16
|
+
Get nested campaign/ad-set/ad tree
|
|
17
|
+
|
|
18
|
+
Returns a nested Campaign > Ad Set > Ad hierarchy with rolled-up metrics at each level. Uses a two-stage aggregation: ads are grouped into ad sets, then ad sets into campaigns. Pagination is at the campaign level. Ads without a campaign or ad set ID are grouped into synthetic \"Ungrouped\" buckets.
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'late-sdk'
|
|
25
|
+
# setup authorization
|
|
26
|
+
Late.configure do |config|
|
|
27
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
28
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = Late::AdCampaignsApi.new
|
|
32
|
+
opts = {
|
|
33
|
+
page: 56, # Integer | Page number (1-based)
|
|
34
|
+
limit: 56, # Integer | Campaigns per page
|
|
35
|
+
source: 'zernio', # String |
|
|
36
|
+
platform: 'facebook', # String |
|
|
37
|
+
status: 'active', # String | Filter by derived campaign status (post-aggregation)
|
|
38
|
+
ad_account_id: 'ad_account_id_example', # String | Platform ad account ID
|
|
39
|
+
account_id: 'account_id_example', # String | Social account ID
|
|
40
|
+
profile_id: 'profile_id_example' # String | Profile ID
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
# Get nested campaign/ad-set/ad tree
|
|
45
|
+
result = api_instance.get_ad_tree(opts)
|
|
46
|
+
p result
|
|
47
|
+
rescue Late::ApiError => e
|
|
48
|
+
puts "Error when calling AdCampaignsApi->get_ad_tree: #{e}"
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Using the get_ad_tree_with_http_info variant
|
|
53
|
+
|
|
54
|
+
This returns an Array which contains the response data, status code and headers.
|
|
55
|
+
|
|
56
|
+
> <Array(<GetAdTree200Response>, Integer, Hash)> get_ad_tree_with_http_info(opts)
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
begin
|
|
60
|
+
# Get nested campaign/ad-set/ad tree
|
|
61
|
+
data, status_code, headers = api_instance.get_ad_tree_with_http_info(opts)
|
|
62
|
+
p status_code # => 2xx
|
|
63
|
+
p headers # => { ... }
|
|
64
|
+
p data # => <GetAdTree200Response>
|
|
65
|
+
rescue Late::ApiError => e
|
|
66
|
+
puts "Error when calling AdCampaignsApi->get_ad_tree_with_http_info: #{e}"
|
|
67
|
+
end
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Parameters
|
|
71
|
+
|
|
72
|
+
| Name | Type | Description | Notes |
|
|
73
|
+
| ---- | ---- | ----------- | ----- |
|
|
74
|
+
| **page** | **Integer** | Page number (1-based) | [optional][default to 1] |
|
|
75
|
+
| **limit** | **Integer** | Campaigns per page | [optional][default to 20] |
|
|
76
|
+
| **source** | **String** | | [optional][default to 'zernio'] |
|
|
77
|
+
| **platform** | **String** | | [optional] |
|
|
78
|
+
| **status** | **String** | Filter by derived campaign status (post-aggregation) | [optional] |
|
|
79
|
+
| **ad_account_id** | **String** | Platform ad account ID | [optional] |
|
|
80
|
+
| **account_id** | **String** | Social account ID | [optional] |
|
|
81
|
+
| **profile_id** | **String** | Profile ID | [optional] |
|
|
82
|
+
|
|
83
|
+
### Return type
|
|
84
|
+
|
|
85
|
+
[**GetAdTree200Response**](GetAdTree200Response.md)
|
|
86
|
+
|
|
87
|
+
### Authorization
|
|
88
|
+
|
|
89
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
90
|
+
|
|
91
|
+
### HTTP request headers
|
|
92
|
+
|
|
93
|
+
- **Content-Type**: Not defined
|
|
94
|
+
- **Accept**: application/json
|
|
95
|
+
|
|
96
|
+
|
|
11
97
|
## list_ad_campaigns
|
|
12
98
|
|
|
13
99
|
> <ListAdCampaigns200Response> list_ad_campaigns(opts)
|
data/docs/AdTreeAdSet.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Late::AdTreeAdSet
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform_ad_set_id** | **String** | | [optional] |
|
|
8
|
+
| **ad_set_name** | **String** | | [optional] |
|
|
9
|
+
| **status** | **String** | Derived from child ad statuses | [optional] |
|
|
10
|
+
| **ad_count** | **Integer** | | [optional] |
|
|
11
|
+
| **budget** | [**AdBudget**](AdBudget.md) | | [optional] |
|
|
12
|
+
| **metrics** | [**AdMetrics**](AdMetrics.md) | | [optional] |
|
|
13
|
+
| **ads** | [**Array<Ad>**](Ad.md) | Individual ads within this ad set (capped at 100). Returns a subset of Ad fields from the aggregation (core fields like _id, name, platform, status, budget, metrics, creative, goal are included; targeting and schedule may be absent). | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'late-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Late::AdTreeAdSet.new(
|
|
21
|
+
platform_ad_set_id: null,
|
|
22
|
+
ad_set_name: null,
|
|
23
|
+
status: null,
|
|
24
|
+
ad_count: null,
|
|
25
|
+
budget: null,
|
|
26
|
+
metrics: null,
|
|
27
|
+
ads: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Late::AdTreeCampaign
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform_campaign_id** | **String** | | [optional] |
|
|
8
|
+
| **platform** | **String** | | [optional] |
|
|
9
|
+
| **campaign_name** | **String** | | [optional] |
|
|
10
|
+
| **status** | **String** | Derived from child ad statuses | [optional] |
|
|
11
|
+
| **ad_count** | **Integer** | Total ads across all ad sets | [optional] |
|
|
12
|
+
| **ad_set_count** | **Integer** | | [optional] |
|
|
13
|
+
| **budget** | [**AdBudget**](AdBudget.md) | | [optional] |
|
|
14
|
+
| **metrics** | [**AdMetrics**](AdMetrics.md) | | [optional] |
|
|
15
|
+
| **platform_ad_account_id** | **String** | | [optional] |
|
|
16
|
+
| **account_id** | **String** | | [optional] |
|
|
17
|
+
| **profile_id** | **String** | | [optional] |
|
|
18
|
+
| **ad_sets** | [**Array<AdTreeAdSet>**](AdTreeAdSet.md) | | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'late-sdk'
|
|
24
|
+
|
|
25
|
+
instance = Late::AdTreeCampaign.new(
|
|
26
|
+
platform_campaign_id: null,
|
|
27
|
+
platform: null,
|
|
28
|
+
campaign_name: null,
|
|
29
|
+
status: null,
|
|
30
|
+
ad_count: null,
|
|
31
|
+
ad_set_count: null,
|
|
32
|
+
budget: null,
|
|
33
|
+
metrics: null,
|
|
34
|
+
platform_ad_account_id: null,
|
|
35
|
+
account_id: null,
|
|
36
|
+
profile_id: null,
|
|
37
|
+
ad_sets: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::GetAdTree200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **campaigns** | [**Array<AdTreeCampaign>**](AdTreeCampaign.md) | | [optional] |
|
|
8
|
+
| **pagination** | [**Pagination**](Pagination.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::GetAdTree200Response.new(
|
|
16
|
+
campaigns: null,
|
|
17
|
+
pagination: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -19,6 +19,111 @@ module Late
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Get nested campaign/ad-set/ad tree
|
|
23
|
+
# Returns a nested Campaign > Ad Set > Ad hierarchy with rolled-up metrics at each level. Uses a two-stage aggregation: ads are grouped into ad sets, then ad sets into campaigns. Pagination is at the campaign level. Ads without a campaign or ad set ID are grouped into synthetic \"Ungrouped\" buckets.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
26
|
+
# @option opts [Integer] :limit Campaigns per page (default to 20)
|
|
27
|
+
# @option opts [String] :source (default to 'zernio')
|
|
28
|
+
# @option opts [String] :platform
|
|
29
|
+
# @option opts [String] :status Filter by derived campaign status (post-aggregation)
|
|
30
|
+
# @option opts [String] :ad_account_id Platform ad account ID
|
|
31
|
+
# @option opts [String] :account_id Social account ID
|
|
32
|
+
# @option opts [String] :profile_id Profile ID
|
|
33
|
+
# @return [GetAdTree200Response]
|
|
34
|
+
def get_ad_tree(opts = {})
|
|
35
|
+
data, _status_code, _headers = get_ad_tree_with_http_info(opts)
|
|
36
|
+
data
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Get nested campaign/ad-set/ad tree
|
|
40
|
+
# Returns a nested Campaign > Ad Set > Ad hierarchy with rolled-up metrics at each level. Uses a two-stage aggregation: ads are grouped into ad sets, then ad sets into campaigns. Pagination is at the campaign level. Ads without a campaign or ad set ID are grouped into synthetic \"Ungrouped\" buckets.
|
|
41
|
+
# @param [Hash] opts the optional parameters
|
|
42
|
+
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
43
|
+
# @option opts [Integer] :limit Campaigns per page (default to 20)
|
|
44
|
+
# @option opts [String] :source (default to 'zernio')
|
|
45
|
+
# @option opts [String] :platform
|
|
46
|
+
# @option opts [String] :status Filter by derived campaign status (post-aggregation)
|
|
47
|
+
# @option opts [String] :ad_account_id Platform ad account ID
|
|
48
|
+
# @option opts [String] :account_id Social account ID
|
|
49
|
+
# @option opts [String] :profile_id Profile ID
|
|
50
|
+
# @return [Array<(GetAdTree200Response, Integer, Hash)>] GetAdTree200Response data, response status code and response headers
|
|
51
|
+
def get_ad_tree_with_http_info(opts = {})
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.get_ad_tree ...'
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AdCampaignsApi.get_ad_tree, must be greater than or equal to 1.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
60
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdCampaignsApi.get_ad_tree, must be smaller than or equal to 100.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
64
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdCampaignsApi.get_ad_tree, must be greater than or equal to 1.'
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
allowable_values = ["zernio", "all"]
|
|
68
|
+
if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
|
|
69
|
+
fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
|
|
70
|
+
end
|
|
71
|
+
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"]
|
|
72
|
+
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
73
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
74
|
+
end
|
|
75
|
+
allowable_values = ["active", "paused", "pending_review", "rejected", "completed", "cancelled", "error"]
|
|
76
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
77
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
78
|
+
end
|
|
79
|
+
# resource path
|
|
80
|
+
local_var_path = '/v1/ads/tree'
|
|
81
|
+
|
|
82
|
+
# query parameters
|
|
83
|
+
query_params = opts[:query_params] || {}
|
|
84
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
85
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
86
|
+
query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
|
|
87
|
+
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
|
88
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
89
|
+
query_params[:'adAccountId'] = opts[:'ad_account_id'] if !opts[:'ad_account_id'].nil?
|
|
90
|
+
query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
91
|
+
query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
|
92
|
+
|
|
93
|
+
# header parameters
|
|
94
|
+
header_params = opts[:header_params] || {}
|
|
95
|
+
# HTTP header 'Accept' (if needed)
|
|
96
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
97
|
+
|
|
98
|
+
# form parameters
|
|
99
|
+
form_params = opts[:form_params] || {}
|
|
100
|
+
|
|
101
|
+
# http body (model)
|
|
102
|
+
post_body = opts[:debug_body]
|
|
103
|
+
|
|
104
|
+
# return_type
|
|
105
|
+
return_type = opts[:debug_return_type] || 'GetAdTree200Response'
|
|
106
|
+
|
|
107
|
+
# auth_names
|
|
108
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
109
|
+
|
|
110
|
+
new_options = opts.merge(
|
|
111
|
+
:operation => :"AdCampaignsApi.get_ad_tree",
|
|
112
|
+
:header_params => header_params,
|
|
113
|
+
:query_params => query_params,
|
|
114
|
+
:form_params => form_params,
|
|
115
|
+
:body => post_body,
|
|
116
|
+
:auth_names => auth_names,
|
|
117
|
+
:return_type => return_type
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
121
|
+
if @api_client.config.debugging
|
|
122
|
+
@api_client.config.logger.debug "API called: AdCampaignsApi#get_ad_tree\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
123
|
+
end
|
|
124
|
+
return data, status_code, headers
|
|
125
|
+
end
|
|
126
|
+
|
|
22
127
|
# List campaigns with aggregate metrics
|
|
23
128
|
# Returns campaigns as virtual aggregations over ad documents grouped by platform campaign ID. Metrics (spend, impressions, clicks, etc.) are summed across all ads in each campaign. Campaign status is derived from child ad statuses (active > pending_review > paused > error > completed > cancelled > rejected).
|
|
24
129
|
# @param [Hash] opts the optional parameters
|
|
@@ -14,12 +14,23 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Late
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# Ad set (or ad group/line item depending on platform) with rolled-up metrics and child ads
|
|
18
|
+
class AdTreeAdSet < ApiModelBase
|
|
19
|
+
attr_accessor :platform_ad_set_id
|
|
19
20
|
|
|
21
|
+
attr_accessor :ad_set_name
|
|
22
|
+
|
|
23
|
+
# Derived from child ad statuses
|
|
20
24
|
attr_accessor :status
|
|
21
25
|
|
|
22
|
-
attr_accessor :
|
|
26
|
+
attr_accessor :ad_count
|
|
27
|
+
|
|
28
|
+
attr_accessor :budget
|
|
29
|
+
|
|
30
|
+
attr_accessor :metrics
|
|
31
|
+
|
|
32
|
+
# Individual ads within this ad set (capped at 100). Returns a subset of Ad fields from the aggregation (core fields like _id, name, platform, status, budget, metrics, creative, goal are included; targeting and schedule may be absent).
|
|
33
|
+
attr_accessor :ads
|
|
23
34
|
|
|
24
35
|
class EnumAttributeValidator
|
|
25
36
|
attr_reader :datatype
|
|
@@ -46,9 +57,13 @@ module Late
|
|
|
46
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
58
|
def self.attribute_map
|
|
48
59
|
{
|
|
49
|
-
:'
|
|
60
|
+
:'platform_ad_set_id' => :'platformAdSetId',
|
|
61
|
+
:'ad_set_name' => :'adSetName',
|
|
50
62
|
:'status' => :'status',
|
|
51
|
-
:'
|
|
63
|
+
:'ad_count' => :'adCount',
|
|
64
|
+
:'budget' => :'budget',
|
|
65
|
+
:'metrics' => :'metrics',
|
|
66
|
+
:'ads' => :'ads'
|
|
52
67
|
}
|
|
53
68
|
end
|
|
54
69
|
|
|
@@ -65,9 +80,13 @@ module Late
|
|
|
65
80
|
# Attribute type mapping.
|
|
66
81
|
def self.openapi_types
|
|
67
82
|
{
|
|
68
|
-
:'
|
|
83
|
+
:'platform_ad_set_id' => :'String',
|
|
84
|
+
:'ad_set_name' => :'String',
|
|
69
85
|
:'status' => :'String',
|
|
70
|
-
:'
|
|
86
|
+
:'ad_count' => :'Integer',
|
|
87
|
+
:'budget' => :'AdBudget',
|
|
88
|
+
:'metrics' => :'AdMetrics',
|
|
89
|
+
:'ads' => :'Array<Ad>'
|
|
71
90
|
}
|
|
72
91
|
end
|
|
73
92
|
|
|
@@ -81,28 +100,46 @@ module Late
|
|
|
81
100
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
101
|
def initialize(attributes = {})
|
|
83
102
|
if (!attributes.is_a?(Hash))
|
|
84
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::
|
|
103
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::AdTreeAdSet` initialize method"
|
|
85
104
|
end
|
|
86
105
|
|
|
87
106
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
107
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
108
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
109
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::AdTreeAdSet`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
111
|
end
|
|
93
112
|
h[k.to_sym] = v
|
|
94
113
|
}
|
|
95
114
|
|
|
96
|
-
if attributes.key?(:'
|
|
97
|
-
self.
|
|
115
|
+
if attributes.key?(:'platform_ad_set_id')
|
|
116
|
+
self.platform_ad_set_id = attributes[:'platform_ad_set_id']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'ad_set_name')
|
|
120
|
+
self.ad_set_name = attributes[:'ad_set_name']
|
|
98
121
|
end
|
|
99
122
|
|
|
100
123
|
if attributes.key?(:'status')
|
|
101
124
|
self.status = attributes[:'status']
|
|
102
125
|
end
|
|
103
126
|
|
|
104
|
-
if attributes.key?(:'
|
|
105
|
-
self.
|
|
127
|
+
if attributes.key?(:'ad_count')
|
|
128
|
+
self.ad_count = attributes[:'ad_count']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'budget')
|
|
132
|
+
self.budget = attributes[:'budget']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'metrics')
|
|
136
|
+
self.metrics = attributes[:'metrics']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'ads')
|
|
140
|
+
if (value = attributes[:'ads']).is_a?(Array)
|
|
141
|
+
self.ads = value
|
|
142
|
+
end
|
|
106
143
|
end
|
|
107
144
|
end
|
|
108
145
|
|
|
@@ -118,7 +155,7 @@ module Late
|
|
|
118
155
|
# @return true if the model is valid
|
|
119
156
|
def valid?
|
|
120
157
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
|
-
status_validator = EnumAttributeValidator.new('String', ["
|
|
158
|
+
status_validator = EnumAttributeValidator.new('String', ["active", "paused", "pending_review", "rejected", "completed", "cancelled", "error"])
|
|
122
159
|
return false unless status_validator.valid?(@status)
|
|
123
160
|
true
|
|
124
161
|
end
|
|
@@ -126,7 +163,7 @@ module Late
|
|
|
126
163
|
# Custom attribute writer method checking allowed values (enum).
|
|
127
164
|
# @param [Object] status Object to be assigned
|
|
128
165
|
def status=(status)
|
|
129
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
166
|
+
validator = EnumAttributeValidator.new('String', ["active", "paused", "pending_review", "rejected", "completed", "cancelled", "error"])
|
|
130
167
|
unless validator.valid?(status)
|
|
131
168
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
132
169
|
end
|
|
@@ -138,9 +175,13 @@ module Late
|
|
|
138
175
|
def ==(o)
|
|
139
176
|
return true if self.equal?(o)
|
|
140
177
|
self.class == o.class &&
|
|
141
|
-
|
|
178
|
+
platform_ad_set_id == o.platform_ad_set_id &&
|
|
179
|
+
ad_set_name == o.ad_set_name &&
|
|
142
180
|
status == o.status &&
|
|
143
|
-
|
|
181
|
+
ad_count == o.ad_count &&
|
|
182
|
+
budget == o.budget &&
|
|
183
|
+
metrics == o.metrics &&
|
|
184
|
+
ads == o.ads
|
|
144
185
|
end
|
|
145
186
|
|
|
146
187
|
# @see the `==` method
|
|
@@ -152,7 +193,7 @@ module Late
|
|
|
152
193
|
# Calculates hash code according to all attributes.
|
|
153
194
|
# @return [Integer] Hash code
|
|
154
195
|
def hash
|
|
155
|
-
[
|
|
196
|
+
[platform_ad_set_id, ad_set_name, status, ad_count, budget, metrics, ads].hash
|
|
156
197
|
end
|
|
157
198
|
|
|
158
199
|
# Builds the object from hash
|