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.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +8 -41
  4. data/lib/x_twitter_scraper/client.rb +1 -1
  5. data/lib/x_twitter_scraper/internal/type/union.rb +13 -0
  6. data/lib/x_twitter_scraper/models/account_retrieve_response.rb +4 -4
  7. data/lib/x_twitter_scraper/models/compose_create_params.rb +194 -122
  8. data/lib/x_twitter_scraper/models/compose_create_response.rb +326 -33
  9. data/lib/x_twitter_scraper/models/credit_retrieve_topup_status_params.rb +2 -2
  10. data/lib/x_twitter_scraper/models/error.rb +99 -3
  11. data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +8 -8
  12. data/lib/x_twitter_scraper/models/guest_wallet_create_params.rb +2 -2
  13. data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +27 -7
  14. data/lib/x_twitter_scraper/models/guest_wallet_topup_params.rb +2 -2
  15. data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +27 -7
  16. data/lib/x_twitter_scraper/models/search_tweet.rb +12 -12
  17. data/lib/x_twitter_scraper/models/support/ticket_create_params.rb +7 -1
  18. data/lib/x_twitter_scraper/models/support/ticket_create_response.rb +40 -3
  19. data/lib/x_twitter_scraper/models/support/ticket_reply_params.rb +7 -1
  20. data/lib/x_twitter_scraper/models/support/ticket_reply_response.rb +40 -3
  21. data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +114 -1
  22. data/lib/x_twitter_scraper/models/x/communities/join_create_params.rb +8 -1
  23. data/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +577 -4
  24. data/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb +8 -1
  25. data/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +585 -4
  26. data/lib/x_twitter_scraper/models/x/community_create_params.rb +8 -1
  27. data/lib/x_twitter_scraper/models/x/community_create_response.rb +568 -8
  28. data/lib/x_twitter_scraper/models/x/community_delete_params.rb +8 -1
  29. data/lib/x_twitter_scraper/models/x/community_delete_response.rb +576 -4
  30. data/lib/x_twitter_scraper/models/x/dm_send_params.rb +8 -1
  31. data/lib/x_twitter_scraper/models/x/dm_send_response.rb +573 -7
  32. data/lib/x_twitter_scraper/models/x/media_upload_params.rb +8 -1
  33. data/lib/x_twitter_scraper/models/x/media_upload_response.rb +568 -11
  34. data/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb +8 -1
  35. data/lib/x_twitter_scraper/models/x/profile_update_avatar_response.rb +576 -4
  36. data/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb +8 -1
  37. data/lib/x_twitter_scraper/models/x/profile_update_banner_response.rb +576 -4
  38. data/lib/x_twitter_scraper/models/x/profile_update_params.rb +8 -1
  39. data/lib/x_twitter_scraper/models/x/profile_update_response.rb +576 -4
  40. data/lib/x_twitter_scraper/models/x/tweet_author.rb +1 -14
  41. data/lib/x_twitter_scraper/models/x/tweet_create_params.rb +5 -5
  42. data/lib/x_twitter_scraper/models/x/tweet_create_response.rb +551 -12
  43. data/lib/x_twitter_scraper/models/x/tweet_delete_params.rb +8 -1
  44. data/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +576 -4
  45. data/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb +8 -1
  46. data/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +576 -4
  47. data/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb +8 -1
  48. data/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +576 -4
  49. data/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb +8 -1
  50. data/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +576 -4
  51. data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb +8 -1
  52. data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +576 -4
  53. data/lib/x_twitter_scraper/models/x/user_remove_follower_params.rb +8 -1
  54. data/lib/x_twitter_scraper/models/x/user_remove_follower_response.rb +576 -4
  55. data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +2 -2
  56. data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +2 -2
  57. data/lib/x_twitter_scraper/models/x/users/follow_create_params.rb +8 -1
  58. data/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +576 -4
  59. data/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb +8 -1
  60. data/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +576 -4
  61. data/lib/x_twitter_scraper/models/x/write_action_retrieve_response.rb +469 -52
  62. data/lib/x_twitter_scraper/models/x/x_account.rb +7 -7
  63. data/lib/x_twitter_scraper/models/x/x_account_detail.rb +1 -1
  64. data/lib/x_twitter_scraper/resources/compose.rb +8 -26
  65. data/lib/x_twitter_scraper/resources/credits.rb +1 -1
  66. data/lib/x_twitter_scraper/resources/extractions.rb +4 -4
  67. data/lib/x_twitter_scraper/resources/guest_wallets.rb +2 -2
  68. data/lib/x_twitter_scraper/resources/monitors/keywords.rb +4 -5
  69. data/lib/x_twitter_scraper/resources/monitors.rb +3 -3
  70. data/lib/x_twitter_scraper/resources/support/tickets.rb +24 -8
  71. data/lib/x_twitter_scraper/resources/trends.rb +1 -1
  72. data/lib/x_twitter_scraper/resources/x/communities/join.rb +22 -8
  73. data/lib/x_twitter_scraper/resources/x/communities.rb +25 -11
  74. data/lib/x_twitter_scraper/resources/x/dm.rb +13 -6
  75. data/lib/x_twitter_scraper/resources/x/media.rb +17 -7
  76. data/lib/x_twitter_scraper/resources/x/profile.rb +46 -17
  77. data/lib/x_twitter_scraper/resources/x/tweets/like.rb +22 -8
  78. data/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +22 -8
  79. data/lib/x_twitter_scraper/resources/x/tweets.rb +31 -16
  80. data/lib/x_twitter_scraper/resources/x/users/follow.rb +22 -8
  81. data/lib/x_twitter_scraper/resources/x/users.rb +16 -9
  82. data/lib/x_twitter_scraper/resources/x.rb +1 -2
  83. data/lib/x_twitter_scraper/version.rb +1 -1
  84. data/rbi/x_twitter_scraper/client.rbi +1 -1
  85. data/rbi/x_twitter_scraper/models/account_retrieve_response.rbi +4 -4
  86. data/rbi/x_twitter_scraper/models/compose_create_params.rbi +392 -215
  87. data/rbi/x_twitter_scraper/models/compose_create_response.rbi +537 -48
  88. data/rbi/x_twitter_scraper/models/credit_retrieve_topup_status_params.rbi +2 -2
  89. data/rbi/x_twitter_scraper/models/error.rbi +379 -13
  90. data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +8 -8
  91. data/rbi/x_twitter_scraper/models/guest_wallet_create_params.rbi +2 -2
  92. data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +87 -5
  93. data/rbi/x_twitter_scraper/models/guest_wallet_topup_params.rbi +2 -2
  94. data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +87 -5
  95. data/rbi/x_twitter_scraper/models/search_tweet.rbi +12 -12
  96. data/rbi/x_twitter_scraper/models/support/ticket_create_params.rbi +9 -1
  97. data/rbi/x_twitter_scraper/models/support/ticket_create_response.rbi +113 -7
  98. data/rbi/x_twitter_scraper/models/support/ticket_reply_params.rbi +9 -1
  99. data/rbi/x_twitter_scraper/models/support/ticket_reply_response.rbi +113 -7
  100. data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +276 -5
  101. data/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi +6 -0
  102. data/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +1154 -3
  103. data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi +6 -0
  104. data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +1154 -3
  105. data/rbi/x_twitter_scraper/models/x/community_create_params.rbi +6 -0
  106. data/rbi/x_twitter_scraper/models/x/community_create_response.rbi +1127 -5
  107. data/rbi/x_twitter_scraper/models/x/community_delete_params.rbi +6 -0
  108. data/rbi/x_twitter_scraper/models/x/community_delete_response.rbi +1148 -3
  109. data/rbi/x_twitter_scraper/models/x/dm_send_params.rbi +6 -0
  110. data/rbi/x_twitter_scraper/models/x/dm_send_response.rbi +1112 -6
  111. data/rbi/x_twitter_scraper/models/x/media_upload_params.rbi +6 -0
  112. data/rbi/x_twitter_scraper/models/x/media_upload_response.rbi +1124 -9
  113. data/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi +6 -0
  114. data/rbi/x_twitter_scraper/models/x/profile_update_avatar_response.rbi +1152 -3
  115. data/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi +6 -0
  116. data/rbi/x_twitter_scraper/models/x/profile_update_banner_response.rbi +1152 -3
  117. data/rbi/x_twitter_scraper/models/x/profile_update_params.rbi +6 -0
  118. data/rbi/x_twitter_scraper/models/x/profile_update_response.rbi +1144 -3
  119. data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +3 -13
  120. data/rbi/x_twitter_scraper/models/x/tweet_create_params.rbi +5 -8
  121. data/rbi/x_twitter_scraper/models/x/tweet_create_response.rbi +1108 -14
  122. data/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi +6 -0
  123. data/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi +1140 -3
  124. data/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi +6 -0
  125. data/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi +1154 -3
  126. data/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi +6 -0
  127. data/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi +1154 -3
  128. data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi +6 -0
  129. data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi +1154 -3
  130. data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi +6 -0
  131. data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi +1154 -3
  132. data/rbi/x_twitter_scraper/models/x/user_remove_follower_params.rbi +6 -0
  133. data/rbi/x_twitter_scraper/models/x/user_remove_follower_response.rbi +1152 -3
  134. data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +2 -2
  135. data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +2 -2
  136. data/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi +6 -0
  137. data/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi +1154 -3
  138. data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi +6 -0
  139. data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi +1154 -3
  140. data/rbi/x_twitter_scraper/models/x/write_action_retrieve_response.rbi +930 -66
  141. data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -9
  142. data/rbi/x_twitter_scraper/models/x/x_account_detail.rbi +1 -1
  143. data/rbi/x_twitter_scraper/resources/compose.rbi +12 -38
  144. data/rbi/x_twitter_scraper/resources/credits.rbi +1 -1
  145. data/rbi/x_twitter_scraper/resources/extractions.rbi +4 -4
  146. data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +2 -2
  147. data/rbi/x_twitter_scraper/resources/monitors/keywords.rbi +4 -5
  148. data/rbi/x_twitter_scraper/resources/monitors.rbi +3 -3
  149. data/rbi/x_twitter_scraper/resources/support/tickets.rbi +17 -2
  150. data/rbi/x_twitter_scraper/resources/trends.rbi +1 -1
  151. data/rbi/x_twitter_scraper/resources/x/communities/join.rbi +16 -4
  152. data/rbi/x_twitter_scraper/resources/x/communities.rbi +19 -7
  153. data/rbi/x_twitter_scraper/resources/x/dm.rbi +10 -3
  154. data/rbi/x_twitter_scraper/resources/x/media.rbi +9 -4
  155. data/rbi/x_twitter_scraper/resources/x/profile.rbi +27 -8
  156. data/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +16 -4
  157. data/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +16 -4
  158. data/rbi/x_twitter_scraper/resources/x/tweets.rbi +31 -12
  159. data/rbi/x_twitter_scraper/resources/x/users/follow.rbi +16 -4
  160. data/rbi/x_twitter_scraper/resources/x/users.rbi +13 -7
  161. data/rbi/x_twitter_scraper/resources/x.rbi +1 -2
  162. data/sig/x_twitter_scraper/models/compose_create_params.rbs +150 -90
  163. data/sig/x_twitter_scraper/models/compose_create_response.rbs +249 -27
  164. data/sig/x_twitter_scraper/models/error.rbs +170 -7
  165. data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +35 -5
  166. data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +35 -5
  167. data/sig/x_twitter_scraper/models/support/ticket_create_params.rbs +7 -1
  168. data/sig/x_twitter_scraper/models/support/ticket_create_response.rbs +49 -5
  169. data/sig/x_twitter_scraper/models/support/ticket_reply_params.rbs +7 -1
  170. data/sig/x_twitter_scraper/models/support/ticket_reply_response.rbs +49 -5
  171. data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +113 -2
  172. data/sig/x_twitter_scraper/models/x/communities/join_create_params.rbs +5 -1
  173. data/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs +540 -4
  174. data/sig/x_twitter_scraper/models/x/communities/join_delete_all_params.rbs +5 -1
  175. data/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs +540 -4
  176. data/sig/x_twitter_scraper/models/x/community_create_params.rbs +10 -1
  177. data/sig/x_twitter_scraper/models/x/community_create_response.rbs +528 -7
  178. data/sig/x_twitter_scraper/models/x/community_delete_params.rbs +10 -1
  179. data/sig/x_twitter_scraper/models/x/community_delete_response.rbs +540 -4
  180. data/sig/x_twitter_scraper/models/x/dm_send_params.rbs +5 -0
  181. data/sig/x_twitter_scraper/models/x/dm_send_response.rbs +539 -5
  182. data/sig/x_twitter_scraper/models/x/media_upload_params.rbs +5 -1
  183. data/sig/x_twitter_scraper/models/x/media_upload_response.rbs +534 -7
  184. data/sig/x_twitter_scraper/models/x/profile_update_avatar_params.rbs +5 -1
  185. data/sig/x_twitter_scraper/models/x/profile_update_avatar_response.rbs +540 -4
  186. data/sig/x_twitter_scraper/models/x/profile_update_banner_params.rbs +5 -1
  187. data/sig/x_twitter_scraper/models/x/profile_update_banner_response.rbs +540 -4
  188. data/sig/x_twitter_scraper/models/x/profile_update_params.rbs +5 -0
  189. data/sig/x_twitter_scraper/models/x/profile_update_response.rbs +540 -4
  190. data/sig/x_twitter_scraper/models/x/tweet_author.rbs +3 -11
  191. data/sig/x_twitter_scraper/models/x/tweet_create_params.rbs +4 -6
  192. data/sig/x_twitter_scraper/models/x/tweet_create_response.rbs +518 -11
  193. data/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs +5 -1
  194. data/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs +540 -4
  195. data/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs +5 -1
  196. data/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs +540 -4
  197. data/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs +5 -1
  198. data/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs +540 -4
  199. data/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs +5 -1
  200. data/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs +540 -4
  201. data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs +5 -1
  202. data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs +540 -4
  203. data/sig/x_twitter_scraper/models/x/user_remove_follower_params.rbs +5 -1
  204. data/sig/x_twitter_scraper/models/x/user_remove_follower_response.rbs +540 -4
  205. data/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs +5 -1
  206. data/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs +540 -4
  207. data/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs +5 -1
  208. data/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs +540 -4
  209. data/sig/x_twitter_scraper/models/x/write_action_retrieve_response.rbs +428 -54
  210. data/sig/x_twitter_scraper/resources/compose.rbs +2 -12
  211. data/sig/x_twitter_scraper/resources/support/tickets.rbs +2 -0
  212. data/sig/x_twitter_scraper/resources/x/communities/join.rbs +2 -0
  213. data/sig/x_twitter_scraper/resources/x/communities.rbs +2 -0
  214. data/sig/x_twitter_scraper/resources/x/dm.rbs +1 -0
  215. data/sig/x_twitter_scraper/resources/x/media.rbs +1 -0
  216. data/sig/x_twitter_scraper/resources/x/profile.rbs +3 -0
  217. data/sig/x_twitter_scraper/resources/x/tweets/like.rbs +2 -0
  218. data/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +2 -0
  219. data/sig/x_twitter_scraper/resources/x/tweets.rbs +2 -1
  220. data/sig/x_twitter_scraper/resources/x/users/follow.rbs +2 -0
  221. data/sig/x_twitter_scraper/resources/x/users.rbs +1 -0
  222. metadata +17 -26
