x-twitter-scraper 0.4.5 → 0.5.2
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/CHANGELOG.md +33 -0
- data/README.md +8 -41
- data/lib/x_twitter_scraper/client.rb +1 -1
- data/lib/x_twitter_scraper/internal/type/union.rb +13 -0
- data/lib/x_twitter_scraper/models/account_retrieve_response.rb +4 -4
- data/lib/x_twitter_scraper/models/compose_create_params.rb +194 -122
- data/lib/x_twitter_scraper/models/compose_create_response.rb +326 -33
- data/lib/x_twitter_scraper/models/credit_retrieve_topup_status_params.rb +2 -2
- data/lib/x_twitter_scraper/models/error.rb +99 -3
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +8 -8
- data/lib/x_twitter_scraper/models/guest_wallet_create_params.rb +2 -2
- data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +27 -7
- data/lib/x_twitter_scraper/models/guest_wallet_topup_params.rb +2 -2
- data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +27 -7
- data/lib/x_twitter_scraper/models/search_tweet.rb +12 -12
- data/lib/x_twitter_scraper/models/support/ticket_create_params.rb +7 -1
- data/lib/x_twitter_scraper/models/support/ticket_create_response.rb +40 -3
- data/lib/x_twitter_scraper/models/support/ticket_reply_params.rb +7 -1
- data/lib/x_twitter_scraper/models/support/ticket_reply_response.rb +40 -3
- data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +114 -1
- data/lib/x_twitter_scraper/models/x/communities/join_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +577 -4
- data/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +585 -4
- data/lib/x_twitter_scraper/models/x/community_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/community_create_response.rb +568 -8
- data/lib/x_twitter_scraper/models/x/community_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/community_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/dm_send_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/dm_send_response.rb +573 -7
- data/lib/x_twitter_scraper/models/x/media_upload_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/media_upload_response.rb +568 -11
- data/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/profile_update_avatar_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/profile_update_banner_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/profile_update_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/profile_update_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweet_author.rb +1 -14
- data/lib/x_twitter_scraper/models/x/tweet_create_params.rb +5 -5
- data/lib/x_twitter_scraper/models/x/tweet_create_response.rb +551 -12
- data/lib/x_twitter_scraper/models/x/tweet_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/user_remove_follower_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/user_remove_follower_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +2 -2
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +2 -2
- data/lib/x_twitter_scraper/models/x/users/follow_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/write_action_retrieve_response.rb +469 -52
- data/lib/x_twitter_scraper/models/x/x_account.rb +7 -7
- data/lib/x_twitter_scraper/models/x/x_account_detail.rb +1 -1
- data/lib/x_twitter_scraper/resources/compose.rb +8 -26
- data/lib/x_twitter_scraper/resources/credits.rb +1 -1
- data/lib/x_twitter_scraper/resources/extractions.rb +4 -4
- data/lib/x_twitter_scraper/resources/guest_wallets.rb +2 -2
- data/lib/x_twitter_scraper/resources/monitors/keywords.rb +4 -5
- data/lib/x_twitter_scraper/resources/monitors.rb +3 -3
- data/lib/x_twitter_scraper/resources/support/tickets.rb +24 -8
- data/lib/x_twitter_scraper/resources/trends.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/communities/join.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/communities.rb +25 -11
- data/lib/x_twitter_scraper/resources/x/dm.rb +13 -6
- data/lib/x_twitter_scraper/resources/x/media.rb +17 -7
- data/lib/x_twitter_scraper/resources/x/profile.rb +46 -17
- data/lib/x_twitter_scraper/resources/x/tweets/like.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/tweets.rb +31 -16
- data/lib/x_twitter_scraper/resources/x/users/follow.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/users.rb +16 -9
- data/lib/x_twitter_scraper/resources/x.rb +1 -2
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/rbi/x_twitter_scraper/client.rbi +1 -1
- data/rbi/x_twitter_scraper/models/account_retrieve_response.rbi +4 -4
- data/rbi/x_twitter_scraper/models/compose_create_params.rbi +392 -215
- data/rbi/x_twitter_scraper/models/compose_create_response.rbi +537 -48
- data/rbi/x_twitter_scraper/models/credit_retrieve_topup_status_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/error.rbi +379 -13
- data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +8 -8
- data/rbi/x_twitter_scraper/models/guest_wallet_create_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +87 -5
- data/rbi/x_twitter_scraper/models/guest_wallet_topup_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +87 -5
- data/rbi/x_twitter_scraper/models/search_tweet.rbi +12 -12
- data/rbi/x_twitter_scraper/models/support/ticket_create_params.rbi +9 -1
- data/rbi/x_twitter_scraper/models/support/ticket_create_response.rbi +113 -7
- data/rbi/x_twitter_scraper/models/support/ticket_reply_params.rbi +9 -1
- data/rbi/x_twitter_scraper/models/support/ticket_reply_response.rbi +113 -7
- data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +276 -5
- data/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/community_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/community_create_response.rbi +1127 -5
- data/rbi/x_twitter_scraper/models/x/community_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/community_delete_response.rbi +1148 -3
- data/rbi/x_twitter_scraper/models/x/dm_send_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/dm_send_response.rbi +1112 -6
- data/rbi/x_twitter_scraper/models/x/media_upload_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/media_upload_response.rbi +1124 -9
- data/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/profile_update_avatar_response.rbi +1152 -3
- data/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/profile_update_banner_response.rbi +1152 -3
- data/rbi/x_twitter_scraper/models/x/profile_update_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/profile_update_response.rbi +1144 -3
- data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +3 -13
- data/rbi/x_twitter_scraper/models/x/tweet_create_params.rbi +5 -8
- data/rbi/x_twitter_scraper/models/x/tweet_create_response.rbi +1108 -14
- data/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi +1140 -3
- data/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/user_remove_follower_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/user_remove_follower_response.rbi +1152 -3
- data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/write_action_retrieve_response.rbi +930 -66
- data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -9
- data/rbi/x_twitter_scraper/models/x/x_account_detail.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/compose.rbi +12 -38
- data/rbi/x_twitter_scraper/resources/credits.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/extractions.rbi +4 -4
- data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +2 -2
- data/rbi/x_twitter_scraper/resources/monitors/keywords.rbi +4 -5
- data/rbi/x_twitter_scraper/resources/monitors.rbi +3 -3
- data/rbi/x_twitter_scraper/resources/support/tickets.rbi +17 -2
- data/rbi/x_twitter_scraper/resources/trends.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/x/communities/join.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +19 -7
- data/rbi/x_twitter_scraper/resources/x/dm.rbi +10 -3
- data/rbi/x_twitter_scraper/resources/x/media.rbi +9 -4
- data/rbi/x_twitter_scraper/resources/x/profile.rbi +27 -8
- data/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +31 -12
- data/rbi/x_twitter_scraper/resources/x/users/follow.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/users.rbi +13 -7
- data/rbi/x_twitter_scraper/resources/x.rbi +1 -2
- data/sig/x_twitter_scraper/models/compose_create_params.rbs +150 -90
- data/sig/x_twitter_scraper/models/compose_create_response.rbs +249 -27
- data/sig/x_twitter_scraper/models/error.rbs +170 -7
- data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +35 -5
- data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +35 -5
- data/sig/x_twitter_scraper/models/support/ticket_create_params.rbs +7 -1
- data/sig/x_twitter_scraper/models/support/ticket_create_response.rbs +49 -5
- data/sig/x_twitter_scraper/models/support/ticket_reply_params.rbs +7 -1
- data/sig/x_twitter_scraper/models/support/ticket_reply_response.rbs +49 -5
- data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +113 -2
- data/sig/x_twitter_scraper/models/x/communities/join_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/communities/join_delete_all_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/community_create_params.rbs +10 -1
- data/sig/x_twitter_scraper/models/x/community_create_response.rbs +528 -7
- data/sig/x_twitter_scraper/models/x/community_delete_params.rbs +10 -1
- data/sig/x_twitter_scraper/models/x/community_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/dm_send_params.rbs +5 -0
- data/sig/x_twitter_scraper/models/x/dm_send_response.rbs +539 -5
- data/sig/x_twitter_scraper/models/x/media_upload_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/media_upload_response.rbs +534 -7
- data/sig/x_twitter_scraper/models/x/profile_update_avatar_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/profile_update_avatar_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/profile_update_banner_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/profile_update_banner_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/profile_update_params.rbs +5 -0
- data/sig/x_twitter_scraper/models/x/profile_update_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweet_author.rbs +3 -11
- data/sig/x_twitter_scraper/models/x/tweet_create_params.rbs +4 -6
- data/sig/x_twitter_scraper/models/x/tweet_create_response.rbs +518 -11
- data/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/user_remove_follower_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/user_remove_follower_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/write_action_retrieve_response.rbs +428 -54
- data/sig/x_twitter_scraper/resources/compose.rbs +2 -12
- data/sig/x_twitter_scraper/resources/support/tickets.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/communities/join.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/communities.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/dm.rbs +1 -0
- data/sig/x_twitter_scraper/resources/x/media.rbs +1 -0
- data/sig/x_twitter_scraper/resources/x/profile.rbs +3 -0
- data/sig/x_twitter_scraper/resources/x/tweets/like.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +2 -1
- data/sig/x_twitter_scraper/resources/x/users/follow.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/users.rbs +1 -0
- metadata +17 -26
|
@@ -113,6 +113,27 @@ module XTwitterScraper
|
|
|
113
113
|
)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
sig do
|
|
117
|
+
returns(
|
|
118
|
+
T.nilable(
|
|
119
|
+
T::Array[
|
|
120
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment
|
|
121
|
+
]
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
attr_reader :attachments
|
|
126
|
+
|
|
127
|
+
sig do
|
|
128
|
+
params(
|
|
129
|
+
attachments:
|
|
130
|
+
T::Array[
|
|
131
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::OrHash
|
|
132
|
+
]
|
|
133
|
+
).void
|
|
134
|
+
end
|
|
135
|
+
attr_writer :attachments
|
|
136
|
+
|
|
116
137
|
sig { returns(T.nilable(String)) }
|
|
117
138
|
attr_reader :body
|
|
118
139
|
|
|
@@ -132,18 +153,268 @@ module XTwitterScraper
|
|
|
132
153
|
attr_writer :sender
|
|
133
154
|
|
|
134
155
|
sig do
|
|
135
|
-
params(
|
|
136
|
-
|
|
137
|
-
|
|
156
|
+
params(
|
|
157
|
+
attachments:
|
|
158
|
+
T::Array[
|
|
159
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::OrHash
|
|
160
|
+
],
|
|
161
|
+
body: String,
|
|
162
|
+
created_at: Time,
|
|
163
|
+
sender: String
|
|
164
|
+
).returns(T.attached_class)
|
|
138
165
|
end
|
|
139
|
-
def self.new(
|
|
166
|
+
def self.new(
|
|
167
|
+
attachments: nil,
|
|
168
|
+
body: nil,
|
|
169
|
+
created_at: nil,
|
|
170
|
+
sender: nil
|
|
171
|
+
)
|
|
140
172
|
end
|
|
141
173
|
|
|
142
174
|
sig do
|
|
143
|
-
override.returns(
|
|
175
|
+
override.returns(
|
|
176
|
+
{
|
|
177
|
+
attachments:
|
|
178
|
+
T::Array[
|
|
179
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment
|
|
180
|
+
],
|
|
181
|
+
body: String,
|
|
182
|
+
created_at: Time,
|
|
183
|
+
sender: String
|
|
184
|
+
}
|
|
185
|
+
)
|
|
144
186
|
end
|
|
145
187
|
def to_hash
|
|
146
188
|
end
|
|
189
|
+
|
|
190
|
+
class Attachment < XTwitterScraper::Internal::Type::BaseModel
|
|
191
|
+
OrHash =
|
|
192
|
+
T.type_alias do
|
|
193
|
+
T.any(
|
|
194
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment,
|
|
195
|
+
XTwitterScraper::Internal::AnyHash
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Validated media type.
|
|
200
|
+
sig do
|
|
201
|
+
returns(
|
|
202
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
attr_accessor :content_type
|
|
206
|
+
|
|
207
|
+
sig { returns(String) }
|
|
208
|
+
attr_accessor :filename
|
|
209
|
+
|
|
210
|
+
# Attachment media class.
|
|
211
|
+
sig do
|
|
212
|
+
returns(
|
|
213
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind::TaggedSymbol
|
|
214
|
+
)
|
|
215
|
+
end
|
|
216
|
+
attr_accessor :kind
|
|
217
|
+
|
|
218
|
+
sig { returns(String) }
|
|
219
|
+
attr_accessor :public_id
|
|
220
|
+
|
|
221
|
+
sig { returns(Integer) }
|
|
222
|
+
attr_accessor :size_bytes
|
|
223
|
+
|
|
224
|
+
# Storage processing state.
|
|
225
|
+
sig do
|
|
226
|
+
returns(
|
|
227
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::TaggedSymbol
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
attr_accessor :status
|
|
231
|
+
|
|
232
|
+
sig { returns(String) }
|
|
233
|
+
attr_accessor :url
|
|
234
|
+
|
|
235
|
+
# Downloadable image or video attached to a support message.
|
|
236
|
+
sig do
|
|
237
|
+
params(
|
|
238
|
+
content_type:
|
|
239
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::OrSymbol,
|
|
240
|
+
filename: String,
|
|
241
|
+
kind:
|
|
242
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind::OrSymbol,
|
|
243
|
+
public_id: String,
|
|
244
|
+
size_bytes: Integer,
|
|
245
|
+
status:
|
|
246
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::OrSymbol,
|
|
247
|
+
url: String
|
|
248
|
+
).returns(T.attached_class)
|
|
249
|
+
end
|
|
250
|
+
def self.new(
|
|
251
|
+
# Validated media type.
|
|
252
|
+
content_type:,
|
|
253
|
+
filename:,
|
|
254
|
+
# Attachment media class.
|
|
255
|
+
kind:,
|
|
256
|
+
public_id:,
|
|
257
|
+
size_bytes:,
|
|
258
|
+
# Storage processing state.
|
|
259
|
+
status:,
|
|
260
|
+
url:
|
|
261
|
+
)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
sig do
|
|
265
|
+
override.returns(
|
|
266
|
+
{
|
|
267
|
+
content_type:
|
|
268
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol,
|
|
269
|
+
filename: String,
|
|
270
|
+
kind:
|
|
271
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind::TaggedSymbol,
|
|
272
|
+
public_id: String,
|
|
273
|
+
size_bytes: Integer,
|
|
274
|
+
status:
|
|
275
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::TaggedSymbol,
|
|
276
|
+
url: String
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
end
|
|
280
|
+
def to_hash
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Validated media type.
|
|
284
|
+
module ContentType
|
|
285
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
286
|
+
|
|
287
|
+
TaggedSymbol =
|
|
288
|
+
T.type_alias do
|
|
289
|
+
T.all(
|
|
290
|
+
Symbol,
|
|
291
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType
|
|
292
|
+
)
|
|
293
|
+
end
|
|
294
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
295
|
+
|
|
296
|
+
IMAGE_JPEG =
|
|
297
|
+
T.let(
|
|
298
|
+
:"image/jpeg",
|
|
299
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
300
|
+
)
|
|
301
|
+
IMAGE_PNG =
|
|
302
|
+
T.let(
|
|
303
|
+
:"image/png",
|
|
304
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
305
|
+
)
|
|
306
|
+
IMAGE_GIF =
|
|
307
|
+
T.let(
|
|
308
|
+
:"image/gif",
|
|
309
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
310
|
+
)
|
|
311
|
+
IMAGE_WEBP =
|
|
312
|
+
T.let(
|
|
313
|
+
:"image/webp",
|
|
314
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
315
|
+
)
|
|
316
|
+
VIDEO_MP4 =
|
|
317
|
+
T.let(
|
|
318
|
+
:"video/mp4",
|
|
319
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
320
|
+
)
|
|
321
|
+
VIDEO_QUICKTIME =
|
|
322
|
+
T.let(
|
|
323
|
+
:"video/quicktime",
|
|
324
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
325
|
+
)
|
|
326
|
+
VIDEO_WEBM =
|
|
327
|
+
T.let(
|
|
328
|
+
:"video/webm",
|
|
329
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
sig do
|
|
333
|
+
override.returns(
|
|
334
|
+
T::Array[
|
|
335
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType::TaggedSymbol
|
|
336
|
+
]
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
def self.values
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Attachment media class.
|
|
344
|
+
module Kind
|
|
345
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
346
|
+
|
|
347
|
+
TaggedSymbol =
|
|
348
|
+
T.type_alias do
|
|
349
|
+
T.all(
|
|
350
|
+
Symbol,
|
|
351
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
355
|
+
|
|
356
|
+
IMAGE =
|
|
357
|
+
T.let(
|
|
358
|
+
:image,
|
|
359
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind::TaggedSymbol
|
|
360
|
+
)
|
|
361
|
+
VIDEO =
|
|
362
|
+
T.let(
|
|
363
|
+
:video,
|
|
364
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind::TaggedSymbol
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
sig do
|
|
368
|
+
override.returns(
|
|
369
|
+
T::Array[
|
|
370
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind::TaggedSymbol
|
|
371
|
+
]
|
|
372
|
+
)
|
|
373
|
+
end
|
|
374
|
+
def self.values
|
|
375
|
+
end
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Storage processing state.
|
|
379
|
+
module Status
|
|
380
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
381
|
+
|
|
382
|
+
TaggedSymbol =
|
|
383
|
+
T.type_alias do
|
|
384
|
+
T.all(
|
|
385
|
+
Symbol,
|
|
386
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
390
|
+
|
|
391
|
+
PENDING =
|
|
392
|
+
T.let(
|
|
393
|
+
:pending,
|
|
394
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::TaggedSymbol
|
|
395
|
+
)
|
|
396
|
+
READY =
|
|
397
|
+
T.let(
|
|
398
|
+
:ready,
|
|
399
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::TaggedSymbol
|
|
400
|
+
)
|
|
401
|
+
FAILED =
|
|
402
|
+
T.let(
|
|
403
|
+
:failed,
|
|
404
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::TaggedSymbol
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
sig do
|
|
408
|
+
override.returns(
|
|
409
|
+
T::Array[
|
|
410
|
+
XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status::TaggedSymbol
|
|
411
|
+
]
|
|
412
|
+
)
|
|
413
|
+
end
|
|
414
|
+
def self.values
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
end
|
|
147
418
|
end
|
|
148
419
|
end
|
|
149
420
|
end
|
|
@@ -23,10 +23,14 @@ module XTwitterScraper
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :account
|
|
25
25
|
|
|
26
|
+
sig { returns(String) }
|
|
27
|
+
attr_accessor :idempotency_key
|
|
28
|
+
|
|
26
29
|
sig do
|
|
27
30
|
params(
|
|
28
31
|
id: String,
|
|
29
32
|
account: String,
|
|
33
|
+
idempotency_key: String,
|
|
30
34
|
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
31
35
|
).returns(T.attached_class)
|
|
32
36
|
end
|
|
@@ -34,6 +38,7 @@ module XTwitterScraper
|
|
|
34
38
|
id:,
|
|
35
39
|
# X account identifier (@username or account ID)
|
|
36
40
|
account:,
|
|
41
|
+
idempotency_key:,
|
|
37
42
|
request_options: {}
|
|
38
43
|
)
|
|
39
44
|
end
|
|
@@ -43,6 +48,7 @@ module XTwitterScraper
|
|
|
43
48
|
{
|
|
44
49
|
id: String,
|
|
45
50
|
account: String,
|
|
51
|
+
idempotency_key: String,
|
|
46
52
|
request_options: XTwitterScraper::RequestOptions
|
|
47
53
|
}
|
|
48
54
|
)
|