zernio-sdk 0.0.104 → 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 +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
- metadata +93 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e89e4855c72cd93a5c7643e8d54b1ad2f6e4e44f9e03a76170381c1558001311
|
|
4
|
+
data.tar.gz: aaec465c3b0b135f08128a32b1650e369c8f109f8ea4ec199d75c0dce3aed577
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f765ea7bde92cda73b3bd5775840d45e5c14480631585123e365022e093592ce8431373d85a9886f98c7a311a98075c2bbbb34ec4de09dcbdffee67e1f9ed4b
|
|
7
|
+
data.tar.gz: 4df53e8fcccdd103ae6e348413d5b2d02906d20d93f6b2af61f4fec5075a90895fb1261ea37946d7492c19d0323fbc77b9dbb00cf65dbebcda558470e8131b7a
|
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
|
|
@@ -260,6 +261,10 @@ Class | Method | HTTP request | Description
|
|
|
260
261
|
*Late::UsageApi* | [**get_usage_stats**](docs/UsageApi.md#get_usage_stats) | **GET** /v1/usage-stats | Get plan and usage stats
|
|
261
262
|
*Late::UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /v1/users/{userId} | Get user
|
|
262
263
|
*Late::UsersApi* | [**list_users**](docs/UsersApi.md#list_users) | **GET** /v1/users | List users
|
|
264
|
+
*Late::ValidateApi* | [**validate_media**](docs/ValidateApi.md#validate_media) | **POST** /v1/tools/validate/media | Validate media URL
|
|
265
|
+
*Late::ValidateApi* | [**validate_post**](docs/ValidateApi.md#validate_post) | **POST** /v1/tools/validate/post | Validate post content
|
|
266
|
+
*Late::ValidateApi* | [**validate_post_length**](docs/ValidateApi.md#validate_post_length) | **POST** /v1/tools/validate/post-length | Validate post character count
|
|
267
|
+
*Late::ValidateApi* | [**validate_subreddit**](docs/ValidateApi.md#validate_subreddit) | **GET** /v1/tools/validate/subreddit | Check subreddit existence
|
|
263
268
|
*Late::WebhooksApi* | [**create_webhook_settings**](docs/WebhooksApi.md#create_webhook_settings) | **POST** /v1/webhooks/settings | Create webhook
|
|
264
269
|
*Late::WebhooksApi* | [**delete_webhook_settings**](docs/WebhooksApi.md#delete_webhook_settings) | **DELETE** /v1/webhooks/settings | Delete webhook
|
|
265
270
|
*Late::WebhooksApi* | [**get_webhook_logs**](docs/WebhooksApi.md#get_webhook_logs) | **GET** /v1/webhooks/logs | Get delivery logs
|
|
@@ -327,6 +332,8 @@ Class | Method | HTTP request | Description
|
|
|
327
332
|
- [Late::AdCampaign](docs/AdCampaign.md)
|
|
328
333
|
- [Late::AdMetrics](docs/AdMetrics.md)
|
|
329
334
|
- [Late::AdSchedule](docs/AdSchedule.md)
|
|
335
|
+
- [Late::AdTreeAdSet](docs/AdTreeAdSet.md)
|
|
336
|
+
- [Late::AdTreeCampaign](docs/AdTreeCampaign.md)
|
|
330
337
|
- [Late::AddBroadcastRecipients200Response](docs/AddBroadcastRecipients200Response.md)
|
|
331
338
|
- [Late::AddBroadcastRecipientsRequest](docs/AddBroadcastRecipientsRequest.md)
|
|
332
339
|
- [Late::AddMessageReactionRequest](docs/AddMessageReactionRequest.md)
|
|
@@ -484,6 +491,7 @@ Class | Method | HTTP request | Description
|
|
|
484
491
|
- [Late::GetAdAnalytics200ResponseAnalytics](docs/GetAdAnalytics200ResponseAnalytics.md)
|
|
485
492
|
- [Late::GetAdAnalytics200ResponseAnalyticsDailyInner](docs/GetAdAnalytics200ResponseAnalyticsDailyInner.md)
|
|
486
493
|
- [Late::GetAdAudience200Response](docs/GetAdAudience200Response.md)
|
|
494
|
+
- [Late::GetAdTree200Response](docs/GetAdTree200Response.md)
|
|
487
495
|
- [Late::GetAllAccountsHealth200Response](docs/GetAllAccountsHealth200Response.md)
|
|
488
496
|
- [Late::GetAllAccountsHealth200ResponseAccountsInner](docs/GetAllAccountsHealth200ResponseAccountsInner.md)
|
|
489
497
|
- [Late::GetAllAccountsHealth200ResponseSummary](docs/GetAllAccountsHealth200ResponseSummary.md)
|
|
@@ -964,6 +972,25 @@ Class | Method | HTTP request | Description
|
|
|
964
972
|
- [Late::User](docs/User.md)
|
|
965
973
|
- [Late::UserGetResponse](docs/UserGetResponse.md)
|
|
966
974
|
- [Late::UsersListResponse](docs/UsersListResponse.md)
|
|
975
|
+
- [Late::ValidateMedia200Response](docs/ValidateMedia200Response.md)
|
|
976
|
+
- [Late::ValidateMedia200ResponsePlatformLimitsValue](docs/ValidateMedia200ResponsePlatformLimitsValue.md)
|
|
977
|
+
- [Late::ValidateMediaRequest](docs/ValidateMediaRequest.md)
|
|
978
|
+
- [Late::ValidatePost200Response](docs/ValidatePost200Response.md)
|
|
979
|
+
- [Late::ValidatePost200ResponseOneOf](docs/ValidatePost200ResponseOneOf.md)
|
|
980
|
+
- [Late::ValidatePost200ResponseOneOf1](docs/ValidatePost200ResponseOneOf1.md)
|
|
981
|
+
- [Late::ValidatePost200ResponseOneOf1ErrorsInner](docs/ValidatePost200ResponseOneOf1ErrorsInner.md)
|
|
982
|
+
- [Late::ValidatePost200ResponseOneOfWarningsInner](docs/ValidatePost200ResponseOneOfWarningsInner.md)
|
|
983
|
+
- [Late::ValidatePostLength200Response](docs/ValidatePostLength200Response.md)
|
|
984
|
+
- [Late::ValidatePostLength200ResponsePlatformsValue](docs/ValidatePostLength200ResponsePlatformsValue.md)
|
|
985
|
+
- [Late::ValidatePostLengthRequest](docs/ValidatePostLengthRequest.md)
|
|
986
|
+
- [Late::ValidatePostRequest](docs/ValidatePostRequest.md)
|
|
987
|
+
- [Late::ValidatePostRequestMediaItemsInner](docs/ValidatePostRequestMediaItemsInner.md)
|
|
988
|
+
- [Late::ValidatePostRequestPlatformsInner](docs/ValidatePostRequestPlatformsInner.md)
|
|
989
|
+
- [Late::ValidatePostRequestPlatformsInnerCustomMediaInner](docs/ValidatePostRequestPlatformsInnerCustomMediaInner.md)
|
|
990
|
+
- [Late::ValidateSubreddit200Response](docs/ValidateSubreddit200Response.md)
|
|
991
|
+
- [Late::ValidateSubreddit200ResponseOneOf](docs/ValidateSubreddit200ResponseOneOf.md)
|
|
992
|
+
- [Late::ValidateSubreddit200ResponseOneOf1](docs/ValidateSubreddit200ResponseOneOf1.md)
|
|
993
|
+
- [Late::ValidateSubreddit200ResponseOneOfSubreddit](docs/ValidateSubreddit200ResponseOneOfSubreddit.md)
|
|
967
994
|
- [Late::Webhook](docs/Webhook.md)
|
|
968
995
|
- [Late::WebhookLog](docs/WebhookLog.md)
|
|
969
996
|
- [Late::WebhookPayloadAccountConnected](docs/WebhookPayloadAccountConnected.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
|
+
|
data/docs/ValidateApi.md
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# Late::ValidateApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**validate_media**](ValidateApi.md#validate_media) | **POST** /v1/tools/validate/media | Validate media URL |
|
|
8
|
+
| [**validate_post**](ValidateApi.md#validate_post) | **POST** /v1/tools/validate/post | Validate post content |
|
|
9
|
+
| [**validate_post_length**](ValidateApi.md#validate_post_length) | **POST** /v1/tools/validate/post-length | Validate post character count |
|
|
10
|
+
| [**validate_subreddit**](ValidateApi.md#validate_subreddit) | **GET** /v1/tools/validate/subreddit | Check subreddit existence |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## validate_media
|
|
14
|
+
|
|
15
|
+
> <ValidateMedia200Response> validate_media(validate_media_request)
|
|
16
|
+
|
|
17
|
+
Validate media URL
|
|
18
|
+
|
|
19
|
+
Check if a media URL is accessible and return metadata (content type, file size) plus per-platform size limit comparisons. Performs a HEAD request (with GET fallback) to detect content type and size. Rejects private/localhost URLs for SSRF protection. Platform limits are sourced from each platform's actual upload constraints.
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'late-sdk'
|
|
26
|
+
# setup authorization
|
|
27
|
+
Late.configure do |config|
|
|
28
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
29
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = Late::ValidateApi.new
|
|
33
|
+
validate_media_request = Late::ValidateMediaRequest.new({url: 'https://example.com/image.jpg'}) # ValidateMediaRequest |
|
|
34
|
+
|
|
35
|
+
begin
|
|
36
|
+
# Validate media URL
|
|
37
|
+
result = api_instance.validate_media(validate_media_request)
|
|
38
|
+
p result
|
|
39
|
+
rescue Late::ApiError => e
|
|
40
|
+
puts "Error when calling ValidateApi->validate_media: #{e}"
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Using the validate_media_with_http_info variant
|
|
45
|
+
|
|
46
|
+
This returns an Array which contains the response data, status code and headers.
|
|
47
|
+
|
|
48
|
+
> <Array(<ValidateMedia200Response>, Integer, Hash)> validate_media_with_http_info(validate_media_request)
|
|
49
|
+
|
|
50
|
+
```ruby
|
|
51
|
+
begin
|
|
52
|
+
# Validate media URL
|
|
53
|
+
data, status_code, headers = api_instance.validate_media_with_http_info(validate_media_request)
|
|
54
|
+
p status_code # => 2xx
|
|
55
|
+
p headers # => { ... }
|
|
56
|
+
p data # => <ValidateMedia200Response>
|
|
57
|
+
rescue Late::ApiError => e
|
|
58
|
+
puts "Error when calling ValidateApi->validate_media_with_http_info: #{e}"
|
|
59
|
+
end
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Parameters
|
|
63
|
+
|
|
64
|
+
| Name | Type | Description | Notes |
|
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
|
66
|
+
| **validate_media_request** | [**ValidateMediaRequest**](ValidateMediaRequest.md) | | |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**ValidateMedia200Response**](ValidateMedia200Response.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: application/json
|
|
79
|
+
- **Accept**: application/json
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## validate_post
|
|
83
|
+
|
|
84
|
+
> <ValidatePost200Response> validate_post(validate_post_request)
|
|
85
|
+
|
|
86
|
+
Validate post content
|
|
87
|
+
|
|
88
|
+
Dry-run the full post validation pipeline without publishing. Catches issues like missing media for Instagram/TikTok/YouTube, hashtag limits, invalid thread formats, Facebook Reel requirements, and character limit violations. Accepts the same body as `POST /v1/posts`. Does NOT validate accounts, process media, or track usage. This is content-only validation. Returns errors for failures and warnings for near-limit content (>90% of character limit).
|
|
89
|
+
|
|
90
|
+
### Examples
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
require 'time'
|
|
94
|
+
require 'late-sdk'
|
|
95
|
+
# setup authorization
|
|
96
|
+
Late.configure do |config|
|
|
97
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
98
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
api_instance = Late::ValidateApi.new
|
|
102
|
+
validate_post_request = Late::ValidatePostRequest.new({platforms: [{"platform": "youtube"}, {"platform": "twitter"}]}) # ValidatePostRequest |
|
|
103
|
+
|
|
104
|
+
begin
|
|
105
|
+
# Validate post content
|
|
106
|
+
result = api_instance.validate_post(validate_post_request)
|
|
107
|
+
p result
|
|
108
|
+
rescue Late::ApiError => e
|
|
109
|
+
puts "Error when calling ValidateApi->validate_post: #{e}"
|
|
110
|
+
end
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Using the validate_post_with_http_info variant
|
|
114
|
+
|
|
115
|
+
This returns an Array which contains the response data, status code and headers.
|
|
116
|
+
|
|
117
|
+
> <Array(<ValidatePost200Response>, Integer, Hash)> validate_post_with_http_info(validate_post_request)
|
|
118
|
+
|
|
119
|
+
```ruby
|
|
120
|
+
begin
|
|
121
|
+
# Validate post content
|
|
122
|
+
data, status_code, headers = api_instance.validate_post_with_http_info(validate_post_request)
|
|
123
|
+
p status_code # => 2xx
|
|
124
|
+
p headers # => { ... }
|
|
125
|
+
p data # => <ValidatePost200Response>
|
|
126
|
+
rescue Late::ApiError => e
|
|
127
|
+
puts "Error when calling ValidateApi->validate_post_with_http_info: #{e}"
|
|
128
|
+
end
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Parameters
|
|
132
|
+
|
|
133
|
+
| Name | Type | Description | Notes |
|
|
134
|
+
| ---- | ---- | ----------- | ----- |
|
|
135
|
+
| **validate_post_request** | [**ValidatePostRequest**](ValidatePostRequest.md) | | |
|
|
136
|
+
|
|
137
|
+
### Return type
|
|
138
|
+
|
|
139
|
+
[**ValidatePost200Response**](ValidatePost200Response.md)
|
|
140
|
+
|
|
141
|
+
### Authorization
|
|
142
|
+
|
|
143
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
144
|
+
|
|
145
|
+
### HTTP request headers
|
|
146
|
+
|
|
147
|
+
- **Content-Type**: application/json
|
|
148
|
+
- **Accept**: application/json
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## validate_post_length
|
|
152
|
+
|
|
153
|
+
> <ValidatePostLength200Response> validate_post_length(validate_post_length_request)
|
|
154
|
+
|
|
155
|
+
Validate post character count
|
|
156
|
+
|
|
157
|
+
Check weighted character count per platform and whether the text is within each platform's limit. Twitter/X uses weighted counting (URLs = 23 chars via t.co, emojis = 2 chars). All other platforms use plain character length. Returns counts and limits for all 15 supported platform variants.
|
|
158
|
+
|
|
159
|
+
### Examples
|
|
160
|
+
|
|
161
|
+
```ruby
|
|
162
|
+
require 'time'
|
|
163
|
+
require 'late-sdk'
|
|
164
|
+
# setup authorization
|
|
165
|
+
Late.configure do |config|
|
|
166
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
167
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
api_instance = Late::ValidateApi.new
|
|
171
|
+
validate_post_length_request = Late::ValidatePostLengthRequest.new({text: 'Check out https://zernio.com for scheduling posts!'}) # ValidatePostLengthRequest |
|
|
172
|
+
|
|
173
|
+
begin
|
|
174
|
+
# Validate post character count
|
|
175
|
+
result = api_instance.validate_post_length(validate_post_length_request)
|
|
176
|
+
p result
|
|
177
|
+
rescue Late::ApiError => e
|
|
178
|
+
puts "Error when calling ValidateApi->validate_post_length: #{e}"
|
|
179
|
+
end
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### Using the validate_post_length_with_http_info variant
|
|
183
|
+
|
|
184
|
+
This returns an Array which contains the response data, status code and headers.
|
|
185
|
+
|
|
186
|
+
> <Array(<ValidatePostLength200Response>, Integer, Hash)> validate_post_length_with_http_info(validate_post_length_request)
|
|
187
|
+
|
|
188
|
+
```ruby
|
|
189
|
+
begin
|
|
190
|
+
# Validate post character count
|
|
191
|
+
data, status_code, headers = api_instance.validate_post_length_with_http_info(validate_post_length_request)
|
|
192
|
+
p status_code # => 2xx
|
|
193
|
+
p headers # => { ... }
|
|
194
|
+
p data # => <ValidatePostLength200Response>
|
|
195
|
+
rescue Late::ApiError => e
|
|
196
|
+
puts "Error when calling ValidateApi->validate_post_length_with_http_info: #{e}"
|
|
197
|
+
end
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Parameters
|
|
201
|
+
|
|
202
|
+
| Name | Type | Description | Notes |
|
|
203
|
+
| ---- | ---- | ----------- | ----- |
|
|
204
|
+
| **validate_post_length_request** | [**ValidatePostLengthRequest**](ValidatePostLengthRequest.md) | | |
|
|
205
|
+
|
|
206
|
+
### Return type
|
|
207
|
+
|
|
208
|
+
[**ValidatePostLength200Response**](ValidatePostLength200Response.md)
|
|
209
|
+
|
|
210
|
+
### Authorization
|
|
211
|
+
|
|
212
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
213
|
+
|
|
214
|
+
### HTTP request headers
|
|
215
|
+
|
|
216
|
+
- **Content-Type**: application/json
|
|
217
|
+
- **Accept**: application/json
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## validate_subreddit
|
|
221
|
+
|
|
222
|
+
> <ValidateSubreddit200Response> validate_subreddit(name)
|
|
223
|
+
|
|
224
|
+
Check subreddit existence
|
|
225
|
+
|
|
226
|
+
Check if a subreddit exists and return basic info (title, subscriber count, NSFW status, post types allowed). Uses Reddit's public JSON API (no Reddit auth needed). Returns `exists: false` for private, banned, or nonexistent subreddits.
|
|
227
|
+
|
|
228
|
+
### Examples
|
|
229
|
+
|
|
230
|
+
```ruby
|
|
231
|
+
require 'time'
|
|
232
|
+
require 'late-sdk'
|
|
233
|
+
# setup authorization
|
|
234
|
+
Late.configure do |config|
|
|
235
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
236
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
api_instance = Late::ValidateApi.new
|
|
240
|
+
name = 'programming' # String | Subreddit name (with or without \"r/\" prefix)
|
|
241
|
+
|
|
242
|
+
begin
|
|
243
|
+
# Check subreddit existence
|
|
244
|
+
result = api_instance.validate_subreddit(name)
|
|
245
|
+
p result
|
|
246
|
+
rescue Late::ApiError => e
|
|
247
|
+
puts "Error when calling ValidateApi->validate_subreddit: #{e}"
|
|
248
|
+
end
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
#### Using the validate_subreddit_with_http_info variant
|
|
252
|
+
|
|
253
|
+
This returns an Array which contains the response data, status code and headers.
|
|
254
|
+
|
|
255
|
+
> <Array(<ValidateSubreddit200Response>, Integer, Hash)> validate_subreddit_with_http_info(name)
|
|
256
|
+
|
|
257
|
+
```ruby
|
|
258
|
+
begin
|
|
259
|
+
# Check subreddit existence
|
|
260
|
+
data, status_code, headers = api_instance.validate_subreddit_with_http_info(name)
|
|
261
|
+
p status_code # => 2xx
|
|
262
|
+
p headers # => { ... }
|
|
263
|
+
p data # => <ValidateSubreddit200Response>
|
|
264
|
+
rescue Late::ApiError => e
|
|
265
|
+
puts "Error when calling ValidateApi->validate_subreddit_with_http_info: #{e}"
|
|
266
|
+
end
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Parameters
|
|
270
|
+
|
|
271
|
+
| Name | Type | Description | Notes |
|
|
272
|
+
| ---- | ---- | ----------- | ----- |
|
|
273
|
+
| **name** | **String** | Subreddit name (with or without \"r/\" prefix) | |
|
|
274
|
+
|
|
275
|
+
### Return type
|
|
276
|
+
|
|
277
|
+
[**ValidateSubreddit200Response**](ValidateSubreddit200Response.md)
|
|
278
|
+
|
|
279
|
+
### Authorization
|
|
280
|
+
|
|
281
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
282
|
+
|
|
283
|
+
### HTTP request headers
|
|
284
|
+
|
|
285
|
+
- **Content-Type**: Not defined
|
|
286
|
+
- **Accept**: application/json
|
|
287
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Late::ValidateMedia200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **valid** | **Boolean** | | [optional] |
|
|
8
|
+
| **url** | **String** | | [optional] |
|
|
9
|
+
| **error** | **String** | Error message if valid is false | [optional] |
|
|
10
|
+
| **content_type** | **String** | | [optional] |
|
|
11
|
+
| **size** | **Integer** | File size in bytes | [optional] |
|
|
12
|
+
| **size_formatted** | **String** | | [optional] |
|
|
13
|
+
| **type** | **String** | | [optional] |
|
|
14
|
+
| **platform_limits** | [**Hash<String, ValidateMedia200ResponsePlatformLimitsValue>**](ValidateMedia200ResponsePlatformLimitsValue.md) | Per-platform size limit comparison (only present when size and type are known) | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'late-sdk'
|
|
20
|
+
|
|
21
|
+
instance = Late::ValidateMedia200Response.new(
|
|
22
|
+
valid: null,
|
|
23
|
+
url: null,
|
|
24
|
+
error: null,
|
|
25
|
+
content_type: image/jpeg,
|
|
26
|
+
size: null,
|
|
27
|
+
size_formatted: 245 KB,
|
|
28
|
+
type: null,
|
|
29
|
+
platform_limits: {"instagram":{"limit":8388608,"limitFormatted":"8.0 MB","withinLimit":true},"twitter":{"limit":5242880,"limitFormatted":"5.0 MB","withinLimit":true},"bluesky":{"limit":1000000,"limitFormatted":"977 KB","withinLimit":true}}
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Late::ValidateMedia200ResponsePlatformLimitsValue
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **limit** | **Integer** | Platform size limit in bytes | [optional] |
|
|
8
|
+
| **limit_formatted** | **String** | | [optional] |
|
|
9
|
+
| **within_limit** | **Boolean** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'late-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Late::ValidateMedia200ResponsePlatformLimitsValue.new(
|
|
17
|
+
limit: null,
|
|
18
|
+
limit_formatted: null,
|
|
19
|
+
within_limit: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Late::ValidateMediaRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **url** | **String** | Public media URL to validate | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'late-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Late::ValidateMediaRequest.new(
|
|
15
|
+
url: https://example.com/image.jpg
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Late::ValidatePost200Response
|
|
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::ValidatePost200Response.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'ValidatePost200ResponseOneOf',
|
|
18
|
+
# :'ValidatePost200ResponseOneOf1'
|
|
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::ValidatePost200Response.build(data)
|
|
32
|
+
# => #<ValidatePost200ResponseOneOf:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Late::ValidatePost200Response.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
|
+
- `ValidatePost200ResponseOneOf`
|
|
47
|
+
- `ValidatePost200ResponseOneOf1`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|