@@ -144,17 +144,37 @@ module XTwitterScraper
144
144
  class Authorization < XTwitterScraper::Internal::Type::BaseModel
145
145
  # @!attribute header
146
146
  #
147
- # @return [Symbol, :Authorization]
148
- required :header, const: :Authorization
147
+ # @return [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header]
148
+ required :header, enum: -> { XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header }
149
149
 
150
150
  # @!attribute scheme
151
151
  #
152
- # @return [Symbol, :Bearer]
153
- required :scheme, const: :Bearer
152
+ # @return [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme]
153
+ required :scheme, enum: -> { XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme }
154
154
 
155
- # @!method initialize(header: :Authorization, scheme: :Bearer)
156
- # @param header [Symbol, :Authorization]
157
- # @param scheme [Symbol, :Bearer]
155
+ # @!method initialize(header:, scheme:)
156
+ # @param header [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Header]
157
+ # @param scheme [Symbol, XTwitterScraper::Models::GuestWalletTopupResponse::Authorization::Scheme]
158
+
159
+ # @see XTwitterScraper::Models::GuestWalletTopupResponse::Authorization#header
160
+ module Header
161
+ extend XTwitterScraper::Internal::Type::Enum
162
+
163
+ AUTHORIZATION = :Authorization
164
+
165
+ # @!method self.values
166
+ # @return [Array<Symbol>]
167
+ end
168
+
169
+ # @see XTwitterScraper::Models::GuestWalletTopupResponse::Authorization#scheme
170
+ module Scheme
171
+ extend XTwitterScraper::Internal::Type::Enum
172
+
173
+ BEARER = :Bearer
174
+
175
+ # @!method self.values
176
+ # @return [Array<Symbol>]
177
+ end
158
178
  end
