zernio-sdk 0.0.66 → 0.0.68
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 +1 -0
- data/docs/SendInboxMessageRequest.md +4 -0
- data/docs/TwitterPlatformData.md +3 -1
- data/docs/TwitterPlatformDataPoll.md +20 -0
- data/lib/late-sdk/models/send_inbox_message_request.rb +33 -1
- data/lib/late-sdk/models/twitter_platform_data.rb +13 -4
- data/lib/late-sdk/models/twitter_platform_data_poll.rb +231 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +1 -0
- data/openapi.yaml +26 -0
- data/spec/models/send_inbox_message_request_spec.rb +16 -0
- data/spec/models/twitter_platform_data_poll_spec.rb +42 -0
- data/spec/models/twitter_platform_data_spec.rb +6 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62258025be66c655dc004729cca5b47df199675abc02df64f98b133ab5068b74
|
|
4
|
+
data.tar.gz: 0fe495198b1165bee0fb099ca88345fb4243bb81292195149a6bf2a349a3d792
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bdd1c950c9f0a45e61536b9d30939c13fdf639fe714160e4da439710c23191cd7befc1601d6231e4e30a61c419f93fe147061e0235a3d431f234e085a5cf9ef9
|
|
7
|
+
data.tar.gz: 8ac04cc49e426a8103c303b0d934d4150a4229aae1094f7f1dd221b0c516152a3363f53d376de4ff5f00279eb5278f0e180d417f9e8b47c8fb5ae5c8d1ab1b92
|
data/README.md
CHANGED
|
@@ -710,6 +710,7 @@ Class | Method | HTTP request | Description
|
|
|
710
710
|
- [Late::TranscriptResponse](docs/TranscriptResponse.md)
|
|
711
711
|
- [Late::TranscriptSegment](docs/TranscriptSegment.md)
|
|
712
712
|
- [Late::TwitterPlatformData](docs/TwitterPlatformData.md)
|
|
713
|
+
- [Late::TwitterPlatformDataPoll](docs/TwitterPlatformDataPoll.md)
|
|
713
714
|
- [Late::TwitterPlatformDataThreadItemsInner](docs/TwitterPlatformDataThreadItemsInner.md)
|
|
714
715
|
- [Late::UndoRetweet200Response](docs/UndoRetweet200Response.md)
|
|
715
716
|
- [Late::UnfollowUser200Response](docs/UnfollowUser200Response.md)
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **account_id** | **String** | Social account ID | |
|
|
8
8
|
| **message** | **String** | Message text | [optional] |
|
|
9
|
+
| **attachment_url** | **String** | URL of the attachment to send (image, video, audio, or file). The URL must be publicly accessible. For binary file uploads, use multipart/form-data instead. | [optional] |
|
|
10
|
+
| **attachment_type** | **String** | Type of attachment. Defaults to file if not specified. | [optional] |
|
|
9
11
|
| **quick_replies** | [**Array<SendInboxMessageRequestQuickRepliesInner>**](SendInboxMessageRequestQuickRepliesInner.md) | Quick reply buttons. Mutually exclusive with buttons. Max 13 items. | [optional] |
|
|
10
12
|
| **buttons** | [**Array<SendInboxMessageRequestButtonsInner>**](SendInboxMessageRequestButtonsInner.md) | Action buttons. Mutually exclusive with quickReplies. Max 3 items. | [optional] |
|
|
11
13
|
| **template** | [**SendInboxMessageRequestTemplate**](SendInboxMessageRequestTemplate.md) | | [optional] |
|
|
@@ -22,6 +24,8 @@ require 'late-sdk'
|
|
|
22
24
|
instance = Late::SendInboxMessageRequest.new(
|
|
23
25
|
account_id: null,
|
|
24
26
|
message: null,
|
|
27
|
+
attachment_url: null,
|
|
28
|
+
attachment_type: null,
|
|
25
29
|
quick_replies: null,
|
|
26
30
|
buttons: null,
|
|
27
31
|
template: null,
|
data/docs/TwitterPlatformData.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **reply_to_tweet_id** | **String** | ID of an existing tweet to reply to. The published tweet will appear as a reply in that tweet's thread. For threads, only the first tweet replies to the target; subsequent tweets chain normally. | [optional] |
|
|
8
8
|
| **reply_settings** | **String** | Controls who can reply to the tweet. \"following\" allows only people you follow, \"mentionedUsers\" allows only mentioned users, \"subscribers\" allows only subscribers, \"verified\" allows only verified users. Omit for default (everyone can reply). For threads, applies to the first tweet only. Cannot be combined with replyToTweetId. | [optional] |
|
|
9
9
|
| **thread_items** | [**Array<TwitterPlatformDataThreadItemsInner>**](TwitterPlatformDataThreadItemsInner.md) | Sequence of tweets in a thread. First item is the root tweet. | [optional] |
|
|
10
|
+
| **poll** | [**TwitterPlatformDataPoll**](TwitterPlatformDataPoll.md) | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ require 'late-sdk'
|
|
|
16
17
|
instance = Late::TwitterPlatformData.new(
|
|
17
18
|
reply_to_tweet_id: null,
|
|
18
19
|
reply_settings: null,
|
|
19
|
-
thread_items: null
|
|
20
|
+
thread_items: null,
|
|
21
|
+
poll: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
22
24
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::TwitterPlatformDataPoll
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **options** | **Array<String>** | Poll options (2-4 choices, max 25 characters each) | |
|
|
8
|
+
| **duration_minutes** | **Integer** | Poll duration in minutes (5 min to 7 days) | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::TwitterPlatformDataPoll.new(
|
|
16
|
+
options: null,
|
|
17
|
+
duration_minutes: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -21,6 +21,12 @@ module Late
|
|
|
21
21
|
# Message text
|
|
22
22
|
attr_accessor :message
|
|
23
23
|
|
|
24
|
+
# URL of the attachment to send (image, video, audio, or file). The URL must be publicly accessible. For binary file uploads, use multipart/form-data instead.
|
|
25
|
+
attr_accessor :attachment_url
|
|
26
|
+
|
|
27
|
+
# Type of attachment. Defaults to file if not specified.
|
|
28
|
+
attr_accessor :attachment_type
|
|
29
|
+
|
|
24
30
|
# Quick reply buttons. Mutually exclusive with buttons. Max 13 items.
|
|
25
31
|
attr_accessor :quick_replies
|
|
26
32
|
|
|
@@ -67,6 +73,8 @@ module Late
|
|
|
67
73
|
{
|
|
68
74
|
:'account_id' => :'accountId',
|
|
69
75
|
:'message' => :'message',
|
|
76
|
+
:'attachment_url' => :'attachmentUrl',
|
|
77
|
+
:'attachment_type' => :'attachmentType',
|
|
70
78
|
:'quick_replies' => :'quickReplies',
|
|
71
79
|
:'buttons' => :'buttons',
|
|
72
80
|
:'template' => :'template',
|
|
@@ -92,6 +100,8 @@ module Late
|
|
|
92
100
|
{
|
|
93
101
|
:'account_id' => :'String',
|
|
94
102
|
:'message' => :'String',
|
|
103
|
+
:'attachment_url' => :'String',
|
|
104
|
+
:'attachment_type' => :'String',
|
|
95
105
|
:'quick_replies' => :'Array<SendInboxMessageRequestQuickRepliesInner>',
|
|
96
106
|
:'buttons' => :'Array<SendInboxMessageRequestButtonsInner>',
|
|
97
107
|
:'template' => :'SendInboxMessageRequestTemplate',
|
|
@@ -134,6 +144,14 @@ module Late
|
|
|
134
144
|
self.message = attributes[:'message']
|
|
135
145
|
end
|
|
136
146
|
|
|
147
|
+
if attributes.key?(:'attachment_url')
|
|
148
|
+
self.attachment_url = attributes[:'attachment_url']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'attachment_type')
|
|
152
|
+
self.attachment_type = attributes[:'attachment_type']
|
|
153
|
+
end
|
|
154
|
+
|
|
137
155
|
if attributes.key?(:'quick_replies')
|
|
138
156
|
if (value = attributes[:'quick_replies']).is_a?(Array)
|
|
139
157
|
self.quick_replies = value
|
|
@@ -192,6 +210,8 @@ module Late
|
|
|
192
210
|
def valid?
|
|
193
211
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
194
212
|
return false if @account_id.nil?
|
|
213
|
+
attachment_type_validator = EnumAttributeValidator.new('String', ["image", "video", "audio", "file"])
|
|
214
|
+
return false unless attachment_type_validator.valid?(@attachment_type)
|
|
195
215
|
return false if !@quick_replies.nil? && @quick_replies.length > 13
|
|
196
216
|
return false if !@buttons.nil? && @buttons.length > 3
|
|
197
217
|
messaging_type_validator = EnumAttributeValidator.new('String', ["RESPONSE", "UPDATE", "MESSAGE_TAG"])
|
|
@@ -211,6 +231,16 @@ module Late
|
|
|
211
231
|
@account_id = account_id
|
|
212
232
|
end
|
|
213
233
|
|
|
234
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
235
|
+
# @param [Object] attachment_type Object to be assigned
|
|
236
|
+
def attachment_type=(attachment_type)
|
|
237
|
+
validator = EnumAttributeValidator.new('String', ["image", "video", "audio", "file"])
|
|
238
|
+
unless validator.valid?(attachment_type)
|
|
239
|
+
fail ArgumentError, "invalid value for \"attachment_type\", must be one of #{validator.allowable_values}."
|
|
240
|
+
end
|
|
241
|
+
@attachment_type = attachment_type
|
|
242
|
+
end
|
|
243
|
+
|
|
214
244
|
# Custom attribute writer method with validation
|
|
215
245
|
# @param [Object] quick_replies Value to be assigned
|
|
216
246
|
def quick_replies=(quick_replies)
|
|
@@ -266,6 +296,8 @@ module Late
|
|
|
266
296
|
self.class == o.class &&
|
|
267
297
|
account_id == o.account_id &&
|
|
268
298
|
message == o.message &&
|
|
299
|
+
attachment_url == o.attachment_url &&
|
|
300
|
+
attachment_type == o.attachment_type &&
|
|
269
301
|
quick_replies == o.quick_replies &&
|
|
270
302
|
buttons == o.buttons &&
|
|
271
303
|
template == o.template &&
|
|
@@ -284,7 +316,7 @@ module Late
|
|
|
284
316
|
# Calculates hash code according to all attributes.
|
|
285
317
|
# @return [Integer] Hash code
|
|
286
318
|
def hash
|
|
287
|
-
[account_id, message, quick_replies, buttons, template, reply_markup, messaging_type, message_tag, reply_to].hash
|
|
319
|
+
[account_id, message, attachment_url, attachment_type, quick_replies, buttons, template, reply_markup, messaging_type, message_tag, reply_to].hash
|
|
288
320
|
end
|
|
289
321
|
|
|
290
322
|
# Builds the object from hash
|
|
@@ -24,6 +24,8 @@ module Late
|
|
|
24
24
|
# Sequence of tweets in a thread. First item is the root tweet.
|
|
25
25
|
attr_accessor :thread_items
|
|
26
26
|
|
|
27
|
+
attr_accessor :poll
|
|
28
|
+
|
|
27
29
|
class EnumAttributeValidator
|
|
28
30
|
attr_reader :datatype
|
|
29
31
|
attr_reader :allowable_values
|
|
@@ -51,7 +53,8 @@ module Late
|
|
|
51
53
|
{
|
|
52
54
|
:'reply_to_tweet_id' => :'replyToTweetId',
|
|
53
55
|
:'reply_settings' => :'replySettings',
|
|
54
|
-
:'thread_items' => :'threadItems'
|
|
56
|
+
:'thread_items' => :'threadItems',
|
|
57
|
+
:'poll' => :'poll'
|
|
55
58
|
}
|
|
56
59
|
end
|
|
57
60
|
|
|
@@ -70,7 +73,8 @@ module Late
|
|
|
70
73
|
{
|
|
71
74
|
:'reply_to_tweet_id' => :'String',
|
|
72
75
|
:'reply_settings' => :'String',
|
|
73
|
-
:'thread_items' => :'Array<TwitterPlatformDataThreadItemsInner>'
|
|
76
|
+
:'thread_items' => :'Array<TwitterPlatformDataThreadItemsInner>',
|
|
77
|
+
:'poll' => :'TwitterPlatformDataPoll'
|
|
74
78
|
}
|
|
75
79
|
end
|
|
76
80
|
|
|
@@ -109,6 +113,10 @@ module Late
|
|
|
109
113
|
self.thread_items = value
|
|
110
114
|
end
|
|
111
115
|
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'poll')
|
|
118
|
+
self.poll = attributes[:'poll']
|
|
119
|
+
end
|
|
112
120
|
end
|
|
113
121
|
|
|
114
122
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -145,7 +153,8 @@ module Late
|
|
|
145
153
|
self.class == o.class &&
|
|
146
154
|
reply_to_tweet_id == o.reply_to_tweet_id &&
|
|
147
155
|
reply_settings == o.reply_settings &&
|
|
148
|
-
thread_items == o.thread_items
|
|
156
|
+
thread_items == o.thread_items &&
|
|
157
|
+
poll == o.poll
|
|
149
158
|
end
|
|
150
159
|
|
|
151
160
|
# @see the `==` method
|
|
@@ -157,7 +166,7 @@ module Late
|
|
|
157
166
|
# Calculates hash code according to all attributes.
|
|
158
167
|
# @return [Integer] Hash code
|
|
159
168
|
def hash
|
|
160
|
-
[reply_to_tweet_id, reply_settings, thread_items].hash
|
|
169
|
+
[reply_to_tweet_id, reply_settings, thread_items, poll].hash
|
|
161
170
|
end
|
|
162
171
|
|
|
163
172
|
# Builds the object from hash
|
|
@@ -0,0 +1,231 @@
|
|
|
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
|
+
# Create a poll with this tweet. Mutually exclusive with media attachments and threads.
|
|
18
|
+
class TwitterPlatformDataPoll < ApiModelBase
|
|
19
|
+
# Poll options (2-4 choices, max 25 characters each)
|
|
20
|
+
attr_accessor :options
|
|
21
|
+
|
|
22
|
+
# Poll duration in minutes (5 min to 7 days)
|
|
23
|
+
attr_accessor :duration_minutes
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'options' => :'options',
|
|
29
|
+
:'duration_minutes' => :'duration_minutes'
|
|
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
|
+
:'options' => :'Array<String>',
|
|
47
|
+
:'duration_minutes' => :'Integer'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::TwitterPlatformDataPoll` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::TwitterPlatformDataPoll`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'options')
|
|
74
|
+
if (value = attributes[:'options']).is_a?(Array)
|
|
75
|
+
self.options = value
|
|
76
|
+
end
|
|
77
|
+
else
|
|
78
|
+
self.options = nil
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'duration_minutes')
|
|
82
|
+
self.duration_minutes = attributes[:'duration_minutes']
|
|
83
|
+
else
|
|
84
|
+
self.duration_minutes = nil
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
if @options.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "options", options cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if @options.length > 4
|
|
98
|
+
invalid_properties.push('invalid value for "options", number of items must be less than or equal to 4.')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if @options.length < 2
|
|
102
|
+
invalid_properties.push('invalid value for "options", number of items must be greater than or equal to 2.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if @duration_minutes.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "duration_minutes", duration_minutes cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if @duration_minutes > 10080
|
|
110
|
+
invalid_properties.push('invalid value for "duration_minutes", must be smaller than or equal to 10080.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if @duration_minutes < 5
|
|
114
|
+
invalid_properties.push('invalid value for "duration_minutes", must be greater than or equal to 5.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
invalid_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Check to see if the all the properties in the model are valid
|
|
121
|
+
# @return true if the model is valid
|
|
122
|
+
def valid?
|
|
123
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
124
|
+
return false if @options.nil?
|
|
125
|
+
return false if @options.length > 4
|
|
126
|
+
return false if @options.length < 2
|
|
127
|
+
return false if @duration_minutes.nil?
|
|
128
|
+
return false if @duration_minutes > 10080
|
|
129
|
+
return false if @duration_minutes < 5
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Custom attribute writer method with validation
|
|
134
|
+
# @param [Object] options Value to be assigned
|
|
135
|
+
def options=(options)
|
|
136
|
+
if options.nil?
|
|
137
|
+
fail ArgumentError, 'options cannot be nil'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if options.length > 4
|
|
141
|
+
fail ArgumentError, 'invalid value for "options", number of items must be less than or equal to 4.'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if options.length < 2
|
|
145
|
+
fail ArgumentError, 'invalid value for "options", number of items must be greater than or equal to 2.'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@options = options
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] duration_minutes Value to be assigned
|
|
153
|
+
def duration_minutes=(duration_minutes)
|
|
154
|
+
if duration_minutes.nil?
|
|
155
|
+
fail ArgumentError, 'duration_minutes cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if duration_minutes > 10080
|
|
159
|
+
fail ArgumentError, 'invalid value for "duration_minutes", must be smaller than or equal to 10080.'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if duration_minutes < 5
|
|
163
|
+
fail ArgumentError, 'invalid value for "duration_minutes", must be greater than or equal to 5.'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@duration_minutes = duration_minutes
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Checks equality by comparing each attribute.
|
|
170
|
+
# @param [Object] Object to be compared
|
|
171
|
+
def ==(o)
|
|
172
|
+
return true if self.equal?(o)
|
|
173
|
+
self.class == o.class &&
|
|
174
|
+
options == o.options &&
|
|
175
|
+
duration_minutes == o.duration_minutes
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# @see the `==` method
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def eql?(o)
|
|
181
|
+
self == o
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Calculates hash code according to all attributes.
|
|
185
|
+
# @return [Integer] Hash code
|
|
186
|
+
def hash
|
|
187
|
+
[options, duration_minutes].hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Builds the object from hash
|
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
192
|
+
# @return [Object] Returns the model itself
|
|
193
|
+
def self.build_from_hash(attributes)
|
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
|
195
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
196
|
+
transformed_hash = {}
|
|
197
|
+
openapi_types.each_pair do |key, type|
|
|
198
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
199
|
+
transformed_hash["#{key}"] = nil
|
|
200
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
201
|
+
# check to ensure the input is an array given that the attribute
|
|
202
|
+
# is documented as an array but the input is not
|
|
203
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
204
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
205
|
+
end
|
|
206
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
207
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
new(transformed_hash)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the object in the form of hash
|
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
|
215
|
+
def to_hash
|
|
216
|
+
hash = {}
|
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
data/lib/late-sdk/version.rb
CHANGED
data/lib/late-sdk.rb
CHANGED
|
@@ -473,6 +473,7 @@ require 'late-sdk/models/tik_tok_platform_data'
|
|
|
473
473
|
require 'late-sdk/models/transcript_response'
|
|
474
474
|
require 'late-sdk/models/transcript_segment'
|
|
475
475
|
require 'late-sdk/models/twitter_platform_data'
|
|
476
|
+
require 'late-sdk/models/twitter_platform_data_poll'
|
|
476
477
|
require 'late-sdk/models/twitter_platform_data_thread_items_inner'
|
|
477
478
|
require 'late-sdk/models/undo_retweet200_response'
|
|
478
479
|
require 'late-sdk/models/unfollow_user200_response'
|
data/openapi.yaml
CHANGED
|
@@ -1349,6 +1349,27 @@ components:
|
|
|
1349
1349
|
mediaItems:
|
|
1350
1350
|
type: array
|
|
1351
1351
|
items: { $ref: '#/components/schemas/MediaItem' }
|
|
1352
|
+
poll:
|
|
1353
|
+
type: object
|
|
1354
|
+
description: Create a poll with this tweet. Mutually exclusive with media attachments and threads.
|
|
1355
|
+
properties:
|
|
1356
|
+
options:
|
|
1357
|
+
type: array
|
|
1358
|
+
minItems: 2
|
|
1359
|
+
maxItems: 4
|
|
1360
|
+
items:
|
|
1361
|
+
type: string
|
|
1362
|
+
minLength: 1
|
|
1363
|
+
maxLength: 25
|
|
1364
|
+
description: Poll options (2-4 choices, max 25 characters each)
|
|
1365
|
+
duration_minutes:
|
|
1366
|
+
type: integer
|
|
1367
|
+
minimum: 5
|
|
1368
|
+
maximum: 10080
|
|
1369
|
+
description: Poll duration in minutes (5 min to 7 days)
|
|
1370
|
+
required:
|
|
1371
|
+
- options
|
|
1372
|
+
- duration_minutes
|
|
1352
1373
|
|
|
1353
1374
|
ThreadsPlatformData:
|
|
1354
1375
|
type: object
|
|
@@ -10980,6 +11001,11 @@ paths:
|
|
|
10980
11001
|
properties:
|
|
10981
11002
|
accountId: { type: string, description: Social account ID }
|
|
10982
11003
|
message: { type: string, description: Message text }
|
|
11004
|
+
attachmentUrl: { type: string, description: "URL of the attachment to send (image, video, audio, or file). The URL must be publicly accessible. For binary file uploads, use multipart/form-data instead." }
|
|
11005
|
+
attachmentType:
|
|
11006
|
+
type: string
|
|
11007
|
+
enum: [image, video, audio, file]
|
|
11008
|
+
description: "Type of attachment. Defaults to file if not specified."
|
|
10983
11009
|
quickReplies:
|
|
10984
11010
|
type: array
|
|
10985
11011
|
maxItems: 13
|
|
@@ -39,6 +39,22 @@ describe Late::SendInboxMessageRequest do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "attachment_url"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "attachment_type"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["image", "video", "audio", "file"])
|
|
52
|
+
# validator.allowable_values.each do |value|
|
|
53
|
+
# expect { instance.attachment_type = value }.not_to raise_error
|
|
54
|
+
# end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
42
58
|
describe 'test attribute "quick_replies"' do
|
|
43
59
|
it 'should work' do
|
|
44
60
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -0,0 +1,42 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Late::TwitterPlatformDataPoll
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Late::TwitterPlatformDataPoll do
|
|
21
|
+
#let(:instance) { Late::TwitterPlatformDataPoll.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of TwitterPlatformDataPoll' do
|
|
24
|
+
it 'should create an instance of TwitterPlatformDataPoll' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Late::TwitterPlatformDataPoll)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "options"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "duration_minutes"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.68
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -543,6 +543,7 @@ files:
|
|
|
543
543
|
- docs/TranscriptSegment.md
|
|
544
544
|
- docs/TwitterEngagementApi.md
|
|
545
545
|
- docs/TwitterPlatformData.md
|
|
546
|
+
- docs/TwitterPlatformDataPoll.md
|
|
546
547
|
- docs/TwitterPlatformDataThreadItemsInner.md
|
|
547
548
|
- docs/UndoRetweet200Response.md
|
|
548
549
|
- docs/UnfollowUser200Response.md
|
|
@@ -1155,6 +1156,7 @@ files:
|
|
|
1155
1156
|
- lib/late-sdk/models/transcript_response.rb
|
|
1156
1157
|
- lib/late-sdk/models/transcript_segment.rb
|
|
1157
1158
|
- lib/late-sdk/models/twitter_platform_data.rb
|
|
1159
|
+
- lib/late-sdk/models/twitter_platform_data_poll.rb
|
|
1158
1160
|
- lib/late-sdk/models/twitter_platform_data_thread_items_inner.rb
|
|
1159
1161
|
- lib/late-sdk/models/undo_retweet200_response.rb
|
|
1160
1162
|
- lib/late-sdk/models/unfollow_user200_response.rb
|
|
@@ -1757,6 +1759,7 @@ files:
|
|
|
1757
1759
|
- spec/models/tik_tok_platform_data_spec.rb
|
|
1758
1760
|
- spec/models/transcript_response_spec.rb
|
|
1759
1761
|
- spec/models/transcript_segment_spec.rb
|
|
1762
|
+
- spec/models/twitter_platform_data_poll_spec.rb
|
|
1760
1763
|
- spec/models/twitter_platform_data_spec.rb
|
|
1761
1764
|
- spec/models/twitter_platform_data_thread_items_inner_spec.rb
|
|
1762
1765
|
- spec/models/undo_retweet200_response_spec.rb
|
|
@@ -2176,6 +2179,7 @@ test_files:
|
|
|
2176
2179
|
- spec/models/create_post_request_platforms_inner_spec.rb
|
|
2177
2180
|
- spec/models/get_best_time_to_post200_response_slots_inner_spec.rb
|
|
2178
2181
|
- spec/models/release_whats_app_phone_number200_response_phone_number_spec.rb
|
|
2182
|
+
- spec/models/twitter_platform_data_poll_spec.rb
|
|
2179
2183
|
- spec/models/create_whats_app_broadcast_request_recipients_inner_spec.rb
|
|
2180
2184
|
- spec/models/you_tube_daily_views_response_spec.rb
|
|
2181
2185
|
- spec/models/hashtag_info_spec.rb
|