late-sdk 0.0.104 → 0.0.106
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 +27 -0
- 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/docs/ValidateApi.md +287 -0
- data/docs/ValidateMedia200Response.md +32 -0
- data/docs/ValidateMedia200ResponsePlatformLimitsValue.md +22 -0
- data/docs/ValidateMediaRequest.md +18 -0
- data/docs/ValidatePost200Response.md +49 -0
- data/docs/ValidatePost200ResponseOneOf.md +22 -0
- data/docs/ValidatePost200ResponseOneOf1.md +22 -0
- data/docs/ValidatePost200ResponseOneOf1ErrorsInner.md +20 -0
- data/docs/ValidatePost200ResponseOneOfWarningsInner.md +20 -0
- data/docs/ValidatePostLength200Response.md +20 -0
- data/docs/ValidatePostLength200ResponsePlatformsValue.md +22 -0
- data/docs/ValidatePostLengthRequest.md +18 -0
- data/docs/ValidatePostRequest.md +22 -0
- data/docs/ValidatePostRequestMediaItemsInner.md +20 -0
- data/docs/ValidatePostRequestPlatformsInner.md +24 -0
- data/docs/ValidatePostRequestPlatformsInnerCustomMediaInner.md +20 -0
- data/docs/ValidateSubreddit200Response.md +49 -0
- data/docs/ValidateSubreddit200ResponseOneOf.md +20 -0
- data/docs/ValidateSubreddit200ResponseOneOf1.md +20 -0
- data/docs/ValidateSubreddit200ResponseOneOfSubreddit.md +32 -0
- data/lib/late-sdk/api/ad_campaigns_api.rb +105 -0
- data/lib/late-sdk/api/validate_api.rb +290 -0
- data/lib/late-sdk/models/ad_tree_ad_set.rb +240 -0
- data/lib/late-sdk/models/ad_tree_campaign.rb +297 -0
- data/lib/late-sdk/models/get_ad_tree200_response.rb +158 -0
- data/lib/late-sdk/models/validate_media200_response.rb +249 -0
- data/lib/late-sdk/models/validate_media200_response_platform_limits_value.rb +166 -0
- data/lib/late-sdk/models/validate_media_request.rb +165 -0
- data/lib/late-sdk/models/validate_post200_response.rb +104 -0
- data/lib/late-sdk/models/validate_post200_response_one_of.rb +168 -0
- data/lib/late-sdk/models/validate_post200_response_one_of1.rb +170 -0
- data/lib/late-sdk/models/validate_post200_response_one_of1_errors_inner.rb +156 -0
- data/lib/late-sdk/models/validate_post200_response_one_of_warnings_inner.rb +156 -0
- data/lib/late-sdk/models/validate_post_length200_response.rb +158 -0
- data/lib/late-sdk/models/validate_post_length200_response_platforms_value.rb +168 -0
- data/lib/late-sdk/models/validate_post_length_request.rb +165 -0
- data/lib/late-sdk/models/validate_post_request.rb +189 -0
- data/lib/late-sdk/models/validate_post_request_media_items_inner.rb +190 -0
- data/lib/late-sdk/models/validate_post_request_platforms_inner.rb +217 -0
- data/lib/late-sdk/models/validate_post_request_platforms_inner_custom_media_inner.rb +190 -0
- data/lib/late-sdk/models/validate_subreddit200_response.rb +104 -0
- data/lib/late-sdk/models/validate_subreddit200_response_one_of.rb +157 -0
- data/lib/late-sdk/models/validate_subreddit200_response_one_of1.rb +157 -0
- data/lib/late-sdk/models/validate_subreddit200_response_one_of_subreddit.rb +244 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +23 -0
- data/openapi.yaml +330 -1
- data/spec/api/ad_campaigns_api_spec.rb +19 -0
- data/spec/api/validate_api_spec.rb +83 -0
- data/spec/models/ad_tree_ad_set_spec.rb +76 -0
- data/spec/models/ad_tree_campaign_spec.rb +110 -0
- data/spec/models/get_ad_tree200_response_spec.rb +42 -0
- data/spec/models/validate_media200_response_platform_limits_value_spec.rb +48 -0
- data/spec/models/validate_media200_response_spec.rb +82 -0
- data/spec/models/validate_media_request_spec.rb +36 -0
- data/spec/models/validate_post200_response_one_of1_errors_inner_spec.rb +42 -0
- data/spec/models/validate_post200_response_one_of1_spec.rb +48 -0
- data/spec/models/validate_post200_response_one_of_spec.rb +48 -0
- data/spec/models/validate_post200_response_one_of_warnings_inner_spec.rb +42 -0
- data/spec/models/validate_post200_response_spec.rb +32 -0
- data/spec/models/validate_post_length200_response_platforms_value_spec.rb +48 -0
- data/spec/models/validate_post_length200_response_spec.rb +42 -0
- data/spec/models/validate_post_length_request_spec.rb +36 -0
- data/spec/models/validate_post_request_media_items_inner_spec.rb +46 -0
- data/spec/models/validate_post_request_platforms_inner_custom_media_inner_spec.rb +46 -0
- data/spec/models/validate_post_request_platforms_inner_spec.rb +58 -0
- data/spec/models/validate_post_request_spec.rb +48 -0
- data/spec/models/validate_subreddit200_response_one_of1_spec.rb +42 -0
- data/spec/models/validate_subreddit200_response_one_of_spec.rb +42 -0
- data/spec/models/validate_subreddit200_response_one_of_subreddit_spec.rb +82 -0
- data/spec/models/validate_subreddit200_response_spec.rb +32 -0
- data/zernio-sdk-0.0.106.gem +0 -0
- metadata +94 -2
- data/zernio-sdk-0.0.104.gem +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Late::ValidatePost200ResponseOneOf
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **valid** | **Boolean** | | [optional] |
|
|
8
|
+
| **message** | **String** | | [optional] |
|
|
9
|
+
| **warnings** | [**Array<ValidatePost200ResponseOneOfWarningsInner>**](ValidatePost200ResponseOneOfWarningsInner.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'late-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Late::ValidatePost200ResponseOneOf.new(
|
|
17
|
+
valid: null,
|
|
18
|
+
message: No validation issues found.,
|
|
19
|
+
warnings: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Late::ValidatePost200ResponseOneOf1
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **valid** | **Boolean** | | [optional] |
|
|
8
|
+
| **errors** | [**Array<ValidatePost200ResponseOneOf1ErrorsInner>**](ValidatePost200ResponseOneOf1ErrorsInner.md) | | [optional] |
|
|
9
|
+
| **warnings** | [**Array<ValidatePost200ResponseOneOfWarningsInner>**](ValidatePost200ResponseOneOfWarningsInner.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'late-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Late::ValidatePost200ResponseOneOf1.new(
|
|
17
|
+
valid: null,
|
|
18
|
+
errors: null,
|
|
19
|
+
warnings: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidatePost200ResponseOneOf1ErrorsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | [optional] |
|
|
8
|
+
| **error** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidatePost200ResponseOneOf1ErrorsInner.new(
|
|
16
|
+
platform: null,
|
|
17
|
+
error: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidatePost200ResponseOneOfWarningsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | [optional] |
|
|
8
|
+
| **warning** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidatePost200ResponseOneOfWarningsInner.new(
|
|
16
|
+
platform: null,
|
|
17
|
+
warning: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidatePostLength200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **text** | **String** | | [optional] |
|
|
8
|
+
| **platforms** | [**Hash<String, ValidatePostLength200ResponsePlatformsValue>**](ValidatePostLength200ResponsePlatformsValue.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidatePostLength200Response.new(
|
|
16
|
+
text: null,
|
|
17
|
+
platforms: {"twitter":{"count":51,"limit":280,"valid":true},"twitterPremium":{"count":51,"limit":25000,"valid":true},"instagram":{"count":51,"limit":2200,"valid":true},"bluesky":{"count":51,"limit":300,"valid":true},"snapchat":{"count":51,"limit":160,"valid":true}}
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Late::ValidatePostLength200ResponsePlatformsValue
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **count** | **Integer** | Character count for this platform | [optional] |
|
|
8
|
+
| **limit** | **Integer** | Maximum allowed characters | [optional] |
|
|
9
|
+
| **valid** | **Boolean** | Whether the text is within the limit | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'late-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Late::ValidatePostLength200ResponsePlatformsValue.new(
|
|
17
|
+
count: null,
|
|
18
|
+
limit: null,
|
|
19
|
+
valid: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Late::ValidatePostLengthRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **text** | **String** | The post text to check | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'late-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Late::ValidatePostLengthRequest.new(
|
|
15
|
+
text: Check out https://zernio.com for scheduling posts!
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Late::ValidatePostRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **content** | **String** | Post text content | [optional] |
|
|
8
|
+
| **platforms** | [**Array<ValidatePostRequestPlatformsInner>**](ValidatePostRequestPlatformsInner.md) | Target platforms (same format as POST /v1/posts) | |
|
|
9
|
+
| **media_items** | [**Array<ValidatePostRequestMediaItemsInner>**](ValidatePostRequestMediaItemsInner.md) | Root media items shared across platforms | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'late-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Late::ValidatePostRequest.new(
|
|
17
|
+
content: Check out this video!,
|
|
18
|
+
platforms: [{"platform":"youtube"},{"platform":"twitter"}],
|
|
19
|
+
media_items: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidatePostRequestMediaItemsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **url** | **String** | | [optional] |
|
|
8
|
+
| **type** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidatePostRequestMediaItemsInner.new(
|
|
16
|
+
url: null,
|
|
17
|
+
type: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Late::ValidatePostRequestPlatformsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | |
|
|
8
|
+
| **custom_content** | **String** | | [optional] |
|
|
9
|
+
| **platform_specific_data** | **Object** | | [optional] |
|
|
10
|
+
| **custom_media** | [**Array<ValidatePostRequestPlatformsInnerCustomMediaInner>**](ValidatePostRequestPlatformsInnerCustomMediaInner.md) | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'late-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Late::ValidatePostRequestPlatformsInner.new(
|
|
18
|
+
platform: null,
|
|
19
|
+
custom_content: null,
|
|
20
|
+
platform_specific_data: null,
|
|
21
|
+
custom_media: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidatePostRequestPlatformsInnerCustomMediaInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **url** | **String** | | [optional] |
|
|
8
|
+
| **type** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidatePostRequestPlatformsInnerCustomMediaInner.new(
|
|
16
|
+
url: null,
|
|
17
|
+
type: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Late::ValidateSubreddit200Response
|
|
2
|
+
|
|
3
|
+
## Class instance methods
|
|
4
|
+
|
|
5
|
+
### `openapi_one_of`
|
|
6
|
+
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'late-sdk'
|
|
13
|
+
|
|
14
|
+
Late::ValidateSubreddit200Response.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'ValidateSubreddit200ResponseOneOf',
|
|
18
|
+
# :'ValidateSubreddit200ResponseOneOf1'
|
|
19
|
+
# ]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### build
|
|
23
|
+
|
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
25
|
+
|
|
26
|
+
#### Example
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'late-sdk'
|
|
30
|
+
|
|
31
|
+
Late::ValidateSubreddit200Response.build(data)
|
|
32
|
+
# => #<ValidateSubreddit200ResponseOneOf:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Late::ValidateSubreddit200Response.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
| ---- | ---- | ----------- |
|
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
43
|
+
|
|
44
|
+
#### Return type
|
|
45
|
+
|
|
46
|
+
- `ValidateSubreddit200ResponseOneOf`
|
|
47
|
+
- `ValidateSubreddit200ResponseOneOf1`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidateSubreddit200ResponseOneOf
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **exists** | **Boolean** | | [optional] |
|
|
8
|
+
| **subreddit** | [**ValidateSubreddit200ResponseOneOfSubreddit**](ValidateSubreddit200ResponseOneOfSubreddit.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidateSubreddit200ResponseOneOf.new(
|
|
16
|
+
exists: null,
|
|
17
|
+
subreddit: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::ValidateSubreddit200ResponseOneOf1
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **exists** | **Boolean** | | [optional] |
|
|
8
|
+
| **error** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::ValidateSubreddit200ResponseOneOf1.new(
|
|
16
|
+
exists: null,
|
|
17
|
+
error: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Late::ValidateSubreddit200ResponseOneOfSubreddit
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | | [optional] |
|
|
8
|
+
| **title** | **String** | | [optional] |
|
|
9
|
+
| **description** | **String** | | [optional] |
|
|
10
|
+
| **subscribers** | **Integer** | | [optional] |
|
|
11
|
+
| **is_nsfw** | **Boolean** | | [optional] |
|
|
12
|
+
| **type** | **String** | | [optional] |
|
|
13
|
+
| **allow_images** | **Boolean** | | [optional] |
|
|
14
|
+
| **allow_videos** | **Boolean** | | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'late-sdk'
|
|
20
|
+
|
|
21
|
+
instance = Late::ValidateSubreddit200ResponseOneOfSubreddit.new(
|
|
22
|
+
name: programming,
|
|
23
|
+
title: programming,
|
|
24
|
+
description: Computer Programming,
|
|
25
|
+
subscribers: 6844284,
|
|
26
|
+
is_nsfw: null,
|
|
27
|
+
type: public,
|
|
28
|
+
allow_images: null,
|
|
29
|
+
allow_videos: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -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
|