159
179
 
160
180
  # @see XTwitterScraper::Models::GuestWalletTopupResponse#credential_notice
@@ -68,7 +68,7 @@ module XTwitterScraper
68
68
  optional :created_at, String, api_name: :createdAt
69
69
 
70
70
  # @!attribute display_text_range
71
- # Start and end offsets for rendered tweet text
71
+ # Rendered text's start and end offsets.
72
72
  #
73
73
  # @return [Array<Integer>, nil]
74
74
  optional :display_text_range,
@@ -83,19 +83,19 @@ module XTwitterScraper
83
83
  optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
84
84
 
85
85
  # @!attribute in_reply_to_id
86
- # Tweet ID being replied to
86
+ # ID of the tweet this result replies to.
87
87
  #
88
88
  # @return [String, nil]
89
89
  optional :in_reply_to_id, String, api_name: :inReplyToId
90
90
 
91
91
  # @!attribute in_reply_to_user_id
92
- # User ID being replied to
92
+ # ID of the user this result replies to.
93
93
  #
94
94
  # @return [String, nil]
95
95
  optional :in_reply_to_user_id, String, api_name: :inReplyToUserId
96
96
 
97
97
  # @!attribute in_reply_to_username
98
- # Username being replied to
98
+ # Username this result replies to.
99
99
  #
