late-sdk 0.0.910 → 0.0.911
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 +3 -0
- data/docs/CreateCommentAutomationRequest.md +1 -1
- data/docs/DownloadTikTokVideo200Response.md +30 -0
- data/docs/DownloadTikTokVideo200ResponseFormatsInner.md +34 -0
- data/docs/LeadGenApi.md +2 -2
- data/docs/ToolsApi.md +83 -0
- data/lib/zernio-sdk/api/lead_gen_api.rb +10 -2
- data/lib/zernio-sdk/api/tools_api.rb +96 -0
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +22 -1
- data/lib/zernio-sdk/models/download_tik_tok_video200_response.rb +242 -0
- data/lib/zernio-sdk/models/download_tik_tok_video200_response_formats_inner.rb +219 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +124 -2
- data/spec/api/lead_gen_api_spec.rb +1 -1
- data/spec/api/tools_api_spec.rb +49 -0
- data/spec/models/download_tik_tok_video200_response_formats_inner_spec.rb +84 -0
- data/spec/models/download_tik_tok_video200_response_spec.rb +72 -0
- data/zernio-sdk-0.0.911.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.910.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: edac1fba99aced729cfa76dca03e53ad7397ed7c9d28f345e576a3268e12af16
|
|
4
|
+
data.tar.gz: 36a92f68f4ed4d22c21ae1e37d2889239a538e5d8ca973910294c29af6ef371f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a42683510b5d49ea01431072fc6777c2ba42eee6d4f5fd4ad6721cf474024882dabe672be2b6333a2b00eca9a19848971459a9016ba17ad035ccbd5bd458afa
|
|
7
|
+
data.tar.gz: b553108f68578830344d3b4386ea3168b9bf1ff92855f6089a5b50e96903897cb6b8339b2490f30174e6b1ae89dcd5e225a37fe7bdd6fa50196f4b1ec330afb8
|
data/README.md
CHANGED
|
@@ -628,6 +628,7 @@ Class | Method | HTTP request | Description
|
|
|
628
628
|
*Zernio::SequencesApi* | [**unenroll_contact**](docs/SequencesApi.md#unenroll_contact) | **DELETE** /v1/sequences/{sequenceId}/enroll/{contactId} | Unenroll contact
|
|
629
629
|
*Zernio::SequencesApi* | [**update_sequence**](docs/SequencesApi.md#update_sequence) | **PATCH** /v1/sequences/{sequenceId} | Update sequence
|
|
630
630
|
*Zernio::SlackApi* | [**list_slack_members**](docs/SlackApi.md#list_slack_members) | **GET** /v1/accounts/{accountId}/slack-members | List Slack workspace members
|
|
631
|
+
*Zernio::ToolsApi* | [**download_tik_tok_video**](docs/ToolsApi.md#download_tik_tok_video) | **GET** /v1/tools/tiktok/download | Download a TikTok video
|
|
631
632
|
*Zernio::TrackingTagsApi* | [**add_tracking_tag_shared_account**](docs/TrackingTagsApi.md#add_tracking_tag_shared_account) | **POST** /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Share with an ad account
|
|
632
633
|
*Zernio::TrackingTagsApi* | [**create_tracking_tag**](docs/TrackingTagsApi.md#create_tracking_tag) | **POST** /v1/accounts/{accountId}/tracking-tags | Create a tracking tag
|
|
633
634
|
*Zernio::TrackingTagsApi* | [**get_ad_tracking_tags**](docs/TrackingTagsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags
|
|
@@ -1276,6 +1277,8 @@ Class | Method | HTTP request | Description
|
|
|
1276
1277
|
- [Zernio::DiscordScheduledEvent](docs/DiscordScheduledEvent.md)
|
|
1277
1278
|
- [Zernio::DiscordScheduledEventEntityMetadata](docs/DiscordScheduledEventEntityMetadata.md)
|
|
1278
1279
|
- [Zernio::DmButton](docs/DmButton.md)
|
|
1280
|
+
- [Zernio::DownloadTikTokVideo200Response](docs/DownloadTikTokVideo200Response.md)
|
|
1281
|
+
- [Zernio::DownloadTikTokVideo200ResponseFormatsInner](docs/DownloadTikTokVideo200ResponseFormatsInner.md)
|
|
1279
1282
|
- [Zernio::DuplicateAd200Response](docs/DuplicateAd200Response.md)
|
|
1280
1283
|
- [Zernio::DuplicateAdCampaign200Response](docs/DuplicateAdCampaign200Response.md)
|
|
1281
1284
|
- [Zernio::DuplicateAdCampaignRequest](docs/DuplicateAdCampaignRequest.md)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| **account_id** | **String** | Instagram or Facebook account ID | |
|
|
9
9
|
| **trigger** | **String** | What fires the automation. 'comment' (keyword comment on a post) or 'story_reply' (keyword reply to an Instagram story). For 'story_reply', platformPostId is the story media id (omit for any story). | [optional][default to 'comment'] |
|
|
10
10
|
| **platform_post_id** | **String** | Platform media/post ID (or story media id when trigger=story_reply). Omit for an account-wide (any-post / any-story) automation. | [optional] |
|
|
11
|
-
| **post_id** | **String** | Zernio post ID. Optional and never required. Use it INSTEAD of platformPostId to bind a per-post automation to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. For a post already live on the platform, pass platformPostId alone and omit this. | [optional] |
|
|
11
|
+
| **post_id** | **String** | Zernio post ID (24 hexadecimal characters); platform IDs return 400. Optional and never required. Use it INSTEAD of platformPostId to bind a per-post automation to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. For a post already live on the platform, pass platformPostId alone and omit this. | [optional] |
|
|
12
12
|
| **post_title** | **String** | Post content snippet for display | [optional] |
|
|
13
13
|
| **name** | **String** | Automation label | |
|
|
14
14
|
| **keywords** | **Array<String>** | Trigger keywords (empty = any comment triggers) | [optional] |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Zernio::DownloadTikTokVideo200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **success** | **Boolean** | | |
|
|
8
|
+
| **title** | **String** | | |
|
|
9
|
+
| **format** | **String** | Selected format label for action=download. | [optional] |
|
|
10
|
+
| **download_url** | **String** | Media download URL for action=download. | [optional] |
|
|
11
|
+
| **duration** | **Float** | Duration in seconds for action=formats. | [optional] |
|
|
12
|
+
| **cover** | **String** | Thumbnail URL for action=formats. | [optional] |
|
|
13
|
+
| **formats** | [**Array<DownloadTikTokVideo200ResponseFormatsInner>**](DownloadTikTokVideo200ResponseFormatsInner.md) | Available formats for action=formats. | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zernio-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Zernio::DownloadTikTokVideo200Response.new(
|
|
21
|
+
success: null,
|
|
22
|
+
title: null,
|
|
23
|
+
format: null,
|
|
24
|
+
download_url: null,
|
|
25
|
+
duration: null,
|
|
26
|
+
cover: null,
|
|
27
|
+
formats: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Zernio::DownloadTikTokVideo200ResponseFormatsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **label** | **String** | | [optional] |
|
|
9
|
+
| **ext** | **String** | | [optional] |
|
|
10
|
+
| **type** | **String** | | [optional] |
|
|
11
|
+
| **height** | **Float** | | [optional] |
|
|
12
|
+
| **width** | **Float** | | [optional] |
|
|
13
|
+
| **fps** | **Float** | | [optional] |
|
|
14
|
+
| **has_audio** | **Boolean** | | [optional] |
|
|
15
|
+
| **has_video** | **Boolean** | | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'zernio-sdk'
|
|
21
|
+
|
|
22
|
+
instance = Zernio::DownloadTikTokVideo200ResponseFormatsInner.new(
|
|
23
|
+
id: null,
|
|
24
|
+
label: null,
|
|
25
|
+
ext: null,
|
|
26
|
+
type: null,
|
|
27
|
+
height: null,
|
|
28
|
+
width: null,
|
|
29
|
+
fps: null,
|
|
30
|
+
has_audio: null,
|
|
31
|
+
has_video: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
data/docs/LeadGenApi.md
CHANGED
|
@@ -474,7 +474,7 @@ opts = {
|
|
|
474
474
|
account_id: 'account_id_example', # String | Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
|
|
475
475
|
ad_account_id: 'ad_account_id_example', # String | LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
|
|
476
476
|
limit: 56, # Integer |
|
|
477
|
-
since:
|
|
477
|
+
since: 1757404800, # Integer | Unix seconds; only leads created at/after this timestamp. Millisecond timestamps return 400 with instructions to divide by 1000.
|
|
478
478
|
cursor: 'cursor_example' # String | Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
|
|
479
479
|
}
|
|
480
480
|
|
|
@@ -513,7 +513,7 @@ end
|
|
|
513
513
|
| **account_id** | **String** | Filter to a single connected account. LinkedIn ads accounts switch to the live fetch. | [optional] |
|
|
514
514
|
| **ad_account_id** | **String** | LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder). | [optional] |
|
|
515
515
|
| **limit** | **Integer** | | [optional][default to 25] |
|
|
516
|
-
| **since** | **Integer** | Unix seconds; only leads created at/after this timestamp. | [optional] |
|
|
516
|
+
| **since** | **Integer** | Unix seconds; only leads created at/after this timestamp. Millisecond timestamps return 400 with instructions to divide by 1000. | [optional] |
|
|
517
517
|
| **cursor** | **String** | Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset). | [optional] |
|
|
518
518
|
|
|
519
519
|
### Return type
|
data/docs/ToolsApi.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Zernio::ToolsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**download_tik_tok_video**](ToolsApi.md#download_tik_tok_video) | **GET** /v1/tools/tiktok/download | Download a TikTok video |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## download_tik_tok_video
|
|
11
|
+
|
|
12
|
+
> <DownloadTikTokVideo200Response> download_tik_tok_video(url, opts)
|
|
13
|
+
|
|
14
|
+
Download a TikTok video
|
|
15
|
+
|
|
16
|
+
Get a download URL or list available formats for a TikTok video. Requires Tools API access and uses the Tools API rate limit. Provider gateway failures and provider-side access blocks return 503; an unavailable video returns 404.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'zernio-sdk'
|
|
23
|
+
# setup authorization
|
|
24
|
+
Zernio.configure do |config|
|
|
25
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
26
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
api_instance = Zernio::ToolsApi.new
|
|
30
|
+
url = 'https://www.tiktok.com/@example/video/7412345678901234567' # String | TikTok video URL or numeric video ID.
|
|
31
|
+
opts = {
|
|
32
|
+
action: 'download', # String | Return a download URL or the available formats.
|
|
33
|
+
format_id: 'format_id_example' # String | Format ID from the formats response. Omit to select the first available format.
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
# Download a TikTok video
|
|
38
|
+
result = api_instance.download_tik_tok_video(url, opts)
|
|
39
|
+
p result
|
|
40
|
+
rescue Zernio::ApiError => e
|
|
41
|
+
puts "Error when calling ToolsApi->download_tik_tok_video: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using the download_tik_tok_video_with_http_info variant
|
|
46
|
+
|
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
|
48
|
+
|
|
49
|
+
> <Array(<DownloadTikTokVideo200Response>, Integer, Hash)> download_tik_tok_video_with_http_info(url, opts)
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
begin
|
|
53
|
+
# Download a TikTok video
|
|
54
|
+
data, status_code, headers = api_instance.download_tik_tok_video_with_http_info(url, opts)
|
|
55
|
+
p status_code # => 2xx
|
|
56
|
+
p headers # => { ... }
|
|
57
|
+
p data # => <DownloadTikTokVideo200Response>
|
|
58
|
+
rescue Zernio::ApiError => e
|
|
59
|
+
puts "Error when calling ToolsApi->download_tik_tok_video_with_http_info: #{e}"
|
|
60
|
+
end
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Notes |
|
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
|
67
|
+
| **url** | **String** | TikTok video URL or numeric video ID. | |
|
|
68
|
+
| **action** | **String** | Return a download URL or the available formats. | [optional][default to 'download'] |
|
|
69
|
+
| **format_id** | **String** | Format ID from the formats response. Omit to select the first available format. | [optional] |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**DownloadTikTokVideo200Response**](DownloadTikTokVideo200Response.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
@@ -474,7 +474,7 @@ module Zernio
|
|
|
474
474
|
# @option opts [String] :account_id Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
|
|
475
475
|
# @option opts [String] :ad_account_id LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
|
|
476
476
|
# @option opts [Integer] :limit (default to 25)
|
|
477
|
-
# @option opts [Integer] :since Unix seconds; only leads created at/after this timestamp.
|
|
477
|
+
# @option opts [Integer] :since Unix seconds; only leads created at/after this timestamp. Millisecond timestamps return 400 with instructions to divide by 1000.
|
|
478
478
|
# @option opts [String] :cursor Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
|
|
479
479
|
# @return [ListLeads200Response]
|
|
480
480
|
def list_leads(opts = {})
|
|
@@ -489,7 +489,7 @@ module Zernio
|
|
|
489
489
|
# @option opts [String] :account_id Filter to a single connected account. LinkedIn ads accounts switch to the live fetch.
|
|
490
490
|
# @option opts [String] :ad_account_id LinkedIn only: the LinkedIn ad account id whose responses to read (owner-scoped finder).
|
|
491
491
|
# @option opts [Integer] :limit (default to 25)
|
|
492
|
-
# @option opts [Integer] :since Unix seconds; only leads created at/after this timestamp.
|
|
492
|
+
# @option opts [Integer] :since Unix seconds; only leads created at/after this timestamp. Millisecond timestamps return 400 with instructions to divide by 1000.
|
|
493
493
|
# @option opts [String] :cursor Keyset cursor from a previous response's pagination.cursor (Meta: AdLead id; LinkedIn: numeric start offset).
|
|
494
494
|
# @return [Array<(ListLeads200Response, Integer, Hash)>] ListLeads200Response data, response status code and response headers
|
|
495
495
|
def list_leads_with_http_info(opts = {})
|
|
@@ -504,6 +504,14 @@ module Zernio
|
|
|
504
504
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LeadGenApi.list_leads, must be greater than or equal to 1.'
|
|
505
505
|
end
|
|
506
506
|
|
|
507
|
+
if @api_client.config.client_side_validation && !opts[:'since'].nil? && opts[:'since'] > 253402300799
|
|
508
|
+
fail ArgumentError, 'invalid value for "opts[:"since"]" when calling LeadGenApi.list_leads, must be smaller than or equal to 253402300799.'
|
|
509
|
+
end
|
|
510
|
+
|
|
511
|
+
if @api_client.config.client_side_validation && !opts[:'since'].nil? && opts[:'since'] < 1
|
|
512
|
+
fail ArgumentError, 'invalid value for "opts[:"since"]" when calling LeadGenApi.list_leads, must be greater than or equal to 1.'
|
|
513
|
+
end
|
|
514
|
+
|
|
507
515
|
# resource path
|
|
508
516
|
local_var_path = '/v1/ads/leads'
|
|
509
517
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Zernio
|
|
16
|
+
class ToolsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Download a TikTok video
|
|
23
|
+
# Get a download URL or list available formats for a TikTok video. Requires Tools API access and uses the Tools API rate limit. Provider gateway failures and provider-side access blocks return 503; an unavailable video returns 404.
|
|
24
|
+
# @param url [String] TikTok video URL or numeric video ID.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :action Return a download URL or the available formats. (default to 'download')
|
|
27
|
+
# @option opts [String] :format_id Format ID from the formats response. Omit to select the first available format.
|
|
28
|
+
# @return [DownloadTikTokVideo200Response]
|
|
29
|
+
def download_tik_tok_video(url, opts = {})
|
|
30
|
+
data, _status_code, _headers = download_tik_tok_video_with_http_info(url, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Download a TikTok video
|
|
35
|
+
# Get a download URL or list available formats for a TikTok video. Requires Tools API access and uses the Tools API rate limit. Provider gateway failures and provider-side access blocks return 503; an unavailable video returns 404.
|
|
36
|
+
# @param url [String] TikTok video URL or numeric video ID.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :action Return a download URL or the available formats. (default to 'download')
|
|
39
|
+
# @option opts [String] :format_id Format ID from the formats response. Omit to select the first available format.
|
|
40
|
+
# @return [Array<(DownloadTikTokVideo200Response, Integer, Hash)>] DownloadTikTokVideo200Response data, response status code and response headers
|
|
41
|
+
def download_tik_tok_video_with_http_info(url, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: ToolsApi.download_tik_tok_video ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'url' is set
|
|
46
|
+
if @api_client.config.client_side_validation && url.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'url' when calling ToolsApi.download_tik_tok_video"
|
|
48
|
+
end
|
|
49
|
+
allowable_values = ["download", "formats"]
|
|
50
|
+
if @api_client.config.client_side_validation && opts[:'action'] && !allowable_values.include?(opts[:'action'])
|
|
51
|
+
fail ArgumentError, "invalid value for \"action\", must be one of #{allowable_values}"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/v1/tools/tiktok/download'
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
query_params[:'url'] = url
|
|
59
|
+
query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil?
|
|
60
|
+
query_params[:'formatId'] = opts[:'format_id'] if !opts[:'format_id'].nil?
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body]
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'DownloadTikTokVideo200Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"ToolsApi.download_tik_tok_video",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: ToolsApi#download_tik_tok_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -26,7 +26,7 @@ module Zernio
|
|
|
26
26
|
# Platform media/post ID (or story media id when trigger=story_reply). Omit for an account-wide (any-post / any-story) automation.
|
|
27
27
|
attr_accessor :platform_post_id
|
|
28
28
|
|
|
29
|
-
# Zernio post ID. Optional and never required. Use it INSTEAD of platformPostId to bind a per-post automation to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. For a post already live on the platform, pass platformPostId alone and omit this.
|
|
29
|
+
# Zernio post ID (24 hexadecimal characters); platform IDs return 400. Optional and never required. Use it INSTEAD of platformPostId to bind a per-post automation to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. For a post already live on the platform, pass platformPostId alone and omit this.
|
|
30
30
|
attr_accessor :post_id
|
|
31
31
|
|
|
32
32
|
# Post content snippet for display
|
|
@@ -335,6 +335,11 @@ module Zernio
|
|
|
335
335
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
336
336
|
end
|
|
337
337
|
|
|
338
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
339
|
+
if !@post_id.nil? && @post_id !~ pattern
|
|
340
|
+
invalid_properties.push("invalid value for \"post_id\", must conform to the pattern #{pattern}.")
|
|
341
|
+
end
|
|
342
|
+
|
|
338
343
|
if @name.nil?
|
|
339
344
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
340
345
|
end
|
|
@@ -382,6 +387,7 @@ module Zernio
|
|
|
382
387
|
return false if @account_id.nil?
|
|
383
388
|
trigger_validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
|
|
384
389
|
return false unless trigger_validator.valid?(@trigger)
|
|
390
|
+
return false if !@post_id.nil? && @post_id !~ Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
385
391
|
return false if @name.nil?
|
|
386
392
|
match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
|
|
387
393
|
return false unless match_mode_validator.valid?(@match_mode)
|
|
@@ -426,6 +432,21 @@ module Zernio
|
|
|
426
432
|
@trigger = trigger
|
|
427
433
|
end
|
|
428
434
|
|
|
435
|
+
# Custom attribute writer method with validation
|
|
436
|
+
# @param [Object] post_id Value to be assigned
|
|
437
|
+
def post_id=(post_id)
|
|
438
|
+
if post_id.nil?
|
|
439
|
+
fail ArgumentError, 'post_id cannot be nil'
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
443
|
+
if post_id !~ pattern
|
|
444
|
+
fail ArgumentError, "invalid value for \"post_id\", must conform to the pattern #{pattern}."
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
@post_id = post_id
|
|
448
|
+
end
|
|
449
|
+
|
|
429
450
|
# Custom attribute writer method with validation
|
|
430
451
|
# @param [Object] name Value to be assigned
|
|
431
452
|
def name=(name)
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class DownloadTikTokVideo200Response < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :title
|
|
21
|
+
|
|
22
|
+
# Selected format label for action=download.
|
|
23
|
+
attr_accessor :format
|
|
24
|
+
|
|
25
|
+
# Media download URL for action=download.
|
|
26
|
+
attr_accessor :download_url
|
|
27
|
+
|
|
28
|
+
# Duration in seconds for action=formats.
|
|
29
|
+
attr_accessor :duration
|
|
30
|
+
|
|
31
|
+
# Thumbnail URL for action=formats.
|
|
32
|
+
attr_accessor :cover
|
|
33
|
+
|
|
34
|
+
# Available formats for action=formats.
|
|
35
|
+
attr_accessor :formats
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'success' => :'success',
|
|
41
|
+
:'title' => :'title',
|
|
42
|
+
:'format' => :'format',
|
|
43
|
+
:'download_url' => :'downloadUrl',
|
|
44
|
+
:'duration' => :'duration',
|
|
45
|
+
:'cover' => :'cover',
|
|
46
|
+
:'formats' => :'formats'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns attribute mapping this model knows about
|
|
51
|
+
def self.acceptable_attribute_map
|
|
52
|
+
attribute_map
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
def self.acceptable_attributes
|
|
57
|
+
acceptable_attribute_map.values
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'success' => :'Boolean',
|
|
64
|
+
:'title' => :'String',
|
|
65
|
+
:'format' => :'String',
|
|
66
|
+
:'download_url' => :'String',
|
|
67
|
+
:'duration' => :'Float',
|
|
68
|
+
:'cover' => :'String',
|
|
69
|
+
:'formats' => :'Array<DownloadTikTokVideo200ResponseFormatsInner>'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# List of attributes with nullable: true
|
|
74
|
+
def self.openapi_nullable
|
|
75
|
+
Set.new([
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Initializes the object
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
def initialize(attributes = {})
|
|
82
|
+
if (!attributes.is_a?(Hash))
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DownloadTikTokVideo200Response` initialize method"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DownloadTikTokVideo200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'success')
|
|
96
|
+
self.success = attributes[:'success']
|
|
97
|
+
else
|
|
98
|
+
self.success = nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'title')
|
|
102
|
+
self.title = attributes[:'title']
|
|
103
|
+
else
|
|
104
|
+
self.title = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'format')
|
|
108
|
+
self.format = attributes[:'format']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'download_url')
|
|
112
|
+
self.download_url = attributes[:'download_url']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'duration')
|
|
116
|
+
self.duration = attributes[:'duration']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'cover')
|
|
120
|
+
self.cover = attributes[:'cover']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'formats')
|
|
124
|
+
if (value = attributes[:'formats']).is_a?(Array)
|
|
125
|
+
self.formats = value
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
131
|
+
# @return Array for valid properties with the reasons
|
|
132
|
+
def list_invalid_properties
|
|
133
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
134
|
+
invalid_properties = Array.new
|
|
135
|
+
if @success.nil?
|
|
136
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if @title.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
invalid_properties
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Check to see if the all the properties in the model are valid
|
|
147
|
+
# @return true if the model is valid
|
|
148
|
+
def valid?
|
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
150
|
+
return false if @success.nil?
|
|
151
|
+
return false if @title.nil?
|
|
152
|
+
true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] success Value to be assigned
|
|
157
|
+
def success=(success)
|
|
158
|
+
if success.nil?
|
|
159
|
+
fail ArgumentError, 'success cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@success = success
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Custom attribute writer method with validation
|
|
166
|
+
# @param [Object] title Value to be assigned
|
|
167
|
+
def title=(title)
|
|
168
|
+
if title.nil?
|
|
169
|
+
fail ArgumentError, 'title cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@title = title
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Checks equality by comparing each attribute.
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def ==(o)
|
|
178
|
+
return true if self.equal?(o)
|
|
179
|
+
self.class == o.class &&
|
|
180
|
+
success == o.success &&
|
|
181
|
+
title == o.title &&
|
|
182
|
+
format == o.format &&
|
|
183
|
+
download_url == o.download_url &&
|
|
184
|
+
duration == o.duration &&
|
|
185
|
+
cover == o.cover &&
|
|
186
|
+
formats == o.formats
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @see the `==` method
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def eql?(o)
|
|
192
|
+
self == o
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Calculates hash code according to all attributes.
|
|
196
|
+
# @return [Integer] Hash code
|
|
197
|
+
def hash
|
|
198
|
+
[success, title, format, download_url, duration, cover, formats].hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Builds the object from hash
|
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
203
|
+
# @return [Object] Returns the model itself
|
|
204
|
+
def self.build_from_hash(attributes)
|
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
207
|
+
transformed_hash = {}
|
|
208
|
+
openapi_types.each_pair do |key, type|
|
|
209
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = nil
|
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
212
|
+
# check to ensure the input is an array given that the attribute
|
|
213
|
+
# is documented as an array but the input is not
|
|
214
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
215
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
216
|
+
end
|
|
217
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
new(transformed_hash)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|