late-sdk 0.0.103 → 0.0.104
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 +0 -52
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +0 -41
- data/openapi.yaml +1 -731
- data/zernio-sdk-0.0.104.gem +0 -0
- metadata +2 -166
- data/docs/CaptionResponse.md +0 -18
- data/docs/CheckInstagramHashtags200Response.md +0 -22
- data/docs/CheckInstagramHashtags200ResponseResultsInner.md +0 -24
- data/docs/CheckInstagramHashtags200ResponseSummary.md +0 -22
- data/docs/CheckInstagramHashtagsRequest.md +0 -18
- data/docs/DownloadBlueskyMedia200Response.md +0 -26
- data/docs/DownloadFacebookVideo200Response.md +0 -24
- data/docs/DownloadFormat.md +0 -26
- data/docs/DownloadInstagramMedia200Response.md +0 -22
- data/docs/DownloadResponse.md +0 -26
- data/docs/DownloadTikTokVideo200Response.md +0 -24
- data/docs/DownloadTikTokVideo200ResponseFormatsInner.md +0 -22
- data/docs/DownloadYouTubeVideo200Response.md +0 -24
- data/docs/DownloadYouTubeVideo200ResponseFormatsInner.md +0 -28
- data/docs/GetYouTubeTranscript200Response.md +0 -26
- data/docs/GetYouTubeTranscript200ResponseSegmentsInner.md +0 -22
- data/docs/HashtagCheckResponse.md +0 -18
- data/docs/HashtagInfo.md +0 -22
- data/docs/ToolsApi.md +0 -663
- data/docs/TranscriptResponse.md +0 -22
- data/docs/TranscriptSegment.md +0 -22
- data/docs/ValidateApi.md +0 -287
- data/docs/ValidateMedia200Response.md +0 -32
- data/docs/ValidateMedia200ResponsePlatformLimitsValue.md +0 -22
- data/docs/ValidateMediaRequest.md +0 -18
- data/docs/ValidatePost200Response.md +0 -49
- data/docs/ValidatePost200ResponseOneOf.md +0 -22
- data/docs/ValidatePost200ResponseOneOf1.md +0 -22
- data/docs/ValidatePost200ResponseOneOf1ErrorsInner.md +0 -20
- data/docs/ValidatePost200ResponseOneOfWarningsInner.md +0 -20
- data/docs/ValidatePostLength200Response.md +0 -20
- data/docs/ValidatePostLength200ResponsePlatformsValue.md +0 -22
- data/docs/ValidatePostLengthRequest.md +0 -18
- data/docs/ValidatePostRequest.md +0 -22
- data/docs/ValidatePostRequestMediaItemsInner.md +0 -20
- data/docs/ValidatePostRequestPlatformsInner.md +0 -24
- data/docs/ValidatePostRequestPlatformsInnerCustomMediaInner.md +0 -20
- data/docs/ValidateSubreddit200Response.md +0 -49
- data/docs/ValidateSubreddit200ResponseOneOf.md +0 -20
- data/docs/ValidateSubreddit200ResponseOneOf1.md +0 -20
- data/docs/ValidateSubreddit200ResponseOneOfSubreddit.md +0 -32
- data/lib/late-sdk/api/tools_api.rb +0 -649
- data/lib/late-sdk/api/validate_api.rb +0 -290
- data/lib/late-sdk/models/caption_response.rb +0 -147
- data/lib/late-sdk/models/check_instagram_hashtags200_response.rb +0 -167
- data/lib/late-sdk/models/check_instagram_hashtags200_response_results_inner.rb +0 -208
- data/lib/late-sdk/models/check_instagram_hashtags200_response_summary.rb +0 -165
- data/lib/late-sdk/models/check_instagram_hashtags_request.rb +0 -175
- data/lib/late-sdk/models/download_bluesky_media200_response.rb +0 -183
- data/lib/late-sdk/models/download_facebook_video200_response.rb +0 -174
- data/lib/late-sdk/models/download_format.rb +0 -183
- data/lib/late-sdk/models/download_instagram_media200_response.rb +0 -165
- data/lib/late-sdk/models/download_response.rb +0 -185
- data/lib/late-sdk/models/download_tik_tok_video200_response.rb +0 -176
- data/lib/late-sdk/models/download_tik_tok_video200_response_formats_inner.rb +0 -165
- data/lib/late-sdk/models/download_you_tube_video200_response.rb +0 -176
- data/lib/late-sdk/models/download_you_tube_video200_response_formats_inner.rb +0 -192
- data/lib/late-sdk/models/get_you_tube_transcript200_response.rb +0 -185
- data/lib/late-sdk/models/get_you_tube_transcript200_response_segments_inner.rb +0 -165
- data/lib/late-sdk/models/hashtag_check_response.rb +0 -149
- data/lib/late-sdk/models/hashtag_info.rb +0 -199
- data/lib/late-sdk/models/transcript_response.rb +0 -167
- data/lib/late-sdk/models/transcript_segment.rb +0 -165
- data/lib/late-sdk/models/validate_media200_response.rb +0 -249
- data/lib/late-sdk/models/validate_media200_response_platform_limits_value.rb +0 -166
- data/lib/late-sdk/models/validate_media_request.rb +0 -165
- data/lib/late-sdk/models/validate_post200_response.rb +0 -104
- data/lib/late-sdk/models/validate_post200_response_one_of.rb +0 -168
- data/lib/late-sdk/models/validate_post200_response_one_of1.rb +0 -170
- data/lib/late-sdk/models/validate_post200_response_one_of1_errors_inner.rb +0 -156
- data/lib/late-sdk/models/validate_post200_response_one_of_warnings_inner.rb +0 -156
- data/lib/late-sdk/models/validate_post_length200_response.rb +0 -158
- data/lib/late-sdk/models/validate_post_length200_response_platforms_value.rb +0 -168
- data/lib/late-sdk/models/validate_post_length_request.rb +0 -165
- data/lib/late-sdk/models/validate_post_request.rb +0 -189
- data/lib/late-sdk/models/validate_post_request_media_items_inner.rb +0 -190
- data/lib/late-sdk/models/validate_post_request_platforms_inner.rb +0 -217
- data/lib/late-sdk/models/validate_post_request_platforms_inner_custom_media_inner.rb +0 -190
- data/lib/late-sdk/models/validate_subreddit200_response.rb +0 -104
- data/lib/late-sdk/models/validate_subreddit200_response_one_of.rb +0 -157
- data/lib/late-sdk/models/validate_subreddit200_response_one_of1.rb +0 -157
- data/lib/late-sdk/models/validate_subreddit200_response_one_of_subreddit.rb +0 -244
- data/spec/api/tools_api_spec.rb +0 -152
- data/spec/api/validate_api_spec.rb +0 -83
- data/spec/models/caption_response_spec.rb +0 -36
- data/spec/models/check_instagram_hashtags200_response_results_inner_spec.rb +0 -58
- data/spec/models/check_instagram_hashtags200_response_spec.rb +0 -48
- data/spec/models/check_instagram_hashtags200_response_summary_spec.rb +0 -48
- data/spec/models/check_instagram_hashtags_request_spec.rb +0 -36
- data/spec/models/download_bluesky_media200_response_spec.rb +0 -60
- data/spec/models/download_facebook_video200_response_spec.rb +0 -54
- data/spec/models/download_format_spec.rb +0 -60
- data/spec/models/download_instagram_media200_response_spec.rb +0 -48
- data/spec/models/download_response_spec.rb +0 -60
- data/spec/models/download_tik_tok_video200_response_formats_inner_spec.rb +0 -48
- data/spec/models/download_tik_tok_video200_response_spec.rb +0 -54
- data/spec/models/download_you_tube_video200_response_formats_inner_spec.rb +0 -66
- data/spec/models/download_you_tube_video200_response_spec.rb +0 -54
- data/spec/models/get_you_tube_transcript200_response_segments_inner_spec.rb +0 -48
- data/spec/models/get_you_tube_transcript200_response_spec.rb +0 -60
- data/spec/models/hashtag_check_response_spec.rb +0 -36
- data/spec/models/hashtag_info_spec.rb +0 -52
- data/spec/models/transcript_response_spec.rb +0 -48
- data/spec/models/transcript_segment_spec.rb +0 -48
- data/spec/models/validate_media200_response_platform_limits_value_spec.rb +0 -48
- data/spec/models/validate_media200_response_spec.rb +0 -82
- data/spec/models/validate_media_request_spec.rb +0 -36
- data/spec/models/validate_post200_response_one_of1_errors_inner_spec.rb +0 -42
- data/spec/models/validate_post200_response_one_of1_spec.rb +0 -48
- data/spec/models/validate_post200_response_one_of_spec.rb +0 -48
- data/spec/models/validate_post200_response_one_of_warnings_inner_spec.rb +0 -42
- data/spec/models/validate_post200_response_spec.rb +0 -32
- data/spec/models/validate_post_length200_response_platforms_value_spec.rb +0 -48
- data/spec/models/validate_post_length200_response_spec.rb +0 -42
- data/spec/models/validate_post_length_request_spec.rb +0 -36
- data/spec/models/validate_post_request_media_items_inner_spec.rb +0 -46
- data/spec/models/validate_post_request_platforms_inner_custom_media_inner_spec.rb +0 -46
- data/spec/models/validate_post_request_platforms_inner_spec.rb +0 -58
- data/spec/models/validate_post_request_spec.rb +0 -48
- data/spec/models/validate_subreddit200_response_one_of1_spec.rb +0 -42
- data/spec/models/validate_subreddit200_response_one_of_spec.rb +0 -42
- data/spec/models/validate_subreddit200_response_one_of_subreddit_spec.rb +0 -82
- data/spec/models/validate_subreddit200_response_spec.rb +0 -32
- data/zernio-sdk-0.0.103.gem +0 -0
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Zernio API
|
|
3
|
-
|
|
4
|
-
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.1
|
|
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 Late
|
|
16
|
-
class ValidateApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Validate media URL
|
|
23
|
-
# 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.
|
|
24
|
-
# @param validate_media_request [ValidateMediaRequest]
|
|
25
|
-
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [ValidateMedia200Response]
|
|
27
|
-
def validate_media(validate_media_request, opts = {})
|
|
28
|
-
data, _status_code, _headers = validate_media_with_http_info(validate_media_request, opts)
|
|
29
|
-
data
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Validate media URL
|
|
33
|
-
# 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.
|
|
34
|
-
# @param validate_media_request [ValidateMediaRequest]
|
|
35
|
-
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(ValidateMedia200Response, Integer, Hash)>] ValidateMedia200Response data, response status code and response headers
|
|
37
|
-
def validate_media_with_http_info(validate_media_request, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: ValidateApi.validate_media ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'validate_media_request' is set
|
|
42
|
-
if @api_client.config.client_side_validation && validate_media_request.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'validate_media_request' when calling ValidateApi.validate_media"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '/v1/tools/validate/media'
|
|
47
|
-
|
|
48
|
-
# query parameters
|
|
49
|
-
query_params = opts[:query_params] || {}
|
|
50
|
-
|
|
51
|
-
# header parameters
|
|
52
|
-
header_params = opts[:header_params] || {}
|
|
53
|
-
# HTTP header 'Accept' (if needed)
|
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
-
# HTTP header 'Content-Type'
|
|
56
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
-
if !content_type.nil?
|
|
58
|
-
header_params['Content-Type'] = content_type
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# form parameters
|
|
62
|
-
form_params = opts[:form_params] || {}
|
|
63
|
-
|
|
64
|
-
# http body (model)
|
|
65
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_media_request)
|
|
66
|
-
|
|
67
|
-
# return_type
|
|
68
|
-
return_type = opts[:debug_return_type] || 'ValidateMedia200Response'
|
|
69
|
-
|
|
70
|
-
# auth_names
|
|
71
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
72
|
-
|
|
73
|
-
new_options = opts.merge(
|
|
74
|
-
:operation => :"ValidateApi.validate_media",
|
|
75
|
-
:header_params => header_params,
|
|
76
|
-
:query_params => query_params,
|
|
77
|
-
:form_params => form_params,
|
|
78
|
-
:body => post_body,
|
|
79
|
-
:auth_names => auth_names,
|
|
80
|
-
:return_type => return_type
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
-
if @api_client.config.debugging
|
|
85
|
-
@api_client.config.logger.debug "API called: ValidateApi#validate_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
-
end
|
|
87
|
-
return data, status_code, headers
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# Validate post content
|
|
91
|
-
# 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).
|
|
92
|
-
# @param validate_post_request [ValidatePostRequest]
|
|
93
|
-
# @param [Hash] opts the optional parameters
|
|
94
|
-
# @return [ValidatePost200Response]
|
|
95
|
-
def validate_post(validate_post_request, opts = {})
|
|
96
|
-
data, _status_code, _headers = validate_post_with_http_info(validate_post_request, opts)
|
|
97
|
-
data
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Validate post content
|
|
101
|
-
# 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).
|
|
102
|
-
# @param validate_post_request [ValidatePostRequest]
|
|
103
|
-
# @param [Hash] opts the optional parameters
|
|
104
|
-
# @return [Array<(ValidatePost200Response, Integer, Hash)>] ValidatePost200Response data, response status code and response headers
|
|
105
|
-
def validate_post_with_http_info(validate_post_request, opts = {})
|
|
106
|
-
if @api_client.config.debugging
|
|
107
|
-
@api_client.config.logger.debug 'Calling API: ValidateApi.validate_post ...'
|
|
108
|
-
end
|
|
109
|
-
# verify the required parameter 'validate_post_request' is set
|
|
110
|
-
if @api_client.config.client_side_validation && validate_post_request.nil?
|
|
111
|
-
fail ArgumentError, "Missing the required parameter 'validate_post_request' when calling ValidateApi.validate_post"
|
|
112
|
-
end
|
|
113
|
-
# resource path
|
|
114
|
-
local_var_path = '/v1/tools/validate/post'
|
|
115
|
-
|
|
116
|
-
# query parameters
|
|
117
|
-
query_params = opts[:query_params] || {}
|
|
118
|
-
|
|
119
|
-
# header parameters
|
|
120
|
-
header_params = opts[:header_params] || {}
|
|
121
|
-
# HTTP header 'Accept' (if needed)
|
|
122
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
-
# HTTP header 'Content-Type'
|
|
124
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
125
|
-
if !content_type.nil?
|
|
126
|
-
header_params['Content-Type'] = content_type
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# form parameters
|
|
130
|
-
form_params = opts[:form_params] || {}
|
|
131
|
-
|
|
132
|
-
# http body (model)
|
|
133
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_post_request)
|
|
134
|
-
|
|
135
|
-
# return_type
|
|
136
|
-
return_type = opts[:debug_return_type] || 'ValidatePost200Response'
|
|
137
|
-
|
|
138
|
-
# auth_names
|
|
139
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
140
|
-
|
|
141
|
-
new_options = opts.merge(
|
|
142
|
-
:operation => :"ValidateApi.validate_post",
|
|
143
|
-
:header_params => header_params,
|
|
144
|
-
:query_params => query_params,
|
|
145
|
-
:form_params => form_params,
|
|
146
|
-
:body => post_body,
|
|
147
|
-
:auth_names => auth_names,
|
|
148
|
-
:return_type => return_type
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
-
if @api_client.config.debugging
|
|
153
|
-
@api_client.config.logger.debug "API called: ValidateApi#validate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
-
end
|
|
155
|
-
return data, status_code, headers
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
# Validate post character count
|
|
159
|
-
# 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.
|
|
160
|
-
# @param validate_post_length_request [ValidatePostLengthRequest]
|
|
161
|
-
# @param [Hash] opts the optional parameters
|
|
162
|
-
# @return [ValidatePostLength200Response]
|
|
163
|
-
def validate_post_length(validate_post_length_request, opts = {})
|
|
164
|
-
data, _status_code, _headers = validate_post_length_with_http_info(validate_post_length_request, opts)
|
|
165
|
-
data
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# Validate post character count
|
|
169
|
-
# 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.
|
|
170
|
-
# @param validate_post_length_request [ValidatePostLengthRequest]
|
|
171
|
-
# @param [Hash] opts the optional parameters
|
|
172
|
-
# @return [Array<(ValidatePostLength200Response, Integer, Hash)>] ValidatePostLength200Response data, response status code and response headers
|
|
173
|
-
def validate_post_length_with_http_info(validate_post_length_request, opts = {})
|
|
174
|
-
if @api_client.config.debugging
|
|
175
|
-
@api_client.config.logger.debug 'Calling API: ValidateApi.validate_post_length ...'
|
|
176
|
-
end
|
|
177
|
-
# verify the required parameter 'validate_post_length_request' is set
|
|
178
|
-
if @api_client.config.client_side_validation && validate_post_length_request.nil?
|
|
179
|
-
fail ArgumentError, "Missing the required parameter 'validate_post_length_request' when calling ValidateApi.validate_post_length"
|
|
180
|
-
end
|
|
181
|
-
# resource path
|
|
182
|
-
local_var_path = '/v1/tools/validate/post-length'
|
|
183
|
-
|
|
184
|
-
# query parameters
|
|
185
|
-
query_params = opts[:query_params] || {}
|
|
186
|
-
|
|
187
|
-
# header parameters
|
|
188
|
-
header_params = opts[:header_params] || {}
|
|
189
|
-
# HTTP header 'Accept' (if needed)
|
|
190
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
-
# HTTP header 'Content-Type'
|
|
192
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
193
|
-
if !content_type.nil?
|
|
194
|
-
header_params['Content-Type'] = content_type
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
# form parameters
|
|
198
|
-
form_params = opts[:form_params] || {}
|
|
199
|
-
|
|
200
|
-
# http body (model)
|
|
201
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_post_length_request)
|
|
202
|
-
|
|
203
|
-
# return_type
|
|
204
|
-
return_type = opts[:debug_return_type] || 'ValidatePostLength200Response'
|
|
205
|
-
|
|
206
|
-
# auth_names
|
|
207
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
208
|
-
|
|
209
|
-
new_options = opts.merge(
|
|
210
|
-
:operation => :"ValidateApi.validate_post_length",
|
|
211
|
-
:header_params => header_params,
|
|
212
|
-
:query_params => query_params,
|
|
213
|
-
:form_params => form_params,
|
|
214
|
-
:body => post_body,
|
|
215
|
-
:auth_names => auth_names,
|
|
216
|
-
:return_type => return_type
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
220
|
-
if @api_client.config.debugging
|
|
221
|
-
@api_client.config.logger.debug "API called: ValidateApi#validate_post_length\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
222
|
-
end
|
|
223
|
-
return data, status_code, headers
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
# Check subreddit existence
|
|
227
|
-
# 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.
|
|
228
|
-
# @param name [String] Subreddit name (with or without \"r/\" prefix)
|
|
229
|
-
# @param [Hash] opts the optional parameters
|
|
230
|
-
# @return [ValidateSubreddit200Response]
|
|
231
|
-
def validate_subreddit(name, opts = {})
|
|
232
|
-
data, _status_code, _headers = validate_subreddit_with_http_info(name, opts)
|
|
233
|
-
data
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
# Check subreddit existence
|
|
237
|
-
# 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.
|
|
238
|
-
# @param name [String] Subreddit name (with or without \"r/\" prefix)
|
|
239
|
-
# @param [Hash] opts the optional parameters
|
|
240
|
-
# @return [Array<(ValidateSubreddit200Response, Integer, Hash)>] ValidateSubreddit200Response data, response status code and response headers
|
|
241
|
-
def validate_subreddit_with_http_info(name, opts = {})
|
|
242
|
-
if @api_client.config.debugging
|
|
243
|
-
@api_client.config.logger.debug 'Calling API: ValidateApi.validate_subreddit ...'
|
|
244
|
-
end
|
|
245
|
-
# verify the required parameter 'name' is set
|
|
246
|
-
if @api_client.config.client_side_validation && name.nil?
|
|
247
|
-
fail ArgumentError, "Missing the required parameter 'name' when calling ValidateApi.validate_subreddit"
|
|
248
|
-
end
|
|
249
|
-
# resource path
|
|
250
|
-
local_var_path = '/v1/tools/validate/subreddit'
|
|
251
|
-
|
|
252
|
-
# query parameters
|
|
253
|
-
query_params = opts[:query_params] || {}
|
|
254
|
-
query_params[:'name'] = name
|
|
255
|
-
|
|
256
|
-
# header parameters
|
|
257
|
-
header_params = opts[:header_params] || {}
|
|
258
|
-
# HTTP header 'Accept' (if needed)
|
|
259
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
260
|
-
|
|
261
|
-
# form parameters
|
|
262
|
-
form_params = opts[:form_params] || {}
|
|
263
|
-
|
|
264
|
-
# http body (model)
|
|
265
|
-
post_body = opts[:debug_body]
|
|
266
|
-
|
|
267
|
-
# return_type
|
|
268
|
-
return_type = opts[:debug_return_type] || 'ValidateSubreddit200Response'
|
|
269
|
-
|
|
270
|
-
# auth_names
|
|
271
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
272
|
-
|
|
273
|
-
new_options = opts.merge(
|
|
274
|
-
:operation => :"ValidateApi.validate_subreddit",
|
|
275
|
-
:header_params => header_params,
|
|
276
|
-
:query_params => query_params,
|
|
277
|
-
:form_params => form_params,
|
|
278
|
-
:body => post_body,
|
|
279
|
-
:auth_names => auth_names,
|
|
280
|
-
:return_type => return_type
|
|
281
|
-
)
|
|
282
|
-
|
|
283
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
284
|
-
if @api_client.config.debugging
|
|
285
|
-
@api_client.config.logger.debug "API called: ValidateApi#validate_subreddit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
286
|
-
end
|
|
287
|
-
return data, status_code, headers
|
|
288
|
-
end
|
|
289
|
-
end
|
|
290
|
-
end
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Zernio API
|
|
3
|
-
|
|
4
|
-
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.1
|
|
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 Late
|
|
17
|
-
class CaptionResponse < ApiModelBase
|
|
18
|
-
attr_accessor :caption
|
|
19
|
-
|
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
-
def self.attribute_map
|
|
22
|
-
{
|
|
23
|
-
:'caption' => :'caption'
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Returns attribute mapping this model knows about
|
|
28
|
-
def self.acceptable_attribute_map
|
|
29
|
-
attribute_map
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Returns all the JSON keys this model knows about
|
|
33
|
-
def self.acceptable_attributes
|
|
34
|
-
acceptable_attribute_map.values
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Attribute type mapping.
|
|
38
|
-
def self.openapi_types
|
|
39
|
-
{
|
|
40
|
-
:'caption' => :'String'
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# List of attributes with nullable: true
|
|
45
|
-
def self.openapi_nullable
|
|
46
|
-
Set.new([
|
|
47
|
-
])
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Initializes the object
|
|
51
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
-
def initialize(attributes = {})
|
|
53
|
-
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CaptionResponse` initialize method"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CaptionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
-
end
|
|
63
|
-
h[k.to_sym] = v
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if attributes.key?(:'caption')
|
|
67
|
-
self.caption = attributes[:'caption']
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
-
# @return Array for valid properties with the reasons
|
|
73
|
-
def list_invalid_properties
|
|
74
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
-
invalid_properties = Array.new
|
|
76
|
-
invalid_properties
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Check to see if the all the properties in the model are valid
|
|
80
|
-
# @return true if the model is valid
|
|
81
|
-
def valid?
|
|
82
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
-
true
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# Checks equality by comparing each attribute.
|
|
87
|
-
# @param [Object] Object to be compared
|
|
88
|
-
def ==(o)
|
|
89
|
-
return true if self.equal?(o)
|
|
90
|
-
self.class == o.class &&
|
|
91
|
-
caption == o.caption
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# @see the `==` method
|
|
95
|
-
# @param [Object] Object to be compared
|
|
96
|
-
def eql?(o)
|
|
97
|
-
self == o
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Calculates hash code according to all attributes.
|
|
101
|
-
# @return [Integer] Hash code
|
|
102
|
-
def hash
|
|
103
|
-
[caption].hash
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# Builds the object from hash
|
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
-
# @return [Object] Returns the model itself
|
|
109
|
-
def self.build_from_hash(attributes)
|
|
110
|
-
return nil unless attributes.is_a?(Hash)
|
|
111
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
-
transformed_hash = {}
|
|
113
|
-
openapi_types.each_pair do |key, type|
|
|
114
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
-
transformed_hash["#{key}"] = nil
|
|
116
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
-
# check to ensure the input is an array given that the attribute
|
|
118
|
-
# is documented as an array but the input is not
|
|
119
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
-
end
|
|
122
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
-
end
|
|
125
|
-
end
|
|
126
|
-
new(transformed_hash)
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# Returns the object in the form of hash
|
|
130
|
-
# @return [Hash] Returns the object in the form of hash
|
|
131
|
-
def to_hash
|
|
132
|
-
hash = {}
|
|
133
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
-
value = self.send(attr)
|
|
135
|
-
if value.nil?
|
|
136
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
hash[param] = _to_hash(value)
|
|
141
|
-
end
|
|
142
|
-
hash
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
end
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Zernio API
|
|
3
|
-
|
|
4
|
-
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.1
|
|
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 Late
|
|
17
|
-
class CheckInstagramHashtags200Response < ApiModelBase
|
|
18
|
-
attr_accessor :success
|
|
19
|
-
|
|
20
|
-
attr_accessor :results
|
|
21
|
-
|
|
22
|
-
attr_accessor :summary
|
|
23
|
-
|
|
24
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
-
def self.attribute_map
|
|
26
|
-
{
|
|
27
|
-
:'success' => :'success',
|
|
28
|
-
:'results' => :'results',
|
|
29
|
-
:'summary' => :'summary'
|
|
30
|
-
}
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Returns attribute mapping this model knows about
|
|
34
|
-
def self.acceptable_attribute_map
|
|
35
|
-
attribute_map
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# Returns all the JSON keys this model knows about
|
|
39
|
-
def self.acceptable_attributes
|
|
40
|
-
acceptable_attribute_map.values
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Attribute type mapping.
|
|
44
|
-
def self.openapi_types
|
|
45
|
-
{
|
|
46
|
-
:'success' => :'Boolean',
|
|
47
|
-
:'results' => :'Array<CheckInstagramHashtags200ResponseResultsInner>',
|
|
48
|
-
:'summary' => :'CheckInstagramHashtags200ResponseSummary'
|
|
49
|
-
}
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# List of attributes with nullable: true
|
|
53
|
-
def self.openapi_nullable
|
|
54
|
-
Set.new([
|
|
55
|
-
])
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Initializes the object
|
|
59
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
-
def initialize(attributes = {})
|
|
61
|
-
if (!attributes.is_a?(Hash))
|
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CheckInstagramHashtags200Response` initialize method"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CheckInstagramHashtags200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
-
end
|
|
71
|
-
h[k.to_sym] = v
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if attributes.key?(:'success')
|
|
75
|
-
self.success = attributes[:'success']
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
if attributes.key?(:'results')
|
|
79
|
-
if (value = attributes[:'results']).is_a?(Array)
|
|
80
|
-
self.results = value
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
if attributes.key?(:'summary')
|
|
85
|
-
self.summary = attributes[:'summary']
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
90
|
-
# @return Array for valid properties with the reasons
|
|
91
|
-
def list_invalid_properties
|
|
92
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
93
|
-
invalid_properties = Array.new
|
|
94
|
-
invalid_properties
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# Check to see if the all the properties in the model are valid
|
|
98
|
-
# @return true if the model is valid
|
|
99
|
-
def valid?
|
|
100
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
|
-
true
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Checks equality by comparing each attribute.
|
|
105
|
-
# @param [Object] Object to be compared
|
|
106
|
-
def ==(o)
|
|
107
|
-
return true if self.equal?(o)
|
|
108
|
-
self.class == o.class &&
|
|
109
|
-
success == o.success &&
|
|
110
|
-
results == o.results &&
|
|
111
|
-
summary == o.summary
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
# @see the `==` method
|
|
115
|
-
# @param [Object] Object to be compared
|
|
116
|
-
def eql?(o)
|
|
117
|
-
self == o
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Calculates hash code according to all attributes.
|
|
121
|
-
# @return [Integer] Hash code
|
|
122
|
-
def hash
|
|
123
|
-
[success, results, summary].hash
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
# Builds the object from hash
|
|
127
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
-
# @return [Object] Returns the model itself
|
|
129
|
-
def self.build_from_hash(attributes)
|
|
130
|
-
return nil unless attributes.is_a?(Hash)
|
|
131
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
-
transformed_hash = {}
|
|
133
|
-
openapi_types.each_pair do |key, type|
|
|
134
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
135
|
-
transformed_hash["#{key}"] = nil
|
|
136
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
137
|
-
# check to ensure the input is an array given that the attribute
|
|
138
|
-
# is documented as an array but the input is not
|
|
139
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
140
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
141
|
-
end
|
|
142
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
143
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
144
|
-
end
|
|
145
|
-
end
|
|
146
|
-
new(transformed_hash)
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Returns the object in the form of hash
|
|
150
|
-
# @return [Hash] Returns the object in the form of hash
|
|
151
|
-
def to_hash
|
|
152
|
-
hash = {}
|
|
153
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
154
|
-
value = self.send(attr)
|
|
155
|
-
if value.nil?
|
|
156
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
157
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
hash[param] = _to_hash(value)
|
|
161
|
-
end
|
|
162
|
-
hash
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
end
|