100
100
  # @return [String, nil]
101
101
  optional :in_reply_to_username, String, api_name: :inReplyToUsername
@@ -125,7 +125,7 @@ module XTwitterScraper
125
125
  optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply
126
126
 
127
127
  # @!attribute lang
128
- # Tweet language code
128
+ # Search result language code.
129
129
  #
130
130
  # @return [String, nil]
131
131
  optional :lang, String
@@ -164,7 +164,7 @@ module XTwitterScraper
164
164
  optional :type, String
165
165
 
166
166
  # @!attribute url
167
- # Tweet permalink URL
167
+ # Search result permalink.
168
168
  #
169
169
  # @return [String, nil]
170
170
  optional :url, String
@@ -200,15 +200,15 @@ module XTwitterScraper
200
200
  #
201
201
  # @param created_at [String]
202
202
  #
203
- # @param display_text_range [Array<Integer>] Start and end offsets for rendered tweet text
203
+ # @param display_text_range [Array<Integer>] Rendered text's start and end offsets.
204
204
  #
205
205
  # @param entities [Hash{Symbol=>Object}] Parsed search-result entities including URLs, mentions, hashtags, and media mark
206
206
  #
207
- # @param in_reply_to_id [String] Tweet ID being replied to
207
+ # @param in_reply_to_id [String] ID of the tweet this result replies to.
208
208
  #
