x-twitter-scraper 0.5.5 → 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 +34 -0
- data/README.md +1 -1
- data/lib/x_twitter_scraper/internal/type/union.rb +25 -9
- data/lib/x_twitter_scraper/models/compose_create_response.rb +62 -1
- 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/radar_item.rb +144 -7
- 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_params.rb +22 -0
- data/lib/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rb +224 -0
- data/lib/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rb +4 -4
- data/lib/x_twitter_scraper/models/x/account_create_params.rb +9 -9
- data/lib/x_twitter_scraper/models/x/account_create_response.rb +146 -54
- data/lib/x_twitter_scraper/models/x/account_reauth_params.rb +2 -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/x_account.rb +9 -9
- 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/compose.rb +4 -4
- data/lib/x_twitter_scraper/resources/x/account_connection_attempts.rb +37 -0
- data/lib/x_twitter_scraper/resources/x/accounts.rb +5 -5
- 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/resources/x.rb +6 -0
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/lib/x_twitter_scraper.rb +5 -1
- data/rbi/x_twitter_scraper/models/compose_create_response.rbi +142 -0
- 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/radar_item.rbi +245 -8
- 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_params.rbi +40 -0
- data/rbi/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbi +295 -0
- data/rbi/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbi +6 -6
- data/rbi/x_twitter_scraper/models/x/account_create_params.rbi +8 -11
- data/rbi/x_twitter_scraper/models/x/account_create_response.rbi +232 -91
- data/rbi/x_twitter_scraper/models/x/account_reauth_params.rbi +2 -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/x_account.rbi +12 -12
- 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/compose.rbi +4 -4
- data/rbi/x_twitter_scraper/resources/x/account_connection_attempts.rbi +33 -0
- data/rbi/x_twitter_scraper/resources/x/accounts.rbi +5 -5
- 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/rbi/x_twitter_scraper/resources/x.rbi +4 -0
- data/sig/x_twitter_scraper/models/compose_create_response.rbs +60 -0
- 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/radar_item.rbs +100 -4
- 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_params.rbs +25 -0
- data/sig/x_twitter_scraper/models/x/account_connection_attempt_retrieve_response.rbs +199 -0
- data/sig/x_twitter_scraper/models/x/account_connection_challenge_submit_response.rbs +5 -5
- data/sig/x_twitter_scraper/models/x/account_create_params.rbs +6 -8
- data/sig/x_twitter_scraper/models/x/account_create_response.rbs +144 -59
- 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/account_connection_attempts.rbs +14 -0
- data/sig/x_twitter_scraper/resources/x/accounts.rbs +2 -2
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +3 -1
- data/sig/x_twitter_scraper/resources/x.rbs +2 -0
- metadata +14 -2
|
@@ -11,51 +11,64 @@ module XTwitterScraper
|
|
|
11
11
|
class TicketListResponse < XTwitterScraper::Internal::Type::BaseModel
|
|
12
12
|
# @!attribute tickets
|
|
13
13
|
#
|
|
14
|
-
# @return [Array<XTwitterScraper::Models::Support::TicketListResponse::Ticket
|
|
15
|
-
|
|
14
|
+
# @return [Array<XTwitterScraper::Models::Support::TicketListResponse::Ticket>]
|
|
15
|
+
required :tickets,
|
|
16
16
|
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketListResponse::Ticket] }
|
|
17
17
|
|
|
18
|
-
# @!method initialize(tickets:
|
|
18
|
+
# @!method initialize(tickets:)
|
|
19
19
|
# @param tickets [Array<XTwitterScraper::Models::Support::TicketListResponse::Ticket>]
|
|
20
20
|
|
|
21
21
|
class Ticket < XTwitterScraper::Internal::Type::BaseModel
|
|
22
22
|
# @!attribute created_at
|
|
23
23
|
#
|
|
24
|
-
# @return [Time
|
|
25
|
-
|
|
24
|
+
# @return [Time]
|
|
25
|
+
required :created_at, Time, api_name: :createdAt
|
|
26
26
|
|
|
27
27
|
# @!attribute message_count
|
|
28
28
|
#
|
|
29
|
-
# @return [Integer
|
|
30
|
-
|
|
29
|
+
# @return [Integer]
|
|
30
|
+
required :message_count, Integer, api_name: :messageCount
|
|
31
31
|
|
|
32
32
|
# @!attribute public_id
|
|
33
33
|
#
|
|
34
|
-
# @return [String
|
|
35
|
-
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :public_id, String, api_name: :publicId
|
|
36
36
|
|
|
37
37
|
# @!attribute status
|
|
38
38
|
#
|
|
39
|
-
# @return [
|
|
40
|
-
|
|
39
|
+
# @return [Symbol, XTwitterScraper::Models::Support::TicketListResponse::Ticket::Status]
|
|
40
|
+
required :status, enum: -> { XTwitterScraper::Models::Support::TicketListResponse::Ticket::Status }
|
|
41
41
|
|
|
42
42
|
# @!attribute subject
|
|
43
43
|
#
|
|
44
|
-
# @return [String
|
|
45
|
-
|
|
44
|
+
# @return [String]
|
|
45
|
+
required :subject, String
|
|
46
46
|
|
|
47
47
|
# @!attribute updated_at
|
|
48
48
|
#
|
|
49
|
-
# @return [Time
|
|
50
|
-
|
|
49
|
+
# @return [Time]
|
|
50
|
+
required :updated_at, Time, api_name: :updatedAt
|
|
51
51
|
|
|
52
|
-
# @!method initialize(created_at
|
|
52
|
+
# @!method initialize(created_at:, message_count:, public_id:, status:, subject:, updated_at:)
|
|
53
53
|
# @param created_at [Time]
|
|
54
54
|
# @param message_count [Integer]
|
|
55
55
|
# @param public_id [String]
|
|
56
|
-
# @param status [
|
|
56
|
+
# @param status [Symbol, XTwitterScraper::Models::Support::TicketListResponse::Ticket::Status]
|
|
57
57
|
# @param subject [String]
|
|
58
58
|
# @param updated_at [Time]
|
|
59
|
+
|
|
60
|
+
# @see XTwitterScraper::Models::Support::TicketListResponse::Ticket#status
|
|
61
|
+
module Status
|
|
62
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
63
|
+
|
|
64
|
+
OPEN = :open
|
|
65
|
+
IN_PROGRESS = :in_progress
|
|
66
|
+
RESOLVED = :resolved
|
|
67
|
+
CLOSED = :closed
|
|
68
|
+
|
|
69
|
+
# @!method self.values
|
|
70
|
+
# @return [Array<Symbol>]
|
|
71
|
+
end
|
|
59
72
|
end
|
|
60
73
|
end
|
|
61
74
|
end
|
|
@@ -11,70 +11,70 @@ module XTwitterScraper
|
|
|
11
11
|
class TicketRetrieveResponse < XTwitterScraper::Internal::Type::BaseModel
|
|
12
12
|
# @!attribute created_at
|
|
13
13
|
#
|
|
14
|
-
# @return [Time
|
|
15
|
-
|
|
14
|
+
# @return [Time]
|
|
15
|
+
required :created_at, Time, api_name: :createdAt
|
|
16
16
|
|
|
17
17
|
# @!attribute messages
|
|
18
18
|
#
|
|
19
|
-
# @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message
|
|
20
|
-
|
|
19
|
+
# @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message>]
|
|
20
|
+
required :messages,
|
|
21
21
|
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message] }
|
|
22
22
|
|
|
23
23
|
# @!attribute public_id
|
|
24
24
|
#
|
|
25
|
-
# @return [String
|
|
26
|
-
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :public_id, String, api_name: :publicId
|
|
27
27
|
|
|
28
28
|
# @!attribute status
|
|
29
29
|
#
|
|
30
|
-
# @return [
|
|
31
|
-
|
|
30
|
+
# @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Status]
|
|
31
|
+
required :status, enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Status }
|
|
32
32
|
|
|
33
33
|
# @!attribute subject
|
|
34
34
|
#
|
|
35
|
-
# @return [String
|
|
36
|
-
|
|
35
|
+
# @return [String]
|
|
36
|
+
required :subject, String
|
|
37
37
|
|
|
38
38
|
# @!attribute updated_at
|
|
39
39
|
#
|
|
40
|
-
# @return [Time
|
|
41
|
-
|
|
40
|
+
# @return [Time]
|
|
41
|
+
required :updated_at, Time, api_name: :updatedAt
|
|
42
42
|
|
|
43
|
-
# @!method initialize(created_at
|
|
43
|
+
# @!method initialize(created_at:, messages:, public_id:, status:, subject:, updated_at:)
|
|
44
44
|
# @param created_at [Time]
|
|
45
45
|
# @param messages [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message>]
|
|
46
46
|
# @param public_id [String]
|
|
47
|
-
# @param status [
|
|
47
|
+
# @param status [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Status]
|
|
48
48
|
# @param subject [String]
|
|
49
49
|
# @param updated_at [Time]
|
|
50
50
|
|
|
51
51
|
class Message < XTwitterScraper::Internal::Type::BaseModel
|
|
52
52
|
# @!attribute attachments
|
|
53
53
|
#
|
|
54
|
-
# @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment
|
|
55
|
-
|
|
54
|
+
# @return [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>]
|
|
55
|
+
required :attachments,
|
|
56
56
|
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment] }
|
|
57
57
|
|
|
58
58
|
# @!attribute body
|
|
59
59
|
#
|
|
60
|
-
# @return [String
|
|
61
|
-
|
|
60
|
+
# @return [String]
|
|
61
|
+
required :body, String
|
|
62
62
|
|
|
63
63
|
# @!attribute created_at
|
|
64
64
|
#
|
|
65
|
-
# @return [Time
|
|
66
|
-
|
|
65
|
+
# @return [Time]
|
|
66
|
+
required :created_at, Time, api_name: :createdAt
|
|
67
67
|
|
|
68
68
|
# @!attribute sender
|
|
69
69
|
#
|
|
70
|
-
# @return [
|
|
71
|
-
|
|
70
|
+
# @return [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Sender]
|
|
71
|
+
required :sender, enum: -> { XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Sender }
|
|
72
72
|
|
|
73
|
-
# @!method initialize(attachments
|
|
73
|
+
# @!method initialize(attachments:, body:, created_at:, sender:)
|
|
74
74
|
# @param attachments [Array<XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Attachment>]
|
|
75
75
|
# @param body [String]
|
|
76
76
|
# @param created_at [Time]
|
|
77
|
-
# @param sender [
|
|
77
|
+
# @param sender [Symbol, XTwitterScraper::Models::Support::TicketRetrieveResponse::Message::Sender]
|
|
78
78
|
|
|
79
79
|
class Attachment < XTwitterScraper::Internal::Type::BaseModel
|
|
80
80
|
# @!attribute content_type
|
|
@@ -181,6 +181,31 @@ module XTwitterScraper
|
|
|
181
181
|
# @return [Array<Symbol>]
|
|
182
182
|
end
|
|
183
183
|
end
|
|
184
|
+
|
|
185
|
+
# @see XTwitterScraper::Models::Support::TicketRetrieveResponse::Message#sender
|
|
186
|
+
module Sender
|
|
187
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
188
|
+
|
|
189
|
+
USER = :user
|
|
190
|
+
SUPPORT = :support
|
|
191
|
+
SYSTEM = :system
|
|
192
|
+
|
|
193
|
+
# @!method self.values
|
|
194
|
+
# @return [Array<Symbol>]
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# @see XTwitterScraper::Models::Support::TicketRetrieveResponse#status
|
|
199
|
+
module Status
|
|
200
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
201
|
+
|
|
202
|
+
OPEN = :open
|
|
203
|
+
IN_PROGRESS = :in_progress
|
|
204
|
+
RESOLVED = :resolved
|
|
205
|
+
CLOSED = :closed
|
|
206
|
+
|
|
207
|
+
# @!method self.values
|
|
208
|
+
# @return [Array<Symbol>]
|
|
184
209
|
end
|
|
185
210
|
end
|
|
186
211
|
end
|
|
@@ -11,17 +11,29 @@ module XTwitterScraper
|
|
|
11
11
|
class TicketUpdateResponse < XTwitterScraper::Internal::Type::BaseModel
|
|
12
12
|
# @!attribute public_id
|
|
13
13
|
#
|
|
14
|
-
# @return [String
|
|
15
|
-
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :public_id, String, api_name: :publicId
|
|
16
16
|
|
|
17
17
|
# @!attribute status
|
|
18
18
|
#
|
|
19
|
-
# @return [
|
|
20
|
-
|
|
19
|
+
# @return [Symbol, XTwitterScraper::Models::Support::TicketUpdateResponse::Status]
|
|
20
|
+
required :status, enum: -> { XTwitterScraper::Models::Support::TicketUpdateResponse::Status }
|
|
21
21
|
|
|
22
|
-
# @!method initialize(public_id
|
|
22
|
+
# @!method initialize(public_id:, status:)
|
|
23
23
|
# @param public_id [String]
|
|
24
|
-
# @param status [
|
|
24
|
+
# @param status [Symbol, XTwitterScraper::Models::Support::TicketUpdateResponse::Status]
|
|
25
|
+
|
|
26
|
+
# @see XTwitterScraper::Models::Support::TicketUpdateResponse#status
|
|
27
|
+
module Status
|
|
28
|
+
extend XTwitterScraper::Internal::Type::Enum
|
|
29
|
+
|
|
30
|
+
OPEN = :open
|
|
31
|
+
RESOLVED = :resolved
|
|
32
|
+
CLOSED = :closed
|
|
33
|
+
|
|
34
|
+
# @!method self.values
|
|
35
|
+
# @return [Array<Symbol>]
|
|
36
|
+
end
|
|
25
37
|
end
|
|
26
38
|
end
|
|
27
39
|
end
|
|
@@ -40,6 +40,12 @@ module XTwitterScraper
|
|
|
40
40
|
# @return [String, nil]
|
|
41
41
|
optional :description, String
|
|
42
42
|
|
|
43
|
+
# @!attribute promoted_content
|
|
44
|
+
# Promotion identifier from X. Null for organic trends.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :promoted_content, String, api_name: :promotedContent, nil?: true
|
|
48
|
+
|
|
43
49
|
# @!attribute query
|
|
44
50
|
#
|
|
45
51
|
# @return [String, nil]
|
|
@@ -50,11 +56,32 @@ module XTwitterScraper
|
|
|
50
56
|
# @return [Integer, nil]
|
|
51
57
|
optional :rank, Integer
|
|
52
58
|
|
|
53
|
-
# @!
|
|
59
|
+
# @!attribute tweet_volume
|
|
60
|
+
# Approximate public post volume when X supplies it.
|
|
61
|
+
#
|
|
62
|
+
# @return [Integer, nil]
|
|
63
|
+
optional :tweet_volume, Integer, api_name: :tweetVolume, nil?: true
|
|
64
|
+
|
|
65
|
+
# @!attribute url
|
|
66
|
+
# X search URL for the trend.
|
|
67
|
+
#
|
|
68
|
+
# @return [String, nil]
|
|
69
|
+
optional :url, String
|
|
70
|
+
|
|
71
|
+
# @!method initialize(name:, description: nil, promoted_content: nil, query: nil, rank: nil, tweet_volume: nil, url: nil)
|
|
54
72
|
# @param name [String]
|
|
73
|
+
#
|
|
55
74
|
# @param description [String]
|
|
75
|
+
#
|
|
76
|
+
# @param promoted_content [String, nil] Promotion identifier from X. Null for organic trends.
|
|
77
|
+
#
|
|
56
78
|
# @param query [String]
|
|
79
|
+
#
|
|
57
80
|
# @param rank [Integer]
|
|
81
|
+
#
|
|
82
|
+
# @param tweet_volume [Integer, nil] Approximate public post volume when X supplies it.
|
|
83
|
+
#
|
|
84
|
+
# @param url [String] X search URL for the trend.
|
|
58
85
|
end
|
|
59
86
|
end
|
|
60
87
|
end
|
|
@@ -24,6 +24,102 @@ module XTwitterScraper
|
|
|
24
24
|
# @return [String]
|
|
25
25
|
required :url, String
|
|
26
26
|
|
|
27
|
+
# @!attribute id
|
|
28
|
+
# X media entity ID.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
optional :id, String
|
|
32
|
+
|
|
33
|
+
# @!attribute allow_download
|
|
34
|
+
# Whether X permits direct media download.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :allow_download, XTwitterScraper::Internal::Type::Boolean, api_name: :allowDownload
|
|
38
|
+
|
|
39
|
+
# @!attribute alt_text
|
|
40
|
+
# Accessibility text supplied for the media.
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
optional :alt_text, String, api_name: :altText
|
|
44
|
+
|
|
45
|
+
# @!attribute aspect_ratio
|
|
46
|
+
# Video aspect ratio as width and height.
|
|
47
|
+
#
|
|
48
|
+
# @return [Array<Integer>, nil]
|
|
49
|
+
optional :aspect_ratio, XTwitterScraper::Internal::Type::ArrayOf[Integer], api_name: :aspectRatio
|
|
50
|
+
|
|
51
|
+
# @!attribute availability_status
|
|
52
|
+
# Media availability state reported by X.
|
|
53
|
+
#
|
|
54
|
+
# @return [String, nil]
|
|
55
|
+
optional :availability_status, String, api_name: :availabilityStatus
|
|
56
|
+
|
|
57
|
+
# @!attribute display_url
|
|
58
|
+
# Display-friendly media URL reported by X.
|
|
59
|
+
#
|
|
60
|
+
# @return [String, nil]
|
|
61
|
+
optional :display_url, String, api_name: :displayUrl
|
|
62
|
+
|
|
63
|
+
# @!attribute duration_millis
|
|
64
|
+
# Video duration in milliseconds.
|
|
65
|
+
#
|
|
66
|
+
# @return [Integer, nil]
|
|
67
|
+
optional :duration_millis, Integer, api_name: :durationMillis
|
|
68
|
+
|
|
69
|
+
# @!attribute expanded_url
|
|
70
|
+
# Expanded X media URL.
|
|
71
|
+
#
|
|
72
|
+
# @return [String, nil]
|
|
73
|
+
optional :expanded_url, String, api_name: :expandedUrl
|
|
74
|
+
|
|
75
|
+
# @!attribute face_rects
|
|
76
|
+
# Face-aware crop rectangles grouped by media size.
|
|
77
|
+
#
|
|
78
|
+
# @return [Hash{Symbol=>Array<XTwitterScraper::Models::TweetMedia::FaceRect>}, nil]
|
|
79
|
+
optional :face_rects,
|
|
80
|
+
-> {
|
|
81
|
+
XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia::FaceRect]]
|
|
82
|
+
},
|
|
83
|
+
api_name: :faceRects
|
|
84
|
+
|
|
85
|
+
# @!attribute focus_rects
|
|
86
|
+
# Suggested image crops reported by X.
|
|
87
|
+
#
|
|
88
|
+
# @return [Array<XTwitterScraper::Models::TweetMedia::FocusRect>, nil]
|
|
89
|
+
optional :focus_rects,
|
|
90
|
+
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia::FocusRect] },
|
|
91
|
+
api_name: :focusRects
|
|
92
|
+
|
|
93
|
+
# @!attribute height
|
|
94
|
+
# Original media height.
|
|
95
|
+
#
|
|
96
|
+
# @return [Integer, nil]
|
|
97
|
+
optional :height, Integer
|
|
98
|
+
|
|
99
|
+
# @!attribute indices
|
|
100
|
+
# Media entity offsets in the tweet text.
|
|
101
|
+
#
|
|
102
|
+
# @return [Array<Integer>, nil]
|
|
103
|
+
optional :indices, XTwitterScraper::Internal::Type::ArrayOf[Integer]
|
|
104
|
+
|
|
105
|
+
# @!attribute media_key
|
|
106
|
+
# Stable X media key.
|
|
107
|
+
#
|
|
108
|
+
# @return [String, nil]
|
|
109
|
+
optional :media_key, String, api_name: :mediaKey
|
|
110
|
+
|
|
111
|
+
# @!attribute monetizable
|
|
112
|
+
# Whether X reports the media as monetizable.
|
|
113
|
+
#
|
|
114
|
+
# @return [Boolean, nil]
|
|
115
|
+
optional :monetizable, XTwitterScraper::Internal::Type::Boolean
|
|
116
|
+
|
|
117
|
+
# @!attribute sizes
|
|
118
|
+
# Named media renditions and resize modes.
|
|
119
|
+
#
|
|
120
|
+
# @return [Hash{Symbol=>XTwitterScraper::Models::TweetMedia::Size}, nil]
|
|
121
|
+
optional :sizes, -> { XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::TweetMedia::Size] }
|
|
122
|
+
|
|
27
123
|
# @!attribute video_variants
|
|
28
124
|
# Available video encodings, ordered as returned
|
|
29
125
|
#
|
|
@@ -32,7 +128,13 @@ module XTwitterScraper
|
|
|
32
128
|
-> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia::VideoVariant] },
|
|
33
129
|
api_name: :videoVariants
|
|
34
130
|
|
|
35
|
-
# @!
|
|
131
|
+
# @!attribute width
|
|
132
|
+
# Original media width.
|
|
133
|
+
#
|
|
134
|
+
# @return [Integer, nil]
|
|
135
|
+
optional :width, Integer
|
|
136
|
+
|
|
137
|
+
# @!method initialize(media_url:, type:, url:, id: nil, allow_download: nil, alt_text: nil, aspect_ratio: nil, availability_status: nil, display_url: nil, duration_millis: nil, expanded_url: nil, face_rects: nil, focus_rects: nil, height: nil, indices: nil, media_key: nil, monetizable: nil, sizes: nil, video_variants: nil, width: nil)
|
|
36
138
|
# Normalized media attached to a tweet.
|
|
37
139
|
#
|
|
38
140
|
# @param media_url [String] Media preview URL
|
|
@@ -41,7 +143,39 @@ module XTwitterScraper
|
|
|
41
143
|
#
|
|
42
144
|
# @param url [String] X media link from the tweet
|
|
43
145
|
#
|
|
146
|
+
# @param id [String] X media entity ID.
|
|
147
|
+
#
|
|
148
|
+
# @param allow_download [Boolean] Whether X permits direct media download.
|
|
149
|
+
#
|
|
150
|
+
# @param alt_text [String] Accessibility text supplied for the media.
|
|
151
|
+
#
|
|
152
|
+
# @param aspect_ratio [Array<Integer>] Video aspect ratio as width and height.
|
|
153
|
+
#
|
|
154
|
+
# @param availability_status [String] Media availability state reported by X.
|
|
155
|
+
#
|
|
156
|
+
# @param display_url [String] Display-friendly media URL reported by X.
|
|
157
|
+
#
|
|
158
|
+
# @param duration_millis [Integer] Video duration in milliseconds.
|
|
159
|
+
#
|
|
160
|
+
# @param expanded_url [String] Expanded X media URL.
|
|
161
|
+
#
|
|
162
|
+
# @param face_rects [Hash{Symbol=>Array<XTwitterScraper::Models::TweetMedia::FaceRect>}] Face-aware crop rectangles grouped by media size.
|
|
163
|
+
#
|
|
164
|
+
# @param focus_rects [Array<XTwitterScraper::Models::TweetMedia::FocusRect>] Suggested image crops reported by X.
|
|
165
|
+
#
|
|
166
|
+
# @param height [Integer] Original media height.
|
|
167
|
+
#
|
|
168
|
+
# @param indices [Array<Integer>] Media entity offsets in the tweet text.
|
|
169
|
+
#
|
|
170
|
+
# @param media_key [String] Stable X media key.
|
|
171
|
+
#
|
|
172
|
+
# @param monetizable [Boolean] Whether X reports the media as monetizable.
|
|
173
|
+
#
|
|
174
|
+
# @param sizes [Hash{Symbol=>XTwitterScraper::Models::TweetMedia::Size}] Named media renditions and resize modes.
|
|
175
|
+
#
|
|
44
176
|
# @param video_variants [Array<XTwitterScraper::Models::TweetMedia::VideoVariant>] Available video encodings, ordered as returned
|
|
177
|
+
#
|
|
178
|
+
# @param width [Integer] Original media width.
|
|
45
179
|
|
|
46
180
|
# @see XTwitterScraper::Models::TweetMedia#type
|
|
47
181
|
module Type
|
|
@@ -55,6 +189,84 @@ module XTwitterScraper
|
|
|
55
189
|
# @return [Array<Symbol>]
|
|
56
190
|
end
|
|
57
191
|
|
|
192
|
+
class FaceRect < XTwitterScraper::Internal::Type::BaseModel
|
|
193
|
+
# @!attribute h
|
|
194
|
+
#
|
|
195
|
+
# @return [Integer]
|
|
196
|
+
required :h, Integer
|
|
197
|
+
|
|
198
|
+
# @!attribute w
|
|
199
|
+
#
|
|
200
|
+
# @return [Integer]
|
|
201
|
+
required :w, Integer
|
|
202
|
+
|
|
203
|
+
# @!attribute x
|
|
204
|
+
#
|
|
205
|
+
# @return [Integer]
|
|
206
|
+
required :x, Integer
|
|
207
|
+
|
|
208
|
+
# @!attribute y_
|
|
209
|
+
#
|
|
210
|
+
# @return [Integer]
|
|
211
|
+
required :y_, Integer, api_name: :y
|
|
212
|
+
|
|
213
|
+
# @!method initialize(h:, w:, x:, y_:)
|
|
214
|
+
# @param h [Integer]
|
|
215
|
+
# @param w [Integer]
|
|
216
|
+
# @param x [Integer]
|
|
217
|
+
# @param y_ [Integer]
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
class FocusRect < XTwitterScraper::Internal::Type::BaseModel
|
|
221
|
+
# @!attribute h
|
|
222
|
+
#
|
|
223
|
+
# @return [Integer]
|
|
224
|
+
required :h, Integer
|
|
225
|
+
|
|
226
|
+
# @!attribute w
|
|
227
|
+
#
|
|
228
|
+
# @return [Integer]
|
|
229
|
+
required :w, Integer
|
|
230
|
+
|
|
231
|
+
# @!attribute x
|
|
232
|
+
#
|
|
233
|
+
# @return [Integer]
|
|
234
|
+
required :x, Integer
|
|
235
|
+
|
|
236
|
+
# @!attribute y_
|
|
237
|
+
#
|
|
238
|
+
# @return [Integer]
|
|
239
|
+
required :y_, Integer, api_name: :y
|
|
240
|
+
|
|
241
|
+
# @!method initialize(h:, w:, x:, y_:)
|
|
242
|
+
# @param h [Integer]
|
|
243
|
+
# @param w [Integer]
|
|
244
|
+
# @param x [Integer]
|
|
245
|
+
# @param y_ [Integer]
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
class Size < XTwitterScraper::Internal::Type::BaseModel
|
|
249
|
+
# @!attribute h
|
|
250
|
+
#
|
|
251
|
+
# @return [Integer]
|
|
252
|
+
required :h, Integer
|
|
253
|
+
|
|
254
|
+
# @!attribute resize
|
|
255
|
+
#
|
|
256
|
+
# @return [String]
|
|
257
|
+
required :resize, String
|
|
258
|
+
|
|
259
|
+
# @!attribute w
|
|
260
|
+
#
|
|
261
|
+
# @return [Integer]
|
|
262
|
+
required :w, Integer
|
|
263
|
+
|
|
264
|
+
# @!method initialize(h:, resize:, w:)
|
|
265
|
+
# @param h [Integer]
|
|
266
|
+
# @param resize [String]
|
|
267
|
+
# @param w [Integer]
|
|
268
|
+
end
|
|
269
|
+
|
|
58
270
|
class VideoVariant < XTwitterScraper::Internal::Type::BaseModel
|
|
59
271
|
# @!attribute content_type
|
|
60
272
|
#
|