x-twitter-scraper 0.6.0 → 0.7.0
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 +12 -0
- data/README.md +1 -1
- data/lib/x_twitter_scraper/internal/type/union.rb +25 -9
- data/lib/x_twitter_scraper/models/content_disclosure.rb +1 -9
- data/lib/x_twitter_scraper/models/embedded_tweet.rb +389 -1
- data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -5
- data/lib/x_twitter_scraper/models/search_tweet.rb +371 -1
- data/lib/x_twitter_scraper/models/support/ticket_list_response.rb +30 -17
- data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +49 -24
- data/lib/x_twitter_scraper/models/support/ticket_update_response.rb +18 -6
- data/lib/x_twitter_scraper/models/trend_list_response.rb +28 -1
- data/lib/x_twitter_scraper/models/tweet_media.rb +213 -1
- data/lib/x_twitter_scraper/models/user_profile.rb +211 -21
- data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rb +60 -26
- data/lib/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/account_create_response.rb +149 -2
- data/lib/x_twitter_scraper/models/x/account_reauth_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/communities/tweet_list_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/community_retrieve_info_response.rb +1 -17
- data/lib/x_twitter_scraper/models/x/community_retrieve_search_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/list_retrieve_tweets_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/tweet_author.rb +14 -1
- data/lib/x_twitter_scraper/models/x/tweet_detail.rb +373 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +34 -6
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +345 -0
- data/lib/x_twitter_scraper/models/x/tweet_get_thread_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +3 -5
- data/lib/x_twitter_scraper/models/x_get_article_response.rb +1 -7
- data/lib/x_twitter_scraper/models/x_get_trends_response.rb +28 -1
- data/lib/x_twitter_scraper/resources/x/account_connection_attempts.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/accounts.rb +2 -2
- data/lib/x_twitter_scraper/resources/x/communities/tweets.rb +2 -2
- data/lib/x_twitter_scraper/resources/x/communities.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/lists.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/tweets.rb +14 -11
- data/lib/x_twitter_scraper/resources/x/users.rb +5 -5
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +2 -1
- data/rbi/x_twitter_scraper/models/content_disclosure.rbi +1 -15
- data/rbi/x_twitter_scraper/models/embedded_tweet.rbi +708 -3
- data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -5
- data/rbi/x_twitter_scraper/models/search_tweet.rbi +674 -3
- data/rbi/x_twitter_scraper/models/support/ticket_list_response.rbi +75 -55
- data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +129 -87
- data/rbi/x_twitter_scraper/models/support/ticket_update_response.rbi +62 -13
- data/rbi/x_twitter_scraper/models/trend_list_response.rbi +40 -3
- data/rbi/x_twitter_scraper/models/tweet_media.rbi +313 -3
- data/rbi/x_twitter_scraper/models/user_profile.rbi +340 -29
- data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbi +61 -83
- data/rbi/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/account_create_response.rbi +264 -2
- data/rbi/x_twitter_scraper/models/x/account_reauth_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/communities/tweet_list_by_community_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/communities/tweet_list_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/community_retrieve_info_response.rbi +0 -22
- data/rbi/x_twitter_scraper/models/x/community_retrieve_search_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/list_retrieve_tweets_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +13 -3
- data/rbi/x_twitter_scraper/models/x/tweet_detail.rbi +690 -3
- data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +68 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +527 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_thread_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +4 -8
- data/rbi/x_twitter_scraper/models/x_get_article_response.rbi +0 -9
- data/rbi/x_twitter_scraper/models/x_get_trends_response.rbi +40 -3
- data/rbi/x_twitter_scraper/resources/x/accounts.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/x/communities/tweets.rbi +4 -8
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +2 -4
- data/rbi/x_twitter_scraper/resources/x/lists.rbi +2 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +20 -18
- data/rbi/x_twitter_scraper/resources/x/users.rbi +10 -20
- data/sig/x_twitter_scraper/models/content_disclosure.rbs +1 -11
- data/sig/x_twitter_scraper/models/embedded_tweet.rbs +343 -62
- data/sig/x_twitter_scraper/models/search_tweet.rbs +333 -70
- data/sig/x_twitter_scraper/models/support/ticket_list_response.rbs +29 -32
- data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +49 -48
- data/sig/x_twitter_scraper/models/support/ticket_update_response.rbs +25 -7
- data/sig/x_twitter_scraper/models/trend_list_response.rbs +16 -20
- data/sig/x_twitter_scraper/models/tweet_media.rbs +146 -15
- data/sig/x_twitter_scraper/models/user_profile.rbs +164 -86
- data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbs +50 -33
- data/sig/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/account_create_response.rbs +147 -1
- data/sig/x_twitter_scraper/models/x/account_reauth_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/community_retrieve_info_response.rbs +0 -14
- data/sig/x_twitter_scraper/models/x/tweet_author.rbs +11 -3
- data/sig/x_twitter_scraper/models/x/tweet_detail.rbs +333 -70
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +26 -0
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_response.rbs +274 -0
- data/sig/x_twitter_scraper/models/x_get_article_response.rbs +0 -7
- data/sig/x_twitter_scraper/models/x_get_trends_response.rbs +25 -3
- data/sig/x_twitter_scraper/resources/x/accounts.rbs +1 -1
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +3 -1
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9eea1f78b8204ff6a1873f23fceea72968444a55e8d0f3843f950ed4763cb33b
|
|
4
|
+
data.tar.gz: ed862a57848c9534d65e9162ccc3b777d10a1526003a3d82dbfd113ca4f41c24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b1b7c117741251b9932dcf8cb3923c545506967c3a37c5950ca648c0f9d2c9a88c96e5634a283a7ec965a1e619c2491bf3d41cf71701a37e3755c2a7bd231de
|
|
7
|
+
data.tar.gz: de4c90cc4b7451f1ee3c09326617c5f3a688d71dcfe3f86429a3b8dea0ba45a93523647db2243682f89cef16e0892c05a2f59de49797585fe016416baa3e9c18
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0 (2026-07-31)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.6.1...v0.7.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.6.1...v0.7.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add complete reply extraction, rich response contracts, and compatible typed account outcomes ([#28](https://github.com/Xquik-dev/x-twitter-scraper-ruby/pull/28)) ([f638d05](https://github.com/Xquik-dev/x-twitter-scraper-ruby/commit/f638d05a1a633c223f2683a64abc1dbab233af6a))
|
|
10
|
+
|
|
11
|
+
## 0.6.1 (2026-07-30)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.6.0...v0.6.1](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.6.0...v0.6.1)
|
|
14
|
+
|
|
3
15
|
## 0.6.0 (2026-07-29)
|
|
4
16
|
|
|
5
17
|
Full Changelog: [v0.5.7...v0.6.0](https://github.com/Xquik-dev/x-twitter-scraper-ruby/compare/v0.5.7...v0.6.0)
|
data/README.md
CHANGED
|
@@ -10,16 +10,32 @@ module XTwitterScraper
|
|
|
10
10
|
# @api private
|
|
11
11
|
#
|
|
12
12
|
# @example
|
|
13
|
-
# # `
|
|
14
|
-
# case
|
|
15
|
-
# when XTwitterScraper::Models::
|
|
16
|
-
# puts(
|
|
17
|
-
# when XTwitterScraper::Models::
|
|
18
|
-
# puts(
|
|
19
|
-
# when XTwitterScraper::Models::
|
|
20
|
-
# puts(
|
|
13
|
+
# # `account_connection_attempt_retrieve_response` is a `XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse`
|
|
14
|
+
# case account_connection_attempt_retrieve_response
|
|
15
|
+
# when XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Pending
|
|
16
|
+
# puts(account_connection_attempt_retrieve_response.id)
|
|
17
|
+
# when XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Success
|
|
18
|
+
# puts(account_connection_attempt_retrieve_response.object)
|
|
19
|
+
# when XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::Failed
|
|
20
|
+
# puts(account_connection_attempt_retrieve_response.error)
|
|
21
|
+
# when XTwitterScraper::Models::X::AccountConnectionAttemptRetrieveResponse::RequiresEmailCode
|
|
22
|
+
# puts(account_connection_attempt_retrieve_response.message)
|
|
21
23
|
# else
|
|
22
|
-
# puts(
|
|
24
|
+
# puts(account_connection_attempt_retrieve_response)
|
|
25
|
+
# end
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# case account_connection_attempt_retrieve_response
|
|
29
|
+
# in {status: :pending, id: id, object: object, poll_after_ms: poll_after_ms}
|
|
30
|
+
# puts(id)
|
|
31
|
+
# in {status: :success, id: id, object: object}
|
|
32
|
+
# puts(object)
|
|
33
|
+
# in {status: :failed, id: id, error: error, object: object}
|
|
34
|
+
# puts(error)
|
|
35
|
+
# in {status: :requires_email_code, id: id, message: message}
|
|
36
|
+
# puts(message)
|
|
37
|
+
# else
|
|
38
|
+
# puts(account_connection_attempt_retrieve_response)
|
|
23
39
|
# end
|
|
24
40
|
module Union
|
|
25
41
|
include XTwitterScraper::Internal::Type::Converter
|
|
@@ -38,12 +38,6 @@ module XTwitterScraper
|
|
|
38
38
|
|
|
39
39
|
# @see XTwitterScraper::Models::ContentDisclosure#ai_generated
|
|
40
40
|
class AIGenerated < XTwitterScraper::Internal::Type::BaseModel
|
|
41
|
-
# @!attribute can_edit
|
|
42
|
-
# Whether the disclosure can be edited on X.
|
|
43
|
-
#
|
|
44
|
-
# @return [Boolean, nil]
|
|
45
|
-
optional :can_edit, XTwitterScraper::Internal::Type::Boolean, api_name: :canEdit
|
|
46
|
-
|
|
47
41
|
# @!attribute detection_source
|
|
48
42
|
# Source of the AI-generated media disclosure.
|
|
49
43
|
#
|
|
@@ -58,9 +52,7 @@ module XTwitterScraper
|
|
|
58
52
|
XTwitterScraper::Internal::Type::Boolean,
|
|
59
53
|
api_name: :hasAiGeneratedMedia
|
|
60
54
|
|
|
61
|
-
# @!method initialize(
|
|
62
|
-
# @param can_edit [Boolean] Whether the disclosure can be edited on X.
|
|
63
|
-
#
|
|
55
|
+
# @!method initialize(detection_source: nil, has_ai_generated_media: nil)
|
|
64
56
|
# @param detection_source [String] Source of the AI-generated media disclosure.
|
|
65
57
|
#
|
|
66
58
|
# @param has_ai_generated_media [Boolean] True when X labels the tweet as containing AI-generated media.
|
|
@@ -47,12 +47,30 @@ module XTwitterScraper
|
|
|
47
47
|
# @return [Integer]
|
|
48
48
|
required :view_count, Integer, api_name: :viewCount
|
|
49
49
|
|
|
50
|
+
# @!attribute article
|
|
51
|
+
# Article metadata attached to a tweet.
|
|
52
|
+
#
|
|
53
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::Article, nil]
|
|
54
|
+
optional :article, -> { XTwitterScraper::EmbeddedTweet::Article }
|
|
55
|
+
|
|
50
56
|
# @!attribute author
|
|
51
57
|
# X user profile with bio, follower counts, and verification status.
|
|
52
58
|
#
|
|
53
59
|
# @return [XTwitterScraper::Models::UserProfile, nil]
|
|
54
60
|
optional :author, -> { XTwitterScraper::UserProfile }
|
|
55
61
|
|
|
62
|
+
# @!attribute card
|
|
63
|
+
# Public card metadata attached to a tweet.
|
|
64
|
+
#
|
|
65
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::Card, nil]
|
|
66
|
+
optional :card, -> { XTwitterScraper::EmbeddedTweet::Card }
|
|
67
|
+
|
|
68
|
+
# @!attribute community_note
|
|
69
|
+
# Community Note presentation metadata returned by X.
|
|
70
|
+
#
|
|
71
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::CommunityNote, nil]
|
|
72
|
+
optional :community_note, -> { XTwitterScraper::EmbeddedTweet::CommunityNote }, api_name: :communityNote
|
|
73
|
+
|
|
56
74
|
# @!attribute content_disclosure
|
|
57
75
|
# Content disclosure metadata shown by X when a tweet is labeled as paid
|
|
58
76
|
# partnership content or AI-generated media.
|
|
@@ -77,6 +95,12 @@ module XTwitterScraper
|
|
|
77
95
|
XTwitterScraper::Internal::Type::ArrayOf[Integer],
|
|
78
96
|
api_name: :displayTextRange
|
|
79
97
|
|
|
98
|
+
# @!attribute edit
|
|
99
|
+
# Edit history metadata returned by X.
|
|
100
|
+
#
|
|
101
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::Edit, nil]
|
|
102
|
+
optional :edit, -> { XTwitterScraper::EmbeddedTweet::Edit }
|
|
103
|
+
|
|
80
104
|
# @!attribute entities
|
|
81
105
|
#
|
|
82
106
|
# @return [Hash{Symbol=>Object}, nil]
|
|
@@ -117,6 +141,11 @@ module XTwitterScraper
|
|
|
117
141
|
# @return [Boolean, nil]
|
|
118
142
|
optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply
|
|
119
143
|
|
|
144
|
+
# @!attribute is_translatable
|
|
145
|
+
#
|
|
146
|
+
# @return [Boolean, nil]
|
|
147
|
+
optional :is_translatable, XTwitterScraper::Internal::Type::Boolean, api_name: :isTranslatable
|
|
148
|
+
|
|
120
149
|
# @!attribute lang
|
|
121
150
|
#
|
|
122
151
|
# @return [String, nil]
|
|
@@ -127,6 +156,47 @@ module XTwitterScraper
|
|
|
127
156
|
# @return [Array<XTwitterScraper::Models::TweetMedia>, nil]
|
|
128
157
|
optional :media, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia] }
|
|
129
158
|
|
|
159
|
+
# @!attribute note_tweet
|
|
160
|
+
# Complete Note Tweet content and rich-text metadata.
|
|
161
|
+
#
|
|
162
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::NoteTweet, nil]
|
|
163
|
+
optional :note_tweet, -> { XTwitterScraper::EmbeddedTweet::NoteTweet }, api_name: :noteTweet
|
|
164
|
+
|
|
165
|
+
# @!attribute place
|
|
166
|
+
# Public place metadata attached to a tweet.
|
|
167
|
+
#
|
|
168
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::Place, nil]
|
|
169
|
+
optional :place, -> { XTwitterScraper::EmbeddedTweet::Place }
|
|
170
|
+
|
|
171
|
+
# @!attribute possibly_sensitive
|
|
172
|
+
#
|
|
173
|
+
# @return [Boolean, nil]
|
|
174
|
+
optional :possibly_sensitive, XTwitterScraper::Internal::Type::Boolean, api_name: :possiblySensitive
|
|
175
|
+
|
|
176
|
+
# @!attribute previous_counts
|
|
177
|
+
# Engagement counts retained from a prior tweet edit.
|
|
178
|
+
#
|
|
179
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet::PreviousCounts, nil]
|
|
180
|
+
optional :previous_counts,
|
|
181
|
+
-> { XTwitterScraper::EmbeddedTweet::PreviousCounts },
|
|
182
|
+
api_name: :previousCounts
|
|
183
|
+
|
|
184
|
+
# @!attribute quoted_tweet
|
|
185
|
+
# Quoted or retweeted tweet context. Every object includes id, text, and
|
|
186
|
+
# engagement metrics. A zero metric can mean X did not report the count. Author,
|
|
187
|
+
# media, and conversation fields appear when available.
|
|
188
|
+
#
|
|
189
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet, nil]
|
|
190
|
+
optional :quoted_tweet, -> { XTwitterScraper::EmbeddedTweet }
|
|
191
|
+
|
|
192
|
+
# @!attribute retweeted_tweet
|
|
193
|
+
# Quoted or retweeted tweet context. Every object includes id, text, and
|
|
194
|
+
# engagement metrics. A zero metric can mean X did not report the count. Author,
|
|
195
|
+
# media, and conversation fields appear when available.
|
|
196
|
+
#
|
|
197
|
+
# @return [XTwitterScraper::Models::EmbeddedTweet, nil]
|
|
198
|
+
optional :retweeted_tweet, -> { XTwitterScraper::EmbeddedTweet }
|
|
199
|
+
|
|
130
200
|
# @!attribute source
|
|
131
201
|
#
|
|
132
202
|
# @return [String, nil]
|
|
@@ -142,7 +212,12 @@ module XTwitterScraper
|
|
|
142
212
|
# @return [String, nil]
|
|
143
213
|
optional :url, String
|
|
144
214
|
|
|
145
|
-
# @!
|
|
215
|
+
# @!attribute view_state
|
|
216
|
+
#
|
|
217
|
+
# @return [String, nil]
|
|
218
|
+
optional :view_state, String, api_name: :viewState
|
|
219
|
+
|
|
220
|
+
# @!method initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, article: nil, author: nil, card: nil, community_note: nil, content_disclosure: nil, conversation_id: nil, created_at: nil, display_text_range: nil, edit: nil, entities: nil, in_reply_to_id: nil, in_reply_to_user_id: nil, in_reply_to_username: nil, is_limited_reply: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, is_translatable: nil, lang: nil, media: nil, note_tweet: nil, place: nil, possibly_sensitive: nil, previous_counts: nil, quoted_tweet: nil, retweeted_tweet: nil, source: nil, type: nil, url: nil, view_state: nil)
|
|
146
221
|
# Some parameter documentations has been truncated, see
|
|
147
222
|
# {XTwitterScraper::Models::EmbeddedTweet} for more details.
|
|
148
223
|
#
|
|
@@ -166,8 +241,14 @@ module XTwitterScraper
|
|
|
166
241
|
#
|
|
167
242
|
# @param view_count [Integer]
|
|
168
243
|
#
|
|
244
|
+
# @param article [XTwitterScraper::Models::EmbeddedTweet::Article] Article metadata attached to a tweet.
|
|
245
|
+
#
|
|
169
246
|
# @param author [XTwitterScraper::Models::UserProfile] X user profile with bio, follower counts, and verification status.
|
|
170
247
|
#
|
|
248
|
+
# @param card [XTwitterScraper::Models::EmbeddedTweet::Card] Public card metadata attached to a tweet.
|
|
249
|
+
#
|
|
250
|
+
# @param community_note [XTwitterScraper::Models::EmbeddedTweet::CommunityNote] Community Note presentation metadata returned by X.
|
|
251
|
+
#
|
|
171
252
|
# @param content_disclosure [XTwitterScraper::Models::ContentDisclosure] Content disclosure metadata shown by X when a tweet is labeled as paid partnersh
|
|
172
253
|
#
|
|
173
254
|
# @param conversation_id [String]
|
|
@@ -176,6 +257,8 @@ module XTwitterScraper
|
|
|
176
257
|
#
|
|
177
258
|
# @param display_text_range [Array<Integer>]
|
|
178
259
|
#
|
|
260
|
+
# @param edit [XTwitterScraper::Models::EmbeddedTweet::Edit] Edit history metadata returned by X.
|
|
261
|
+
#
|
|
179
262
|
# @param entities [Hash{Symbol=>Object}]
|
|
180
263
|
#
|
|
181
264
|
# @param in_reply_to_id [String]
|
|
@@ -192,15 +275,320 @@ module XTwitterScraper
|
|
|
192
275
|
#
|
|
193
276
|
# @param is_reply [Boolean]
|
|
194
277
|
#
|
|
278
|
+
# @param is_translatable [Boolean]
|
|
279
|
+
#
|
|
195
280
|
# @param lang [String]
|
|
196
281
|
#
|
|
197
282
|
# @param media [Array<XTwitterScraper::Models::TweetMedia>]
|
|
198
283
|
#
|
|
284
|
+
# @param note_tweet [XTwitterScraper::Models::EmbeddedTweet::NoteTweet] Complete Note Tweet content and rich-text metadata.
|
|
285
|
+
#
|
|
286
|
+
# @param place [XTwitterScraper::Models::EmbeddedTweet::Place] Public place metadata attached to a tweet.
|
|
287
|
+
#
|
|
288
|
+
# @param possibly_sensitive [Boolean]
|
|
289
|
+
#
|
|
290
|
+
# @param previous_counts [XTwitterScraper::Models::EmbeddedTweet::PreviousCounts] Engagement counts retained from a prior tweet edit.
|
|
291
|
+
#
|
|
292
|
+
# @param quoted_tweet [XTwitterScraper::Models::EmbeddedTweet] Quoted or retweeted tweet context. Every object includes id, text, and engagemen
|
|
293
|
+
#
|
|
294
|
+
# @param retweeted_tweet [XTwitterScraper::Models::EmbeddedTweet] Quoted or retweeted tweet context. Every object includes id, text, and engagemen
|
|
295
|
+
#
|
|
199
296
|
# @param source [String]
|
|
200
297
|
#
|
|
201
298
|
# @param type [String]
|
|
202
299
|
#
|
|
203
300
|
# @param url [String]
|
|
301
|
+
#
|
|
302
|
+
# @param view_state [String]
|
|
303
|
+
|
|
304
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#article
|
|
305
|
+
class Article < XTwitterScraper::Internal::Type::BaseModel
|
|
306
|
+
# @!attribute id
|
|
307
|
+
#
|
|
308
|
+
# @return [String, nil]
|
|
309
|
+
optional :id, String
|
|
310
|
+
|
|
311
|
+
# @!attribute cover_media_url
|
|
312
|
+
#
|
|
313
|
+
# @return [String, nil]
|
|
314
|
+
optional :cover_media_url, String, api_name: :coverMediaUrl
|
|
315
|
+
|
|
316
|
+
# @!attribute preview_text
|
|
317
|
+
#
|
|
318
|
+
# @return [String, nil]
|
|
319
|
+
optional :preview_text, String, api_name: :previewText
|
|
320
|
+
|
|
321
|
+
# @!attribute title
|
|
322
|
+
#
|
|
323
|
+
# @return [String, nil]
|
|
324
|
+
optional :title, String
|
|
325
|
+
|
|
326
|
+
# @!method initialize(id: nil, cover_media_url: nil, preview_text: nil, title: nil)
|
|
327
|
+
# Article metadata attached to a tweet.
|
|
328
|
+
#
|
|
329
|
+
# @param id [String]
|
|
330
|
+
# @param cover_media_url [String]
|
|
331
|
+
# @param preview_text [String]
|
|
332
|
+
# @param title [String]
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#card
|
|
336
|
+
class Card < XTwitterScraper::Internal::Type::BaseModel
|
|
337
|
+
# @!attribute id
|
|
338
|
+
#
|
|
339
|
+
# @return [String, nil]
|
|
340
|
+
optional :id, String
|
|
341
|
+
|
|
342
|
+
# @!attribute binding_values
|
|
343
|
+
#
|
|
344
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
345
|
+
optional :binding_values,
|
|
346
|
+
XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown],
|
|
347
|
+
api_name: :bindingValues
|
|
348
|
+
|
|
349
|
+
# @!attribute name
|
|
350
|
+
#
|
|
351
|
+
# @return [String, nil]
|
|
352
|
+
optional :name, String
|
|
353
|
+
|
|
354
|
+
# @!attribute url
|
|
355
|
+
#
|
|
356
|
+
# @return [String, nil]
|
|
357
|
+
optional :url, String
|
|
358
|
+
|
|
359
|
+
# @!method initialize(id: nil, binding_values: nil, name: nil, url: nil)
|
|
360
|
+
# Public card metadata attached to a tweet.
|
|
361
|
+
#
|
|
362
|
+
# @param id [String]
|
|
363
|
+
# @param binding_values [Hash{Symbol=>Object}]
|
|
364
|
+
# @param name [String]
|
|
365
|
+
# @param url [String]
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#community_note
|
|
369
|
+
class CommunityNote < XTwitterScraper::Internal::Type::BaseModel
|
|
370
|
+
# @!attribute id
|
|
371
|
+
#
|
|
372
|
+
# @return [String, nil]
|
|
373
|
+
optional :id, String
|
|
374
|
+
|
|
375
|
+
# @!attribute destination_url
|
|
376
|
+
#
|
|
377
|
+
# @return [String, nil]
|
|
378
|
+
optional :destination_url, String, api_name: :destinationUrl
|
|
379
|
+
|
|
380
|
+
# @!attribute footer
|
|
381
|
+
#
|
|
382
|
+
# @return [String, nil]
|
|
383
|
+
optional :footer, String
|
|
384
|
+
|
|
385
|
+
# @!attribute short_title
|
|
386
|
+
#
|
|
387
|
+
# @return [String, nil]
|
|
388
|
+
optional :short_title, String, api_name: :shortTitle
|
|
389
|
+
|
|
390
|
+
# @!attribute subtitle
|
|
391
|
+
#
|
|
392
|
+
# @return [String, nil]
|
|
393
|
+
optional :subtitle, String
|
|
394
|
+
|
|
395
|
+
# @!attribute title
|
|
396
|
+
#
|
|
397
|
+
# @return [String, nil]
|
|
398
|
+
optional :title, String
|
|
399
|
+
|
|
400
|
+
# @!attribute visual_style
|
|
401
|
+
#
|
|
402
|
+
# @return [String, nil]
|
|
403
|
+
optional :visual_style, String, api_name: :visualStyle
|
|
404
|
+
|
|
405
|
+
# @!method initialize(id: nil, destination_url: nil, footer: nil, short_title: nil, subtitle: nil, title: nil, visual_style: nil)
|
|
406
|
+
# Community Note presentation metadata returned by X.
|
|
407
|
+
#
|
|
408
|
+
# @param id [String]
|
|
409
|
+
# @param destination_url [String]
|
|
410
|
+
# @param footer [String]
|
|
411
|
+
# @param short_title [String]
|
|
412
|
+
# @param subtitle [String]
|
|
413
|
+
# @param title [String]
|
|
414
|
+
# @param visual_style [String]
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#edit
|
|
418
|
+
class Edit < XTwitterScraper::Internal::Type::BaseModel
|
|
419
|
+
# @!attribute editable_until_msecs
|
|
420
|
+
#
|
|
421
|
+
# @return [String, nil]
|
|
422
|
+
optional :editable_until_msecs, String, api_name: :editableUntilMsecs
|
|
423
|
+
|
|
424
|
+
# @!attribute edit_tweet_ids
|
|
425
|
+
#
|
|
426
|
+
# @return [Array<String>, nil]
|
|
427
|
+
optional :edit_tweet_ids, XTwitterScraper::Internal::Type::ArrayOf[String], api_name: :editTweetIds
|
|
428
|
+
|
|
429
|
+
# @!method initialize(editable_until_msecs: nil, edit_tweet_ids: nil)
|
|
430
|
+
# Edit history metadata returned by X.
|
|
431
|
+
#
|
|
432
|
+
# @param editable_until_msecs [String]
|
|
433
|
+
# @param edit_tweet_ids [Array<String>]
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#note_tweet
|
|
437
|
+
class NoteTweet < XTwitterScraper::Internal::Type::BaseModel
|
|
438
|
+
# @!attribute text
|
|
439
|
+
#
|
|
440
|
+
# @return [String]
|
|
441
|
+
required :text, String
|
|
442
|
+
|
|
443
|
+
# @!attribute id
|
|
444
|
+
#
|
|
445
|
+
# @return [String, nil]
|
|
446
|
+
optional :id, String
|
|
447
|
+
|
|
448
|
+
# @!attribute entities
|
|
449
|
+
#
|
|
450
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
451
|
+
optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown]
|
|
452
|
+
|
|
453
|
+
# @!attribute is_expandable
|
|
454
|
+
#
|
|
455
|
+
# @return [Boolean, nil]
|
|
456
|
+
optional :is_expandable, XTwitterScraper::Internal::Type::Boolean, api_name: :isExpandable
|
|
457
|
+
|
|
458
|
+
# @!attribute richtext_tags
|
|
459
|
+
#
|
|
460
|
+
# @return [Array<XTwitterScraper::Models::EmbeddedTweet::NoteTweet::RichtextTag>, nil]
|
|
461
|
+
optional :richtext_tags,
|
|
462
|
+
-> {
|
|
463
|
+
XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::EmbeddedTweet::NoteTweet::RichtextTag]
|
|
464
|
+
},
|
|
465
|
+
api_name: :richtextTags
|
|
466
|
+
|
|
467
|
+
# @!method initialize(text:, id: nil, entities: nil, is_expandable: nil, richtext_tags: nil)
|
|
468
|
+
# Complete Note Tweet content and rich-text metadata.
|
|
469
|
+
#
|
|
470
|
+
# @param text [String]
|
|
471
|
+
# @param id [String]
|
|
472
|
+
# @param entities [Hash{Symbol=>Object}]
|
|
473
|
+
# @param is_expandable [Boolean]
|
|
474
|
+
# @param richtext_tags [Array<XTwitterScraper::Models::EmbeddedTweet::NoteTweet::RichtextTag>]
|
|
475
|
+
|
|
476
|
+
class RichtextTag < XTwitterScraper::Internal::Type::BaseModel
|
|
477
|
+
# @!attribute from_index
|
|
478
|
+
#
|
|
479
|
+
# @return [Integer]
|
|
480
|
+
required :from_index, Integer, api_name: :fromIndex
|
|
481
|
+
|
|
482
|
+
# @!attribute to_index
|
|
483
|
+
#
|
|
484
|
+
# @return [Integer]
|
|
485
|
+
required :to_index, Integer, api_name: :toIndex
|
|
486
|
+
|
|
487
|
+
# @!attribute types
|
|
488
|
+
#
|
|
489
|
+
# @return [Array<String>]
|
|
490
|
+
required :types, XTwitterScraper::Internal::Type::ArrayOf[String]
|
|
491
|
+
|
|
492
|
+
# @!method initialize(from_index:, to_index:, types:)
|
|
493
|
+
# @param from_index [Integer]
|
|
494
|
+
# @param to_index [Integer]
|
|
495
|
+
# @param types [Array<String>]
|
|
496
|
+
end
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#place
|
|
500
|
+
class Place < XTwitterScraper::Internal::Type::BaseModel
|
|
501
|
+
# @!attribute id
|
|
502
|
+
#
|
|
503
|
+
# @return [String, nil]
|
|
504
|
+
optional :id, String
|
|
505
|
+
|
|
506
|
+
# @!attribute bounding_box
|
|
507
|
+
#
|
|
508
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
509
|
+
optional :bounding_box,
|
|
510
|
+
XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown],
|
|
511
|
+
api_name: :boundingBox
|
|
512
|
+
|
|
513
|
+
# @!attribute country
|
|
514
|
+
#
|
|
515
|
+
# @return [String, nil]
|
|
516
|
+
optional :country, String
|
|
517
|
+
|
|
518
|
+
# @!attribute country_code
|
|
519
|
+
#
|
|
520
|
+
# @return [String, nil]
|
|
521
|
+
optional :country_code, String, api_name: :countryCode
|
|
522
|
+
|
|
523
|
+
# @!attribute full_name
|
|
524
|
+
#
|
|
525
|
+
# @return [String, nil]
|
|
526
|
+
optional :full_name, String, api_name: :fullName
|
|
527
|
+
|
|
528
|
+
# @!attribute name
|
|
529
|
+
#
|
|
530
|
+
# @return [String, nil]
|
|
531
|
+
optional :name, String
|
|
532
|
+
|
|
533
|
+
# @!attribute place_type
|
|
534
|
+
#
|
|
535
|
+
# @return [String, nil]
|
|
536
|
+
optional :place_type, String, api_name: :placeType
|
|
537
|
+
|
|
538
|
+
# @!attribute url
|
|
539
|
+
#
|
|
540
|
+
# @return [String, nil]
|
|
541
|
+
optional :url, String
|
|
542
|
+
|
|
543
|
+
# @!method initialize(id: nil, bounding_box: nil, country: nil, country_code: nil, full_name: nil, name: nil, place_type: nil, url: nil)
|
|
544
|
+
# Public place metadata attached to a tweet.
|
|
545
|
+
#
|
|
546
|
+
# @param id [String]
|
|
547
|
+
# @param bounding_box [Hash{Symbol=>Object}]
|
|
548
|
+
# @param country [String]
|
|
549
|
+
# @param country_code [String]
|
|
550
|
+
# @param full_name [String]
|
|
551
|
+
# @param name [String]
|
|
552
|
+
# @param place_type [String]
|
|
553
|
+
# @param url [String]
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
# @see XTwitterScraper::Models::EmbeddedTweet#previous_counts
|
|
557
|
+
class PreviousCounts < XTwitterScraper::Internal::Type::BaseModel
|
|
558
|
+
# @!attribute bookmark_count
|
|
559
|
+
#
|
|
560
|
+
# @return [Integer, nil]
|
|
561
|
+
optional :bookmark_count, Integer, api_name: :bookmarkCount
|
|
562
|
+
|
|
563
|
+
# @!attribute like_count
|
|
564
|
+
#
|
|
565
|
+
# @return [Integer, nil]
|
|
566
|
+
optional :like_count, Integer, api_name: :likeCount
|
|
567
|
+
|
|
568
|
+
# @!attribute quote_count
|
|
569
|
+
#
|
|
570
|
+
# @return [Integer, nil]
|
|
571
|
+
optional :quote_count, Integer, api_name: :quoteCount
|
|
572
|
+
|
|
573
|
+
# @!attribute reply_count
|
|
574
|
+
#
|
|
575
|
+
# @return [Integer, nil]
|
|
576
|
+
optional :reply_count, Integer, api_name: :replyCount
|
|
577
|
+
|
|
578
|
+
# @!attribute retweet_count
|
|
579
|
+
#
|
|
580
|
+
# @return [Integer, nil]
|
|
581
|
+
optional :retweet_count, Integer, api_name: :retweetCount
|
|
582
|
+
|
|
583
|
+
# @!method initialize(bookmark_count: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil)
|
|
584
|
+
# Engagement counts retained from a prior tweet edit.
|
|
585
|
+
#
|
|
586
|
+
# @param bookmark_count [Integer]
|
|
587
|
+
# @param like_count [Integer]
|
|
588
|
+
# @param quote_count [Integer]
|
|
589
|
+
# @param reply_count [Integer]
|
|
590
|
+
# @param retweet_count [Integer]
|
|
591
|
+
end
|
|
204
592
|
end
|
|
205
593
|
end
|
|
206
594
|
end
|
|
@@ -23,11 +23,10 @@ module XTwitterScraper
|
|
|
23
23
|
required :tweets, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::SearchTweet] }
|
|
24
24
|
|
|
25
25
|
# @!method initialize(has_next_page:, next_cursor:, tweets:)
|
|
26
|
-
# Paginated
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# 402 insufficient_credits.
|
|
26
|
+
# Paginated tweets. Source visibility, filters, or remaining credits can reduce
|
|
27
|
+
# results. An empty filtered page can still have has_next_page true. Follow
|
|
28
|
+
# next_cursor while has_next_page is true. Zero affordable results returns 402
|
|
29
|
+
# insufficient_credits.
|
|
31
30
|
#
|
|
32
31
|
# @param has_next_page [Boolean]
|
|
33
32
|
# @param next_cursor [String]
|