209
- # @param in_reply_to_user_id [String] User ID being replied to
209
+ # @param in_reply_to_user_id [String] ID of the user this result replies to.
210
210
  #
211
- # @param in_reply_to_username [String] Username being replied to
211
+ # @param in_reply_to_username [String] Username this result replies to.
212
212
  #
213
213
  # @param is_limited_reply [Boolean] Whether the tweet has limited reply permissions
214
214
  #
@@ -218,7 +218,7 @@ module XTwitterScraper
218
218
  #
219
219
  # @param is_reply [Boolean] True when this search result is a reply
220
220
  #
221
- # @param lang [String] Tweet language code
221
+ # @param lang [String] Search result language code.
222
222
  #
223
223
  # @param media [Array<XTwitterScraper::Models::TweetMedia>] Search-result media attachments, omitted when no media is present
224
224
  #
@@ -230,7 +230,7 @@ module XTwitterScraper
230
230
  #
231
231
  # @param type [String]
232
232
  #
233
- # @param url [String] Tweet permalink URL
233
+ # @param url [String] Search result permalink.
234
234
  end
235
235
  end
236
236
  end
@@ -18,9 +18,15 @@ module XTwitterScraper
18
18
  # @return [String]
19
19
  required :subject, String
20
20
 
21
- # @!method initialize(body:, subject:, request_options: {})
21
+ # @!attribute idempotency_key
22
+ #
23
+ # @return [String, nil]
24
+ optional :idempotency_key, String
25
+
26
+ # @!method initialize(body:, subject:, idempotency_key: nil, request_options: {})
22
27
  # @param body [String]
