x-twitter-scraper 0.7.2 → 0.9.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 +24 -0
- data/README.md +3 -3
- data/lib/x_twitter_scraper/models/credit_topup_balance_response.rb +5 -5
- data/lib/x_twitter_scraper/models/draw_export_params.rb +8 -3
- data/lib/x_twitter_scraper/models/draw_list_params.rb +2 -2
- data/lib/x_twitter_scraper/models/error.rb +8 -0
- data/lib/x_twitter_scraper/models/event_list_params.rb +13 -5
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +731 -82
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_response.rb +1 -0
- data/lib/x_twitter_scraper/models/extraction_export_results_params.rb +145 -1
- data/lib/x_twitter_scraper/models/extraction_list_params.rb +2 -2
- data/lib/x_twitter_scraper/models/extraction_retrieve_params.rb +70 -3
- data/lib/x_twitter_scraper/models/extraction_run_params.rb +662 -1
- data/lib/x_twitter_scraper/models/extraction_run_response.rb +27 -48
- data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +8 -8
- data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +9 -9
- data/lib/x_twitter_scraper/models/monitor.rb +29 -1
- data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -4
- data/lib/x_twitter_scraper/models/paginated_users.rb +5 -5
- data/lib/x_twitter_scraper/models/support/attachment_download_params.rb +28 -0
- data/lib/x_twitter_scraper/models/x/community_retrieve_members_params.rb +113 -1
- data/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb +117 -1
- data/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb +116 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +246 -16
- data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +3 -2
- data/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/tweet_search_params.rb +187 -14
- data/lib/x_twitter_scraper/models/x/tweet_search_response.rb +299 -0
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb +143 -10
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb +241 -0
- data/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb +117 -6
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +143 -10
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb +241 -0
- data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +153 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +159 -7
- data/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb +116 -1
- data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +159 -7
- data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb +157 -8
- data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb +245 -0
- data/lib/x_twitter_scraper/models/x/x_account.rb +7 -11
- data/lib/x_twitter_scraper/resources/credits.rb +2 -2
- data/lib/x_twitter_scraper/resources/draws.rb +5 -2
- data/lib/x_twitter_scraper/resources/events.rb +10 -4
- data/lib/x_twitter_scraper/resources/extractions.rb +383 -84
- data/lib/x_twitter_scraper/resources/guest_wallets.rb +9 -13
- data/lib/x_twitter_scraper/resources/support/attachments.rb +42 -0
- data/lib/x_twitter_scraper/resources/support.rb +5 -0
- data/lib/x_twitter_scraper/resources/x/communities.rb +95 -4
- data/lib/x_twitter_scraper/resources/x/lists.rb +96 -5
- data/lib/x_twitter_scraper/resources/x/tweets.rb +286 -28
- data/lib/x_twitter_scraper/resources/x/users.rb +531 -41
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +7 -1
- data/rbi/x_twitter_scraper/models/credit_topup_balance_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/draw_export_params.rbi +6 -3
- data/rbi/x_twitter_scraper/models/draw_list_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/error.rbi +40 -0
- data/rbi/x_twitter_scraper/models/event_list_params.rbi +15 -4
- data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +1338 -86
- data/rbi/x_twitter_scraper/models/extraction_estimate_cost_response.rbi +5 -0
- data/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi +198 -0
- data/rbi/x_twitter_scraper/models/extraction_list_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi +194 -2
- data/rbi/x_twitter_scraper/models/extraction_run_params.rbi +1221 -0
- data/rbi/x_twitter_scraper/models/extraction_run_response.rbi +35 -162
- data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +8 -6
- data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +9 -7
- data/rbi/x_twitter_scraper/models/monitor.rbi +54 -3
- data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -4
- data/rbi/x_twitter_scraper/models/paginated_users.rbi +5 -5
- data/rbi/x_twitter_scraper/models/support/attachment_download_params.rbi +51 -0
- data/rbi/x_twitter_scraper/models/x/community_retrieve_members_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +403 -20
- data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +3 -2
- data/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi +279 -16
- data/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi +543 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi +228 -12
- data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi +440 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi +160 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +228 -12
- data/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi +440 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +209 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +217 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi +154 -0
- data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +217 -8
- data/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi +248 -10
- data/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi +440 -0
- data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -15
- data/rbi/x_twitter_scraper/resources/credits.rbi +2 -2
- data/rbi/x_twitter_scraper/resources/draws.rbi +3 -2
- data/rbi/x_twitter_scraper/resources/events.rbi +5 -2
- data/rbi/x_twitter_scraper/resources/extractions.rbi +525 -83
- data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +9 -13
- data/rbi/x_twitter_scraper/resources/support/attachments.rbi +35 -0
- data/rbi/x_twitter_scraper/resources/support.rbi +4 -0
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +84 -0
- data/rbi/x_twitter_scraper/resources/x/lists.rbi +87 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +307 -31
- data/rbi/x_twitter_scraper/resources/x/users.rbi +558 -34
- data/sig/x_twitter_scraper/models/error.rbs +16 -0
- data/sig/x_twitter_scraper/models/event_list_params.rbs +7 -0
- data/sig/x_twitter_scraper/models/extraction_estimate_cost_params.rbs +605 -1
- data/sig/x_twitter_scraper/models/extraction_estimate_cost_response.rbs +2 -0
- data/sig/x_twitter_scraper/models/extraction_export_results_params.rbs +127 -1
- data/sig/x_twitter_scraper/models/extraction_retrieve_params.rbs +74 -1
- data/sig/x_twitter_scraper/models/extraction_run_params.rbs +611 -1
- data/sig/x_twitter_scraper/models/extraction_run_response.rbs +29 -67
- data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +4 -4
- data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +4 -4
- data/sig/x_twitter_scraper/models/monitor.rbs +29 -3
- data/sig/x_twitter_scraper/models/support/attachment_download_params.rbs +32 -0
- data/sig/x_twitter_scraper/models/x/community_retrieve_members_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbs +102 -1
- data/sig/x_twitter_scraper/models/x/list_retrieve_followers_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/list_retrieve_members_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/tweet_get_quotes_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +207 -2
- data/sig/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/tweet_search_params.rbs +154 -1
- data/sig/x_twitter_scraper/models/x/tweet_search_response.rbs +258 -0
- data/sig/x_twitter_scraper/models/x/user_retrieve_followers_params.rbs +119 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs +216 -0
- data/sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbs +103 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_following_params.rbs +119 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs +216 -0
- data/sig/x_twitter_scraper/models/x/user_retrieve_likes_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_media_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_replies_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_search_params.rbs +102 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbs +134 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbs +137 -1
- data/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs +216 -0
- data/sig/x_twitter_scraper/resources/events.rbs +1 -0
- data/sig/x_twitter_scraper/resources/extractions.rbs +137 -0
- data/sig/x_twitter_scraper/resources/support/attachments.rbs +15 -0
- data/sig/x_twitter_scraper/resources/support.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/communities.rbs +28 -0
- data/sig/x_twitter_scraper/resources/x/lists.rbs +28 -0
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +93 -1
- data/sig/x_twitter_scraper/resources/x/users.rbs +173 -3
- metadata +19 -1
|
@@ -15,188 +15,61 @@ module XTwitterScraper
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(T::Boolean) }
|
|
19
|
+
attr_accessor :allowed
|
|
20
|
+
|
|
18
21
|
sig { returns(String) }
|
|
19
|
-
attr_accessor :
|
|
22
|
+
attr_accessor :credits_available
|
|
20
23
|
|
|
21
|
-
sig { returns(
|
|
22
|
-
attr_accessor :
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :credits_required
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
sig { returns(Integer) }
|
|
28
|
+
attr_accessor :estimated_results
|
|
29
|
+
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :source
|
|
32
|
+
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :resolved_x_user_id
|
|
35
|
+
|
|
36
|
+
sig { params(resolved_x_user_id: String).void }
|
|
37
|
+
attr_writer :resolved_x_user_id
|
|
31
38
|
|
|
32
39
|
sig do
|
|
33
40
|
params(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
allowed: T::Boolean,
|
|
42
|
+
credits_available: String,
|
|
43
|
+
credits_required: String,
|
|
44
|
+
estimated_results: Integer,
|
|
45
|
+
source: String,
|
|
46
|
+
resolved_x_user_id: String
|
|
38
47
|
).returns(T.attached_class)
|
|
39
48
|
end
|
|
40
49
|
def self.new(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
allowed:,
|
|
51
|
+
credits_available:,
|
|
52
|
+
credits_required:,
|
|
53
|
+
estimated_results:,
|
|
54
|
+
source:,
|
|
55
|
+
resolved_x_user_id: nil
|
|
45
56
|
)
|
|
46
57
|
end
|
|
47
58
|
|
|
48
59
|
sig do
|
|
49
60
|
override.returns(
|
|
50
61
|
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
allowed: T::Boolean,
|
|
63
|
+
credits_available: String,
|
|
64
|
+
credits_required: String,
|
|
65
|
+
estimated_results: Integer,
|
|
66
|
+
source: String,
|
|
67
|
+
resolved_x_user_id: String
|
|
55
68
|
}
|
|
56
69
|
)
|
|
57
70
|
end
|
|
58
71
|
def to_hash
|
|
59
72
|
end
|
|
60
|
-
|
|
61
|
-
# Identifier for the extraction tool used to run a job.
|
|
62
|
-
module ToolType
|
|
63
|
-
extend XTwitterScraper::Internal::Type::Enum
|
|
64
|
-
|
|
65
|
-
TaggedSymbol =
|
|
66
|
-
T.type_alias do
|
|
67
|
-
T.all(
|
|
68
|
-
Symbol,
|
|
69
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType
|
|
70
|
-
)
|
|
71
|
-
end
|
|
72
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
73
|
-
|
|
74
|
-
ARTICLE_EXTRACTOR =
|
|
75
|
-
T.let(
|
|
76
|
-
:article_extractor,
|
|
77
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
78
|
-
)
|
|
79
|
-
COMMUNITY_EXTRACTOR =
|
|
80
|
-
T.let(
|
|
81
|
-
:community_extractor,
|
|
82
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
83
|
-
)
|
|
84
|
-
COMMUNITY_MODERATOR_EXPLORER =
|
|
85
|
-
T.let(
|
|
86
|
-
:community_moderator_explorer,
|
|
87
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
88
|
-
)
|
|
89
|
-
COMMUNITY_POST_EXTRACTOR =
|
|
90
|
-
T.let(
|
|
91
|
-
:community_post_extractor,
|
|
92
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
93
|
-
)
|
|
94
|
-
COMMUNITY_SEARCH =
|
|
95
|
-
T.let(
|
|
96
|
-
:community_search,
|
|
97
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
98
|
-
)
|
|
99
|
-
FAVORITERS =
|
|
100
|
-
T.let(
|
|
101
|
-
:favoriters,
|
|
102
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
103
|
-
)
|
|
104
|
-
FOLLOWER_EXPLORER =
|
|
105
|
-
T.let(
|
|
106
|
-
:follower_explorer,
|
|
107
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
108
|
-
)
|
|
109
|
-
FOLLOWING_EXPLORER =
|
|
110
|
-
T.let(
|
|
111
|
-
:following_explorer,
|
|
112
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
113
|
-
)
|
|
114
|
-
LIST_FOLLOWER_EXPLORER =
|
|
115
|
-
T.let(
|
|
116
|
-
:list_follower_explorer,
|
|
117
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
118
|
-
)
|
|
119
|
-
LIST_MEMBER_EXTRACTOR =
|
|
120
|
-
T.let(
|
|
121
|
-
:list_member_extractor,
|
|
122
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
123
|
-
)
|
|
124
|
-
LIST_POST_EXTRACTOR =
|
|
125
|
-
T.let(
|
|
126
|
-
:list_post_extractor,
|
|
127
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
128
|
-
)
|
|
129
|
-
MENTION_EXTRACTOR =
|
|
130
|
-
T.let(
|
|
131
|
-
:mention_extractor,
|
|
132
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
133
|
-
)
|
|
134
|
-
PEOPLE_SEARCH =
|
|
135
|
-
T.let(
|
|
136
|
-
:people_search,
|
|
137
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
138
|
-
)
|
|
139
|
-
POST_EXTRACTOR =
|
|
140
|
-
T.let(
|
|
141
|
-
:post_extractor,
|
|
142
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
143
|
-
)
|
|
144
|
-
QUOTE_EXTRACTOR =
|
|
145
|
-
T.let(
|
|
146
|
-
:quote_extractor,
|
|
147
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
148
|
-
)
|
|
149
|
-
REPLY_EXTRACTOR =
|
|
150
|
-
T.let(
|
|
151
|
-
:reply_extractor,
|
|
152
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
153
|
-
)
|
|
154
|
-
REPOST_EXTRACTOR =
|
|
155
|
-
T.let(
|
|
156
|
-
:repost_extractor,
|
|
157
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
158
|
-
)
|
|
159
|
-
SPACE_EXPLORER =
|
|
160
|
-
T.let(
|
|
161
|
-
:space_explorer,
|
|
162
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
163
|
-
)
|
|
164
|
-
THREAD_EXTRACTOR =
|
|
165
|
-
T.let(
|
|
166
|
-
:thread_extractor,
|
|
167
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
168
|
-
)
|
|
169
|
-
TWEET_SEARCH_EXTRACTOR =
|
|
170
|
-
T.let(
|
|
171
|
-
:tweet_search_extractor,
|
|
172
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
173
|
-
)
|
|
174
|
-
USER_LIKES =
|
|
175
|
-
T.let(
|
|
176
|
-
:user_likes,
|
|
177
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
178
|
-
)
|
|
179
|
-
USER_MEDIA =
|
|
180
|
-
T.let(
|
|
181
|
-
:user_media,
|
|
182
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
183
|
-
)
|
|
184
|
-
VERIFIED_FOLLOWER_EXPLORER =
|
|
185
|
-
T.let(
|
|
186
|
-
:verified_follower_explorer,
|
|
187
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
188
|
-
)
|
|
189
|
-
|
|
190
|
-
sig do
|
|
191
|
-
override.returns(
|
|
192
|
-
T::Array[
|
|
193
|
-
XTwitterScraper::Models::ExtractionRunResponse::ToolType::TaggedSymbol
|
|
194
|
-
]
|
|
195
|
-
)
|
|
196
|
-
end
|
|
197
|
-
def self.values
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
73
|
end
|
|
201
74
|
end
|
|
202
75
|
end
|
|
@@ -45,7 +45,7 @@ module XTwitterScraper
|
|
|
45
45
|
end
|
|
46
46
|
attr_writer :authorization
|
|
47
47
|
|
|
48
|
-
#
|
|
48
|
+
# Hosted checkout URL for user interaction.
|
|
49
49
|
sig { returns(String) }
|
|
50
50
|
attr_accessor :checkout_url
|
|
51
51
|
|
|
@@ -60,7 +60,8 @@ module XTwitterScraper
|
|
|
60
60
|
sig { returns(Time) }
|
|
61
61
|
attr_accessor :expires_at
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
# Hosted checkout and status polling instructions.
|
|
64
|
+
sig { returns(String) }
|
|
64
65
|
attr_accessor :instructions
|
|
65
66
|
|
|
66
67
|
# Wait at least this long before polling status_url.
|
|
@@ -96,13 +97,13 @@ module XTwitterScraper
|
|
|
96
97
|
checkout_url: String,
|
|
97
98
|
credits: String,
|
|
98
99
|
expires_at: Time,
|
|
100
|
+
instructions: String,
|
|
99
101
|
purchase_id: String,
|
|
100
102
|
status:
|
|
101
103
|
XTwitterScraper::Models::GuestWalletCreateResponse::Status::OrSymbol,
|
|
102
104
|
wallet_id: String,
|
|
103
105
|
account_required: T::Boolean,
|
|
104
106
|
credential_notice: Symbol,
|
|
105
|
-
instructions: Symbol,
|
|
106
107
|
poll_after_seconds: Integer,
|
|
107
108
|
requires_user_interaction: T::Boolean,
|
|
108
109
|
status_url: Symbol
|
|
@@ -115,18 +116,19 @@ module XTwitterScraper
|
|
|
115
116
|
# secret. Never place it in a URL or log.
|
|
116
117
|
api_key:,
|
|
117
118
|
authorization:,
|
|
118
|
-
#
|
|
119
|
+
# Hosted checkout URL for user interaction.
|
|
119
120
|
checkout_url:,
|
|
120
121
|
# Credits granted after verified payment.
|
|
121
122
|
credits:,
|
|
122
123
|
# Time when the pending checkout expires.
|
|
123
124
|
expires_at:,
|
|
125
|
+
# Hosted checkout and status polling instructions.
|
|
126
|
+
instructions:,
|
|
124
127
|
purchase_id:,
|
|
125
128
|
status:,
|
|
126
129
|
wallet_id:,
|
|
127
130
|
account_required: false,
|
|
128
131
|
credential_notice: :"Store api_key and the Idempotency-Key securely before sharing checkout_url. No email recovery is available.",
|
|
129
|
-
instructions: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending.",
|
|
130
132
|
# Wait at least this long before polling status_url.
|
|
131
133
|
poll_after_seconds: 2,
|
|
132
134
|
requires_user_interaction: true,
|
|
@@ -146,7 +148,7 @@ module XTwitterScraper
|
|
|
146
148
|
credential_notice: Symbol,
|
|
147
149
|
credits: String,
|
|
148
150
|
expires_at: Time,
|
|
149
|
-
instructions:
|
|
151
|
+
instructions: String,
|
|
150
152
|
poll_after_seconds: Integer,
|
|
151
153
|
purchase_id: String,
|
|
152
154
|
requires_user_interaction: T::Boolean,
|
|
@@ -25,7 +25,7 @@ module XTwitterScraper
|
|
|
25
25
|
sig { params(amount: XTwitterScraper::GuestWalletAmount::OrHash).void }
|
|
26
26
|
attr_writer :amount
|
|
27
27
|
|
|
28
|
-
#
|
|
28
|
+
# Hosted checkout URL for user interaction.
|
|
29
29
|
sig { returns(String) }
|
|
30
30
|
attr_accessor :checkout_url
|
|
31
31
|
|
|
@@ -37,7 +37,8 @@ module XTwitterScraper
|
|
|
37
37
|
sig { returns(Time) }
|
|
38
38
|
attr_accessor :expires_at
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
# Hosted checkout and status polling instructions.
|
|
41
|
+
sig { returns(String) }
|
|
41
42
|
attr_accessor :instructions
|
|
42
43
|
|
|
43
44
|
# Wait at least this long before polling status_url.
|
|
@@ -105,13 +106,14 @@ module XTwitterScraper
|
|
|
105
106
|
end
|
|
106
107
|
attr_writer :credential_notice
|
|
107
108
|
|
|
108
|
-
# Pending
|
|
109
|
+
# Pending hosted checkout and guest wallet purchase details.
|
|
109
110
|
sig do
|
|
110
111
|
params(
|
|
111
112
|
amount: XTwitterScraper::GuestWalletAmount::OrHash,
|
|
112
113
|
checkout_url: String,
|
|
113
114
|
credits: String,
|
|
114
115
|
expires_at: Time,
|
|
116
|
+
instructions: String,
|
|
115
117
|
purchase_id: String,
|
|
116
118
|
status:
|
|
117
119
|
XTwitterScraper::Models::GuestWalletTopupResponse::Status::OrSymbol,
|
|
@@ -122,7 +124,6 @@ module XTwitterScraper
|
|
|
122
124
|
credential_notice:
|
|
123
125
|
XTwitterScraper::Models::GuestWalletTopupResponse::CredentialNotice::OrSymbol,
|
|
124
126
|
account_required: T::Boolean,
|
|
125
|
-
instructions: Symbol,
|
|
126
127
|
poll_after_seconds: Integer,
|
|
127
128
|
requires_user_interaction: T::Boolean,
|
|
128
129
|
status_url: Symbol
|
|
@@ -131,12 +132,14 @@ module XTwitterScraper
|
|
|
131
132
|
def self.new(
|
|
132
133
|
# Confirmed USD amount for a guest wallet purchase.
|
|
133
134
|
amount:,
|
|
134
|
-
#
|
|
135
|
+
# Hosted checkout URL for user interaction.
|
|
135
136
|
checkout_url:,
|
|
136
137
|
# Credits granted after verified payment.
|
|
137
138
|
credits:,
|
|
138
139
|
# Time when the pending checkout expires.
|
|
139
140
|
expires_at:,
|
|
141
|
+
# Hosted checkout and status polling instructions.
|
|
142
|
+
instructions:,
|
|
140
143
|
purchase_id:,
|
|
141
144
|
status:,
|
|
142
145
|
wallet_id:,
|
|
@@ -146,7 +149,6 @@ module XTwitterScraper
|
|
|
146
149
|
authorization: nil,
|
|
147
150
|
credential_notice: nil,
|
|
148
151
|
account_required: false,
|
|
149
|
-
instructions: :"Give checkout_url to the user. They must complete payment on Stripe. Never submit payment for them. After payment, poll status_url every poll_after_seconds until latest_purchase.status is no longer pending.",
|
|
150
152
|
# Wait at least this long before polling status_url.
|
|
151
153
|
poll_after_seconds: 2,
|
|
152
154
|
requires_user_interaction: true,
|
|
@@ -162,7 +164,7 @@ module XTwitterScraper
|
|
|
162
164
|
checkout_url: String,
|
|
163
165
|
credits: String,
|
|
164
166
|
expires_at: Time,
|
|
165
|
-
instructions:
|
|
167
|
+
instructions: String,
|
|
166
168
|
poll_after_seconds: Integer,
|
|
167
169
|
purchase_id: String,
|
|
168
170
|
requires_user_interaction: T::Boolean,
|
|
@@ -35,6 +35,26 @@ module XTwitterScraper
|
|
|
35
35
|
sig { returns(String) }
|
|
36
36
|
attr_accessor :x_user_id
|
|
37
37
|
|
|
38
|
+
# When Xquik automatically paused this monitor.
|
|
39
|
+
sig { returns(T.nilable(Time)) }
|
|
40
|
+
attr_reader :paused_at
|
|
41
|
+
|
|
42
|
+
sig { params(paused_at: Time).void }
|
|
43
|
+
attr_writer :paused_at
|
|
44
|
+
|
|
45
|
+
# Why Xquik automatically paused this monitor.
|
|
46
|
+
sig do
|
|
47
|
+
returns(T.nilable(XTwitterScraper::Monitor::PausedReason::TaggedSymbol))
|
|
48
|
+
end
|
|
49
|
+
attr_reader :paused_reason
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
params(
|
|
53
|
+
paused_reason: XTwitterScraper::Monitor::PausedReason::OrSymbol
|
|
54
|
+
).void
|
|
55
|
+
end
|
|
56
|
+
attr_writer :paused_reason
|
|
57
|
+
|
|
38
58
|
# Account monitor that tracks activity for a given X user.
|
|
39
59
|
sig do
|
|
40
60
|
params(
|
|
@@ -44,7 +64,9 @@ module XTwitterScraper
|
|
|
44
64
|
is_active: T::Boolean,
|
|
45
65
|
next_billing_at: Time,
|
|
46
66
|
username: String,
|
|
47
|
-
x_user_id: String
|
|
67
|
+
x_user_id: String,
|
|
68
|
+
paused_at: Time,
|
|
69
|
+
paused_reason: XTwitterScraper::Monitor::PausedReason::OrSymbol
|
|
48
70
|
).returns(T.attached_class)
|
|
49
71
|
end
|
|
50
72
|
def self.new(
|
|
@@ -56,7 +78,11 @@ module XTwitterScraper
|
|
|
56
78
|
# Next hourly credit charge time for this account monitor.
|
|
57
79
|
next_billing_at:,
|
|
58
80
|
username:,
|
|
59
|
-
x_user_id
|
|
81
|
+
x_user_id:,
|
|
82
|
+
# When Xquik automatically paused this monitor.
|
|
83
|
+
paused_at: nil,
|
|
84
|
+
# Why Xquik automatically paused this monitor.
|
|
85
|
+
paused_reason: nil
|
|
60
86
|
)
|
|
61
87
|
end
|
|
62
88
|
|
|
@@ -69,12 +95,37 @@ module XTwitterScraper
|
|
|
69
95
|
is_active: T::Boolean,
|
|
70
96
|
next_billing_at: Time,
|
|
71
97
|
username: String,
|
|
72
|
-
x_user_id: String
|
|
98
|
+
x_user_id: String,
|
|
99
|
+
paused_at: Time,
|
|
100
|
+
paused_reason: XTwitterScraper::Monitor::PausedReason::TaggedSymbol
|
|
73
101
|
}
|
|
74
102
|
)
|
|
75
103
|
end
|
|
76
104
|
def to_hash
|
|
77
105
|
end
|
|
106
|
+
|
|
107
|
+
# Why Xquik automatically paused this monitor.
|
|
108
|
+
module PausedReason
|
|
109
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
110
|
+
|
|
111
|
+
TaggedSymbol =
|
|
112
|
+
T.type_alias { T.all(Symbol, XTwitterScraper::Monitor::PausedReason) }
|
|
113
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
114
|
+
|
|
115
|
+
X_USER_NOT_FOUND =
|
|
116
|
+
T.let(
|
|
117
|
+
:x_user_not_found,
|
|
118
|
+
XTwitterScraper::Monitor::PausedReason::TaggedSymbol
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
sig do
|
|
122
|
+
override.returns(
|
|
123
|
+
T::Array[XTwitterScraper::Monitor::PausedReason::TaggedSymbol]
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
def self.values
|
|
127
|
+
end
|
|
128
|
+
end
|
|
78
129
|
end
|
|
79
130
|
end
|
|
80
131
|
end
|
|
@@ -24,10 +24,10 @@ module XTwitterScraper
|
|
|
24
24
|
sig { returns(T::Array[XTwitterScraper::SearchTweet]) }
|
|
25
25
|
attr_accessor :tweets
|
|
26
26
|
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# next_cursor while has_next_page is true.
|
|
30
|
-
#
|
|
27
|
+
# No-mode search, user Tweet, user reply, and direct reply reads use automatic
|
|
28
|
+
# coverage. Shape, filters, aliases, and billing stay compatible. Unprefixed
|
|
29
|
+
# cursors remain legacy. Follow next_cursor while has_next_page is true. An empty
|
|
30
|
+
# filtered page can still have has_next_page true.
|
|
31
31
|
sig do
|
|
32
32
|
params(
|
|
33
33
|
has_next_page: T::Boolean,
|
|
@@ -24,11 +24,11 @@ module XTwitterScraper
|
|
|
24
24
|
sig { returns(T::Array[XTwitterScraper::UserProfile]) }
|
|
25
25
|
attr_accessor :users
|
|
26
26
|
|
|
27
|
-
# Paginated user profiles.
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
27
|
+
# Paginated user profiles. No-mode follower, following, and verified follower
|
|
28
|
+
# requests merge independent views automatically. Response fields, page size,
|
|
29
|
+
# aliases, filters, and per-returned-profile billing stay unchanged. Existing
|
|
30
|
+
# unprefixed cursors retain legacy behavior. Follow next_cursor while
|
|
31
|
+
# has_next_page is true.
|
|
32
32
|
sig do
|
|
33
33
|
params(
|
|
34
34
|
has_next_page: T::Boolean,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module XTwitterScraper
|
|
4
|
+
module Models
|
|
5
|
+
module Support
|
|
6
|
+
class AttachmentDownloadParams < XTwitterScraper::Internal::Type::BaseModel
|
|
7
|
+
extend XTwitterScraper::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include XTwitterScraper::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
XTwitterScraper::Support::AttachmentDownloadParams,
|
|
14
|
+
XTwitterScraper::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :range
|
|
23
|
+
|
|
24
|
+
sig { params(range: String).void }
|
|
25
|
+
attr_writer :range
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
id: String,
|
|
30
|
+
range: String,
|
|
31
|
+
request_options: XTwitterScraper::RequestOptions::OrHash
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(id:, range: nil, request_options: {})
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
override.returns(
|
|
39
|
+
{
|
|
40
|
+
id: String,
|
|
41
|
+
range: String,
|
|
42
|
+
request_options: XTwitterScraper::RequestOptions
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
def to_hash
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|