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
|
@@ -5,7 +5,153 @@
|
|
|
5
5
|
module XTwitterScraper
|
|
6
6
|
module Models
|
|
7
7
|
module X
|
|
8
|
-
|
|
8
|
+
type account_create_response =
|
|
9
|
+
XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount
|
|
10
|
+
| XTwitterScraper::Models::X::AccountCreateResponse::XAccountConnectionAttemptPending
|
|
11
|
+
| XTwitterScraper::Models::X::AccountCreateResponse::XAccountConnectionChallenge
|
|
12
|
+
|
|
13
|
+
module AccountCreateResponse
|
|
14
|
+
extend XTwitterScraper::Internal::Type::Union
|
|
15
|
+
|
|
16
|
+
type sanitized_x_account =
|
|
17
|
+
{
|
|
18
|
+
id: String,
|
|
19
|
+
created_at: Time,
|
|
20
|
+
health: XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount::health,
|
|
21
|
+
status: :active,
|
|
22
|
+
x_user_id: String,
|
|
23
|
+
x_username: String
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
class SanitizedXAccount < XTwitterScraper::Internal::Type::BaseModel
|
|
27
|
+
attr_accessor id: String
|
|
28
|
+
|
|
29
|
+
attr_accessor created_at: Time
|
|
30
|
+
|
|
31
|
+
attr_accessor health: XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount::health
|
|
32
|
+
|
|
33
|
+
attr_accessor status: :active
|
|
34
|
+
|
|
35
|
+
attr_accessor x_user_id: String
|
|
36
|
+
|
|
37
|
+
attr_accessor x_username: String
|
|
38
|
+
|
|
39
|
+
def initialize: (
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: Time,
|
|
42
|
+
health: XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount::health,
|
|
43
|
+
x_user_id: String,
|
|
44
|
+
x_username: String,
|
|
45
|
+
?status: :active
|
|
46
|
+
) -> void
|
|
47
|
+
|
|
48
|
+
def to_hash: -> {
|
|
49
|
+
id: String,
|
|
50
|
+
created_at: Time,
|
|
51
|
+
health: XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount::health,
|
|
52
|
+
status: :active,
|
|
53
|
+
x_user_id: String,
|
|
54
|
+
x_username: String
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type health =
|
|
58
|
+
:healthy
|
|
59
|
+
| :locked
|
|
60
|
+
| :needsReauth
|
|
61
|
+
| :recovering
|
|
62
|
+
| :suspended
|
|
63
|
+
| :temporaryIssue
|
|
64
|
+
|
|
65
|
+
module Health
|
|
66
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
67
|
+
|
|
68
|
+
HEALTHY: :healthy
|
|
69
|
+
LOCKED: :locked
|
|
70
|
+
NEEDS_REAUTH: :needsReauth
|
|
71
|
+
RECOVERING: :recovering
|
|
72
|
+
SUSPENDED: :suspended
|
|
73
|
+
TEMPORARY_ISSUE: :temporaryIssue
|
|
74
|
+
|
|
75
|
+
def self?.values: -> ::Array[XTwitterScraper::Models::X::AccountCreateResponse::SanitizedXAccount::health]
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
type x_account_connection_attempt_pending =
|
|
80
|
+
{
|
|
81
|
+
id: String,
|
|
82
|
+
object: :x_account_connection_attempt,
|
|
83
|
+
poll_after_ms: Integer,
|
|
84
|
+
status: :pending
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
class XAccountConnectionAttemptPending < XTwitterScraper::Internal::Type::BaseModel
|
|
88
|
+
attr_accessor id: String
|
|
89
|
+
|
|
90
|
+
attr_accessor object: :x_account_connection_attempt
|
|
91
|
+
|
|
92
|
+
attr_accessor poll_after_ms: Integer
|
|
93
|
+
|
|
94
|
+
attr_accessor status: :pending
|
|
95
|
+
|
|
96
|
+
def initialize: (
|
|
97
|
+
id: String,
|
|
98
|
+
poll_after_ms: Integer,
|
|
99
|
+
?object: :x_account_connection_attempt,
|
|
100
|
+
?status: :pending
|
|
101
|
+
) -> void
|
|
102
|
+
|
|
103
|
+
def to_hash: -> {
|
|
104
|
+
id: String,
|
|
105
|
+
object: :x_account_connection_attempt,
|
|
106
|
+
poll_after_ms: Integer,
|
|
107
|
+
status: :pending
|
|
108
|
+
}
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
type x_account_connection_challenge =
|
|
112
|
+
{
|
|
113
|
+
id: String,
|
|
114
|
+
expires_at: Time,
|
|
115
|
+
message: String,
|
|
116
|
+
object: :x_account_connection_challenge,
|
|
117
|
+
status: :requires_email_code,
|
|
118
|
+
username: String
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class XAccountConnectionChallenge < XTwitterScraper::Internal::Type::BaseModel
|
|
122
|
+
attr_accessor id: String
|
|
123
|
+
|
|
124
|
+
attr_accessor expires_at: Time
|
|
125
|
+
|
|
126
|
+
attr_accessor message: String
|
|
127
|
+
|
|
128
|
+
attr_accessor object: :x_account_connection_challenge
|
|
129
|
+
|
|
130
|
+
attr_accessor status: :requires_email_code
|
|
131
|
+
|
|
132
|
+
attr_accessor username: String
|
|
133
|
+
|
|
134
|
+
def initialize: (
|
|
135
|
+
id: String,
|
|
136
|
+
expires_at: Time,
|
|
137
|
+
message: String,
|
|
138
|
+
username: String,
|
|
139
|
+
?object: :x_account_connection_challenge,
|
|
140
|
+
?status: :requires_email_code
|
|
141
|
+
) -> void
|
|
142
|
+
|
|
143
|
+
def to_hash: -> {
|
|
144
|
+
id: String,
|
|
145
|
+
expires_at: Time,
|
|
146
|
+
message: String,
|
|
147
|
+
object: :x_account_connection_challenge,
|
|
148
|
+
status: :requires_email_code,
|
|
149
|
+
username: String
|
|
150
|
+
}
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def self?.variants: -> ::Array[XTwitterScraper::Models::X::account_create_response]
|
|
154
|
+
end
|
|
9
155
|
end
|
|
10
156
|
end
|
|
11
157
|
end
|
|
@@ -10,7 +10,7 @@ module XTwitterScraper
|
|
|
10
10
|
id: String,
|
|
11
11
|
created_at: Time,
|
|
12
12
|
health: XTwitterScraper::Models::X::AccountReauthResponse::health,
|
|
13
|
-
status:
|
|
13
|
+
status: :active,
|
|
14
14
|
x_user_id: String,
|
|
15
15
|
x_username: String
|
|
16
16
|
}
|
|
@@ -22,7 +22,7 @@ module XTwitterScraper
|
|
|
22
22
|
|
|
23
23
|
attr_accessor health: XTwitterScraper::Models::X::AccountReauthResponse::health
|
|
24
24
|
|
|
25
|
-
attr_accessor status:
|
|
25
|
+
attr_accessor status: :active
|
|
26
26
|
|
|
27
27
|
attr_accessor x_user_id: String
|
|
28
28
|
|
|
@@ -32,16 +32,16 @@ module XTwitterScraper
|
|
|
32
32
|
id: String,
|
|
33
33
|
created_at: Time,
|
|
34
34
|
health: XTwitterScraper::Models::X::AccountReauthResponse::health,
|
|
35
|
-
status: String,
|
|
36
35
|
x_user_id: String,
|
|
37
|
-
x_username: String
|
|
36
|
+
x_username: String,
|
|
37
|
+
?status: :active
|
|
38
38
|
) -> void
|
|
39
39
|
|
|
40
40
|
def to_hash: -> {
|
|
41
41
|
id: String,
|
|
42
42
|
created_at: Time,
|
|
43
43
|
health: XTwitterScraper::Models::X::AccountReauthResponse::health,
|
|
44
|
-
status:
|
|
44
|
+
status: :active,
|
|
45
45
|
x_user_id: String,
|
|
46
46
|
x_username: String
|
|
47
47
|
}
|
|
@@ -29,14 +29,12 @@ module XTwitterScraper
|
|
|
29
29
|
creator: XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Creator,
|
|
30
30
|
description: String,
|
|
31
31
|
invites_policy: String,
|
|
32
|
-
is_member: bool,
|
|
33
32
|
is_nsfw: bool,
|
|
34
33
|
join_policy: String,
|
|
35
34
|
member_count: Integer,
|
|
36
35
|
moderator_count: Integer,
|
|
37
36
|
name: String,
|
|
38
37
|
primary_topic: XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::PrimaryTopic,
|
|
39
|
-
role: String,
|
|
40
38
|
rules: ::Array[XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Rule]
|
|
41
39
|
}
|
|
42
40
|
|
|
@@ -65,10 +63,6 @@ module XTwitterScraper
|
|
|
65
63
|
|
|
66
64
|
def invites_policy=: (String) -> String
|
|
67
65
|
|
|
68
|
-
attr_reader is_member: bool?
|
|
69
|
-
|
|
70
|
-
def is_member=: (bool) -> bool
|
|
71
|
-
|
|
72
66
|
attr_reader is_nsfw: bool?
|
|
73
67
|
|
|
74
68
|
def is_nsfw=: (bool) -> bool
|
|
@@ -95,10 +89,6 @@ module XTwitterScraper
|
|
|
95
89
|
XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::PrimaryTopic
|
|
96
90
|
) -> XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::PrimaryTopic
|
|
97
91
|
|
|
98
|
-
attr_reader role: String?
|
|
99
|
-
|
|
100
|
-
def role=: (String) -> String
|
|
101
|
-
|
|
102
92
|
attr_reader rules: ::Array[XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Rule]?
|
|
103
93
|
|
|
104
94
|
def rules=: (
|
|
@@ -112,14 +102,12 @@ module XTwitterScraper
|
|
|
112
102
|
?creator: XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Creator,
|
|
113
103
|
?description: String,
|
|
114
104
|
?invites_policy: String,
|
|
115
|
-
?is_member: bool,
|
|
116
105
|
?is_nsfw: bool,
|
|
117
106
|
?join_policy: String,
|
|
118
107
|
?member_count: Integer,
|
|
119
108
|
?moderator_count: Integer,
|
|
120
109
|
?name: String,
|
|
121
110
|
?primary_topic: XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::PrimaryTopic,
|
|
122
|
-
?role: String,
|
|
123
111
|
?rules: ::Array[XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Rule]
|
|
124
112
|
) -> void
|
|
125
113
|
|
|
@@ -130,14 +118,12 @@ module XTwitterScraper
|
|
|
130
118
|
creator: XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Creator,
|
|
131
119
|
description: String,
|
|
132
120
|
invites_policy: String,
|
|
133
|
-
is_member: bool,
|
|
134
121
|
is_nsfw: bool,
|
|
135
122
|
join_policy: String,
|
|
136
123
|
member_count: Integer,
|
|
137
124
|
moderator_count: Integer,
|
|
138
125
|
name: String,
|
|
139
126
|
primary_topic: XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::PrimaryTopic,
|
|
140
|
-
role: String,
|
|
141
127
|
rules: ::Array[XTwitterScraper::Models::X::CommunityRetrieveInfoResponse::Community::Rule]
|
|
142
128
|
}
|
|
143
129
|
|
|
@@ -5,12 +5,20 @@
|
|
|
5
5
|
module XTwitterScraper
|
|
6
6
|
module Models
|
|
7
7
|
module X
|
|
8
|
-
type tweet_author =
|
|
8
|
+
type tweet_author = ::Hash[Symbol, top]
|
|
9
9
|
|
|
10
10
|
class TweetAuthor < XTwitterScraper::Models::UserProfile
|
|
11
|
-
def
|
|
11
|
+
def followers: -> Integer
|
|
12
12
|
|
|
13
|
-
def
|
|
13
|
+
def followers=: (Integer _) -> Integer
|
|
14
|
+
|
|
15
|
+
def verified: -> bool
|
|
16
|
+
|
|
17
|
+
def verified=: (bool _) -> bool
|
|
18
|
+
|
|
19
|
+
def initialize: (**untyped) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> ::Hash[Symbol, top]
|
|
14
22
|
end
|
|
15
23
|
end
|
|
16
24
|
end
|