23
28
  # @param subject [String]
29
+ # @param idempotency_key [String]
24
30
  # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
25
31
  end
26
32
  end
@@ -5,13 +5,50 @@ module XTwitterScraper
5
5
  module Support
6
6
  # @see XTwitterScraper::Resources::Support::Tickets#create
7
7
  class TicketCreateResponse < XTwitterScraper::Internal::Type::BaseModel
8
+ # @!attribute attachments
9
+ #
10
+ # @return [Array<XTwitterScraper::Models::Support::TicketCreateResponse::Attachment>]
11
+ required :attachments,
12
+ -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketCreateResponse::Attachment] }
13
+
8
14
  # @!attribute public_id
9
15
  #
10
- # @return [String, nil]
11
- optional :public_id, String, api_name: :publicId
16
+ # @return [String]
17
+ required :public_id, String, api_name: :publicId
12
18
 
13
- # @!method initialize(public_id: nil)
19
+ # @!method initialize(attachments:, public_id:)
20
+ # @param attachments [Array<XTwitterScraper::Models::Support::TicketCreateResponse::Attachment>]
14
21
  # @param public_id [String]
22
+
23
+ class Attachment < XTwitterScraper::Internal::Type::BaseModel
24
+ # @!attribute public_id
25
+ #
26
+ # @return [String]
27
+ required :public_id, String, api_name: :publicId
28
+
29
+ # @!attribute status
30
+ #
31
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketCreateResponse::Attachment::Status]
32
+ required :status, enum: -> { XTwitterScraper::Models::Support::TicketCreateResponse::Attachment::Status }
33
+
34
+ # @!method initialize(public_id:, status:)
35
+ # Attachment identifier and initial processing state.
36
+ #
37
+ # @param public_id [String]
38
+ # @param status [Symbol, XTwitterScraper::Models::Support::TicketCreateResponse::Attachment::Status]
39
+
40
+ # @see XTwitterScraper::Models::Support::TicketCreateResponse::Attachment#status
41
+ module Status
42
+ extend XTwitterScraper::Internal::Type::Enum
43
+
44
+ PENDING = :pending
45
+ READY = :ready
46
+ FAILED = :failed
47
+
48
+ # @!method self.values
49
+ # @return [Array<Symbol>]
50
+ end
51
+ end
15
52
  end
16
53
  end
17
54
  end
@@ -18,9 +18,15 @@ module XTwitterScraper
18
18
  # @return [String]
19
19
  required :body, String
20
20
 
21
- # @!method initialize(id:, body:, request_options: {})
21
+ # @!attribute idempotency_key
22
+ #
23
+ # @return [String, nil]
24
+ optional :idempotency_key, String
25
+
26
+ # @!method initialize(id:, body:, idempotency_key: nil, request_options: {})
22
27
  # @param id [String]
23
28
  # @param body [String]
29
+ # @param idempotency_key [String]
24
30
  # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
25
31
  end
26
32
  end
@@ -5,13 +5,50 @@ module XTwitterScraper
5
5
  module Support
6
6
  # @see XTwitterScraper::Resources::Support::Tickets#reply
7
7
  class TicketReplyResponse < XTwitterScraper::Internal::Type::BaseModel
8
+ # @!attribute attachments
9
+ #
10
+ # @return [Array<XTwitterScraper::Models::Support::TicketReplyResponse::Attachment>]
11
+ required :attachments,
12
+ -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketReplyResponse::Attachment] }
13
+
8
14
  # @!attribute public_id
9
15
  #
10
- # @return [String, nil]
11
- optional :public_id, String, api_name: :publicId
16
+ # @return [String]
17
+ required :public_id, String, api_name: :publicId
12
18
 
13
- # @!method initialize(public_id: nil)
19
+ # @!method initialize(attachments:, public_id:)
20
+ # @param attachments [Array<XTwitterScraper::Models::Support::TicketReplyResponse::Attachment>]
14
21
  # @param public_id [String]
22
+
23
+ class Attachment < XTwitterScraper::Internal::Type::BaseModel
24
+ # @!attribute public_id
25
+ #
26
+ # @return [String]
27
+ required :public_id, String, api_name: :publicId
28
+
29
+ # @!attribute status
30
+ #
31
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketReplyResponse::Attachment::Status]
32
+ required :status, enum: -> { XTwitterScraper::Models::Support::TicketReplyResponse::Attachment::Status }
33
+
34
+ # @!method initialize(public_id:, status:)
35
+ # Attachment identifier and initial processing state.
36
+ #
37
+ # @param public_id [String]
38
+ # @param status [Symbol, XTwitterScraper::Models::Support::TicketReplyResponse::Attachment::Status]
39
+
40
+ # @see XTwitterScraper::Models::Support::TicketReplyResponse::Attachment#status
41
+ module Status
42
+ extend XTwitterScraper::Internal::Type::Enum
43
+
44
+ PENDING = :pending
45
+ READY = :ready
46
+ FAILED = :failed
47
+
48
+ # @!method self.values
49
+ # @return [Array<Symbol>]
50
+ end
51
+ end
15
52
  end
16
53
  end
17
54
  end
@@ -45,6 +45,12 @@ module XTwitterScraper
45
45
  # @param updated_at [Time]
46
46
 
47
47
  class Message < XTwitterScraper::Internal::Type::BaseModel
48
+ # @!attribute attachments
49
+ #
50
+ # @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>, nil]
51
+ optional :attachments,
52
+ -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment] }
53
+
48
54
  # @!attribute body
49
55
  #
50
56
  # @return [String, nil]
@@ -60,10 +66,117 @@ module XTwitterScraper
60
66
  # @return [String, nil]
61
67
  optional :sender, String
62
68
 
63
- # @!method initialize(body: nil, created_at: nil, sender: nil)
69
+ # @!method initialize(attachments: nil, body: nil, created_at: nil, sender: nil)
70
+ # @param attachments [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>]
64
71
  # @param body [String]
65
72
  # @param created_at [Time]
66
73
  # @param sender [String]
74
+
75
+ class Attachment < XTwitterScraper::Internal::Type::BaseModel
76
+ # @!attribute content_type
77
+ # Validated media type.
78
+ #
79
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType]
80
+ required :content_type,
81
+ enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType },
82
+ api_name: :contentType
83
+
84
+ # @!attribute filename
85
+ #
86
+ # @return [String]
87
+ required :filename, String
88
+
89
+ # @!attribute kind
90
+ # Attachment media class.
91
+ #
92
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind]
93
+ required :kind,
94
+ enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind }
95
+
96
+ # @!attribute public_id
97
+ #
98
+ # @return [String]
99
+ required :public_id, String, api_name: :publicId
100
+
101
+ # @!attribute size_bytes
102
+ #
103
+ # @return [Integer]
104
+ required :size_bytes, Integer, api_name: :sizeBytes
105
+
106
+ # @!attribute status
107
+ # Storage processing state.
108
+ #
109
+ # @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status]
110
+ required :status,
111
+ enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status }
112
+
113
+ # @!attribute url
114
+ #
115
+ # @return [String]
116
+ required :url, String
117
+
118
+ # @!method initialize(content_type:, filename:, kind:, public_id:, size_bytes:, status:, url:)
119
+ # Downloadable image or video attached to a support message.
120
+ #
121
+ # @param content_type [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::ContentType] Validated media type.
122
+ #
123
+ # @param filename [String]
124
+ #
125
+ # @param kind [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Kind] Attachment media class.
126
+ #
127
+ # @param public_id [String]
128
+ #
129
+ # @param size_bytes [Integer]
130
+ #
131
+ # @param status [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment::Status] Storage processing state.
132
+ #
133
+ # @param url [String]
134
+
135
+ # Validated media type.
136
+ #
137
+ # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment#content_type
138
+ module ContentType
139
+ extend XTwitterScraper::Internal::Type::Enum
140
+
141
+ IMAGE_JPEG = :"image/jpeg"
142
+ IMAGE_PNG = :"image/png"
143
+ IMAGE_GIF = :"image/gif"
144
+ IMAGE_WEBP = :"image/webp"
145
+ VIDEO_MP4 = :"video/mp4"
146
+ VIDEO_QUICKTIME = :"video/quicktime"
147
+ VIDEO_WEBM = :"video/webm"
148
+
149
+ # @!method self.values
150
+ # @return [Array<Symbol>]
151
+ end
152
+
153
+ # Attachment media class.
154
+ #
155
+ # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment#kind
156
+ module Kind
157
+ extend XTwitterScraper::Internal::Type::Enum
158
+
159
+ IMAGE = :image
160
+ VIDEO = :video
161
+
162
+ # @!method self.values
163
+ # @return [Array<Symbol>]
164
+ end
165
+
166
+ # Storage processing state.
167
+ #
168
+ # @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment#status
169
+ module Status
170
+ extend XTwitterScraper::Internal::Type::Enum
171
+
172
+ PENDING = :pending
173
+ READY = :ready
174
+ FAILED = :failed
175
+
176
+ # @!method self.values
177
+ # @return [Array<Symbol>]
178
+ end
179
+ end
67
180
  end
68
181
  end
69
182
  end
@@ -20,11 +20,18 @@ module XTwitterScraper
20
20
  # @return [String]
21
21
  required :account, String
22
22
 
23
- # @!method initialize(id:, account:, request_options: {})
23
+ # @!attribute idempotency_key
24
+ #
25
+ # @return [String]
26
+ required :idempotency_key, String
27
+
28
+ # @!method initialize(id:, account:, idempotency_key:, request_options: {})
24
29
  # @param id [String]
25
30
  #
26
31
  # @param account [String] X account identifier (@username or account ID)
27
32
  #
33
+ # @param idempotency_key [String]
34
+ #
28
35
  # @param request_options [XTwitterScraper::RequestOptions, Hash{Symbol=>Object}]
29
36
  end
30
37
  end