x-twitter-scraper 0.4.5 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/README.md +8 -41
- data/lib/x_twitter_scraper/client.rb +1 -1
- data/lib/x_twitter_scraper/internal/type/union.rb +13 -0
- data/lib/x_twitter_scraper/models/account_retrieve_response.rb +4 -4
- data/lib/x_twitter_scraper/models/compose_create_params.rb +194 -122
- data/lib/x_twitter_scraper/models/compose_create_response.rb +326 -33
- data/lib/x_twitter_scraper/models/credit_retrieve_topup_status_params.rb +2 -2
- data/lib/x_twitter_scraper/models/error.rb +99 -3
- data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +8 -8
- data/lib/x_twitter_scraper/models/guest_wallet_create_params.rb +2 -2
- data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +27 -7
- data/lib/x_twitter_scraper/models/guest_wallet_topup_params.rb +2 -2
- data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +27 -7
- data/lib/x_twitter_scraper/models/search_tweet.rb +12 -12
- data/lib/x_twitter_scraper/models/support/ticket_create_params.rb +7 -1
- data/lib/x_twitter_scraper/models/support/ticket_create_response.rb +40 -3
- data/lib/x_twitter_scraper/models/support/ticket_reply_params.rb +7 -1
- data/lib/x_twitter_scraper/models/support/ticket_reply_response.rb +40 -3
- data/lib/x_twitter_scraper/models/support/ticket_retrieve_response.rb +114 -1
- data/lib/x_twitter_scraper/models/x/communities/join_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/communities/join_create_response.rb +577 -4
- data/lib/x_twitter_scraper/models/x/communities/join_delete_all_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/communities/join_delete_all_response.rb +585 -4
- data/lib/x_twitter_scraper/models/x/community_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/community_create_response.rb +568 -8
- data/lib/x_twitter_scraper/models/x/community_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/community_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/dm_send_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/dm_send_response.rb +573 -7
- data/lib/x_twitter_scraper/models/x/media_upload_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/media_upload_response.rb +568 -11
- data/lib/x_twitter_scraper/models/x/profile_update_avatar_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/profile_update_avatar_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/profile_update_banner_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/profile_update_banner_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/profile_update_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/profile_update_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweet_author.rb +1 -14
- data/lib/x_twitter_scraper/models/x/tweet_create_params.rb +5 -5
- data/lib/x_twitter_scraper/models/x/tweet_create_response.rb +551 -12
- data/lib/x_twitter_scraper/models/x/tweet_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweet_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/like_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/like_create_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/like_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/like_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/retweet_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/retweet_create_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/tweets/retweet_delete_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/user_remove_follower_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/user_remove_follower_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +2 -2
- data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +2 -2
- data/lib/x_twitter_scraper/models/x/users/follow_create_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/users/follow_create_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/users/follow_delete_all_params.rb +8 -1
- data/lib/x_twitter_scraper/models/x/users/follow_delete_all_response.rb +576 -4
- data/lib/x_twitter_scraper/models/x/write_action_retrieve_response.rb +469 -52
- data/lib/x_twitter_scraper/models/x/x_account.rb +7 -7
- data/lib/x_twitter_scraper/models/x/x_account_detail.rb +1 -1
- data/lib/x_twitter_scraper/resources/compose.rb +8 -26
- data/lib/x_twitter_scraper/resources/credits.rb +1 -1
- data/lib/x_twitter_scraper/resources/extractions.rb +4 -4
- data/lib/x_twitter_scraper/resources/guest_wallets.rb +2 -2
- data/lib/x_twitter_scraper/resources/monitors/keywords.rb +4 -5
- data/lib/x_twitter_scraper/resources/monitors.rb +3 -3
- data/lib/x_twitter_scraper/resources/support/tickets.rb +24 -8
- data/lib/x_twitter_scraper/resources/trends.rb +1 -1
- data/lib/x_twitter_scraper/resources/x/communities/join.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/communities.rb +25 -11
- data/lib/x_twitter_scraper/resources/x/dm.rb +13 -6
- data/lib/x_twitter_scraper/resources/x/media.rb +17 -7
- data/lib/x_twitter_scraper/resources/x/profile.rb +46 -17
- data/lib/x_twitter_scraper/resources/x/tweets/like.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/tweets/retweet.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/tweets.rb +31 -16
- data/lib/x_twitter_scraper/resources/x/users/follow.rb +22 -8
- data/lib/x_twitter_scraper/resources/x/users.rb +16 -9
- data/lib/x_twitter_scraper/resources/x.rb +1 -2
- data/lib/x_twitter_scraper/version.rb +1 -1
- data/rbi/x_twitter_scraper/client.rbi +1 -1
- data/rbi/x_twitter_scraper/models/account_retrieve_response.rbi +4 -4
- data/rbi/x_twitter_scraper/models/compose_create_params.rbi +392 -215
- data/rbi/x_twitter_scraper/models/compose_create_response.rbi +537 -48
- data/rbi/x_twitter_scraper/models/credit_retrieve_topup_status_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/error.rbi +379 -13
- data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +8 -8
- data/rbi/x_twitter_scraper/models/guest_wallet_create_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +87 -5
- data/rbi/x_twitter_scraper/models/guest_wallet_topup_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +87 -5
- data/rbi/x_twitter_scraper/models/search_tweet.rbi +12 -12
- data/rbi/x_twitter_scraper/models/support/ticket_create_params.rbi +9 -1
- data/rbi/x_twitter_scraper/models/support/ticket_create_response.rbi +113 -7
- data/rbi/x_twitter_scraper/models/support/ticket_reply_params.rbi +9 -1
- data/rbi/x_twitter_scraper/models/support/ticket_reply_response.rbi +113 -7
- data/rbi/x_twitter_scraper/models/support/ticket_retrieve_response.rbi +276 -5
- data/rbi/x_twitter_scraper/models/x/communities/join_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/communities/join_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/communities/join_delete_all_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/community_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/community_create_response.rbi +1127 -5
- data/rbi/x_twitter_scraper/models/x/community_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/community_delete_response.rbi +1148 -3
- data/rbi/x_twitter_scraper/models/x/dm_send_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/dm_send_response.rbi +1112 -6
- data/rbi/x_twitter_scraper/models/x/media_upload_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/media_upload_response.rbi +1124 -9
- data/rbi/x_twitter_scraper/models/x/profile_update_avatar_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/profile_update_avatar_response.rbi +1152 -3
- data/rbi/x_twitter_scraper/models/x/profile_update_banner_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/profile_update_banner_response.rbi +1152 -3
- data/rbi/x_twitter_scraper/models/x/profile_update_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/profile_update_response.rbi +1144 -3
- data/rbi/x_twitter_scraper/models/x/tweet_author.rbi +3 -13
- data/rbi/x_twitter_scraper/models/x/tweet_create_params.rbi +5 -8
- data/rbi/x_twitter_scraper/models/x/tweet_create_response.rbi +1108 -14
- data/rbi/x_twitter_scraper/models/x/tweet_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweet_delete_response.rbi +1140 -3
- data/rbi/x_twitter_scraper/models/x/tweets/like_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/like_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/tweets/like_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/like_delete_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/user_remove_follower_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/user_remove_follower_response.rbi +1152 -3
- data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +2 -2
- data/rbi/x_twitter_scraper/models/x/users/follow_create_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/users/follow_create_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_params.rbi +6 -0
- data/rbi/x_twitter_scraper/models/x/users/follow_delete_all_response.rbi +1154 -3
- data/rbi/x_twitter_scraper/models/x/write_action_retrieve_response.rbi +930 -66
- data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -9
- data/rbi/x_twitter_scraper/models/x/x_account_detail.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/compose.rbi +12 -38
- data/rbi/x_twitter_scraper/resources/credits.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/extractions.rbi +4 -4
- data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +2 -2
- data/rbi/x_twitter_scraper/resources/monitors/keywords.rbi +4 -5
- data/rbi/x_twitter_scraper/resources/monitors.rbi +3 -3
- data/rbi/x_twitter_scraper/resources/support/tickets.rbi +17 -2
- data/rbi/x_twitter_scraper/resources/trends.rbi +1 -1
- data/rbi/x_twitter_scraper/resources/x/communities/join.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/communities.rbi +19 -7
- data/rbi/x_twitter_scraper/resources/x/dm.rbi +10 -3
- data/rbi/x_twitter_scraper/resources/x/media.rbi +9 -4
- data/rbi/x_twitter_scraper/resources/x/profile.rbi +27 -8
- data/rbi/x_twitter_scraper/resources/x/tweets/like.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/tweets/retweet.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/tweets.rbi +31 -12
- data/rbi/x_twitter_scraper/resources/x/users/follow.rbi +16 -4
- data/rbi/x_twitter_scraper/resources/x/users.rbi +13 -7
- data/rbi/x_twitter_scraper/resources/x.rbi +1 -2
- data/sig/x_twitter_scraper/models/compose_create_params.rbs +150 -90
- data/sig/x_twitter_scraper/models/compose_create_response.rbs +249 -27
- data/sig/x_twitter_scraper/models/error.rbs +170 -7
- data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +35 -5
- data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +35 -5
- data/sig/x_twitter_scraper/models/support/ticket_create_params.rbs +7 -1
- data/sig/x_twitter_scraper/models/support/ticket_create_response.rbs +49 -5
- data/sig/x_twitter_scraper/models/support/ticket_reply_params.rbs +7 -1
- data/sig/x_twitter_scraper/models/support/ticket_reply_response.rbs +49 -5
- data/sig/x_twitter_scraper/models/support/ticket_retrieve_response.rbs +113 -2
- data/sig/x_twitter_scraper/models/x/communities/join_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/communities/join_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/communities/join_delete_all_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/communities/join_delete_all_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/community_create_params.rbs +10 -1
- data/sig/x_twitter_scraper/models/x/community_create_response.rbs +528 -7
- data/sig/x_twitter_scraper/models/x/community_delete_params.rbs +10 -1
- data/sig/x_twitter_scraper/models/x/community_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/dm_send_params.rbs +5 -0
- data/sig/x_twitter_scraper/models/x/dm_send_response.rbs +539 -5
- data/sig/x_twitter_scraper/models/x/media_upload_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/media_upload_response.rbs +534 -7
- data/sig/x_twitter_scraper/models/x/profile_update_avatar_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/profile_update_avatar_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/profile_update_banner_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/profile_update_banner_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/profile_update_params.rbs +5 -0
- data/sig/x_twitter_scraper/models/x/profile_update_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweet_author.rbs +3 -11
- data/sig/x_twitter_scraper/models/x/tweet_create_params.rbs +4 -6
- data/sig/x_twitter_scraper/models/x/tweet_create_response.rbs +518 -11
- data/sig/x_twitter_scraper/models/x/tweet_delete_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweet_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/like_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/like_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/like_delete_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/like_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/retweet_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/retweet_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/tweets/retweet_delete_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/user_remove_follower_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/user_remove_follower_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/users/follow_create_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/users/follow_create_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/users/follow_delete_all_params.rbs +5 -1
- data/sig/x_twitter_scraper/models/x/users/follow_delete_all_response.rbs +540 -4
- data/sig/x_twitter_scraper/models/x/write_action_retrieve_response.rbs +428 -54
- data/sig/x_twitter_scraper/resources/compose.rbs +2 -12
- data/sig/x_twitter_scraper/resources/support/tickets.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/communities/join.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/communities.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/dm.rbs +1 -0
- data/sig/x_twitter_scraper/resources/x/media.rbs +1 -0
- data/sig/x_twitter_scraper/resources/x/profile.rbs +3 -0
- data/sig/x_twitter_scraper/resources/x/tweets/like.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/tweets/retweet.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/tweets.rbs +2 -1
- data/sig/x_twitter_scraper/resources/x/users/follow.rbs +2 -0
- data/sig/x_twitter_scraper/resources/x/users.rbs +1 -0
- metadata +17 -26
|
@@ -2,74 +2,563 @@
|
|
|
2
2
|
|
|
3
3
|
module XTwitterScraper
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
module ComposeCreateResponse
|
|
6
|
+
extend XTwitterScraper::Internal::Type::Union
|
|
7
|
+
|
|
8
|
+
Variants =
|
|
7
9
|
T.type_alias do
|
|
8
10
|
T.any(
|
|
9
|
-
XTwitterScraper::Models::ComposeCreateResponse,
|
|
10
|
-
XTwitterScraper::
|
|
11
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult,
|
|
12
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult,
|
|
13
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult
|
|
11
14
|
)
|
|
12
15
|
end
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
class ComposePrepareResult < XTwitterScraper::Internal::Type::BaseModel
|
|
18
|
+
OrHash =
|
|
19
|
+
T.type_alias do
|
|
20
|
+
T.any(
|
|
21
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult,
|
|
22
|
+
XTwitterScraper::Internal::AnyHash
|
|
23
|
+
)
|
|
24
|
+
end
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
# Xquik editorial heuristics, ordered for the goal.
|
|
27
|
+
sig do
|
|
28
|
+
returns(
|
|
29
|
+
T::Array[
|
|
30
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ContentRule
|
|
31
|
+
]
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
attr_accessor :content_rules
|
|
20
35
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
# Published engagement signal names. Production multipliers are not published.
|
|
37
|
+
sig do
|
|
38
|
+
returns(
|
|
39
|
+
T::Array[
|
|
40
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::EngagementMultiplier
|
|
41
|
+
]
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
attr_accessor :engagement_multipliers
|
|
24
45
|
|
|
25
|
-
|
|
26
|
-
|
|
46
|
+
# Publication limit for timing and decay claims.
|
|
47
|
+
sig { returns(String) }
|
|
48
|
+
attr_accessor :engagement_velocity
|
|
27
49
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
attr_reader :suggestions
|
|
50
|
+
sig { returns(T::Array[String]) }
|
|
51
|
+
attr_accessor :follow_up_questions
|
|
31
52
|
|
|
32
|
-
|
|
33
|
-
|
|
53
|
+
# X post intent seeded with the topic.
|
|
54
|
+
sig { returns(String) }
|
|
55
|
+
attr_accessor :intent_url
|
|
34
56
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
attr_reader :text
|
|
57
|
+
sig { returns(String) }
|
|
58
|
+
attr_accessor :next_step
|
|
38
59
|
|
|
39
|
-
|
|
40
|
-
|
|
60
|
+
# Published signal names with unpublished weights as null.
|
|
61
|
+
sig do
|
|
62
|
+
returns(
|
|
63
|
+
T::Array[
|
|
64
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight
|
|
65
|
+
]
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
attr_accessor :scorer_weights
|
|
41
69
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
# Signal source and evidence limits.
|
|
71
|
+
sig { returns(String) }
|
|
72
|
+
attr_accessor :source
|
|
73
|
+
|
|
74
|
+
# Negative engagement predictions in the public model.
|
|
75
|
+
sig { returns(T::Array[String]) }
|
|
76
|
+
attr_accessor :top_penalties
|
|
77
|
+
|
|
78
|
+
# Style analyses saved to the account.
|
|
79
|
+
sig do
|
|
80
|
+
returns(
|
|
81
|
+
T.nilable(
|
|
82
|
+
T::Array[
|
|
83
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::SavedStyle
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
attr_reader :saved_styles
|
|
89
|
+
|
|
90
|
+
sig do
|
|
91
|
+
params(
|
|
92
|
+
saved_styles:
|
|
93
|
+
T::Array[
|
|
94
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::SavedStyle::OrHash
|
|
95
|
+
]
|
|
96
|
+
).void
|
|
97
|
+
end
|
|
98
|
+
attr_writer :saved_styles
|
|
99
|
+
|
|
100
|
+
# Next action when no cached style is available.
|
|
101
|
+
sig { returns(T.nilable(String)) }
|
|
102
|
+
attr_reader :style_note
|
|
103
|
+
|
|
104
|
+
sig { params(style_note: String).void }
|
|
105
|
+
attr_writer :style_note
|
|
106
|
+
|
|
107
|
+
# Cached examples for the requested style username.
|
|
108
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
109
|
+
attr_reader :style_tweets
|
|
110
|
+
|
|
111
|
+
sig { params(style_tweets: T::Array[String]).void }
|
|
112
|
+
attr_writer :style_tweets
|
|
113
|
+
|
|
114
|
+
sig do
|
|
115
|
+
params(
|
|
116
|
+
content_rules:
|
|
117
|
+
T::Array[
|
|
118
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ContentRule::OrHash
|
|
119
|
+
],
|
|
120
|
+
engagement_multipliers:
|
|
121
|
+
T::Array[
|
|
122
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::EngagementMultiplier::OrHash
|
|
123
|
+
],
|
|
124
|
+
engagement_velocity: String,
|
|
125
|
+
follow_up_questions: T::Array[String],
|
|
126
|
+
intent_url: String,
|
|
127
|
+
next_step: String,
|
|
128
|
+
scorer_weights:
|
|
129
|
+
T::Array[
|
|
130
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight::OrHash
|
|
131
|
+
],
|
|
132
|
+
source: String,
|
|
133
|
+
top_penalties: T::Array[String],
|
|
134
|
+
saved_styles:
|
|
135
|
+
T::Array[
|
|
136
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::SavedStyle::OrHash
|
|
137
|
+
],
|
|
138
|
+
style_note: String,
|
|
139
|
+
style_tweets: T::Array[String]
|
|
140
|
+
).returns(T.attached_class)
|
|
141
|
+
end
|
|
142
|
+
def self.new(
|
|
143
|
+
# Xquik editorial heuristics, ordered for the goal.
|
|
144
|
+
content_rules:,
|
|
145
|
+
# Published engagement signal names. Production multipliers are not published.
|
|
146
|
+
engagement_multipliers:,
|
|
147
|
+
# Publication limit for timing and decay claims.
|
|
148
|
+
engagement_velocity:,
|
|
149
|
+
follow_up_questions:,
|
|
150
|
+
# X post intent seeded with the topic.
|
|
151
|
+
intent_url:,
|
|
152
|
+
next_step:,
|
|
153
|
+
# Published signal names with unpublished weights as null.
|
|
154
|
+
scorer_weights:,
|
|
155
|
+
# Signal source and evidence limits.
|
|
156
|
+
source:,
|
|
157
|
+
# Negative engagement predictions in the public model.
|
|
158
|
+
top_penalties:,
|
|
159
|
+
# Style analyses saved to the account.
|
|
160
|
+
saved_styles: nil,
|
|
161
|
+
# Next action when no cached style is available.
|
|
162
|
+
style_note: nil,
|
|
163
|
+
# Cached examples for the requested style username.
|
|
164
|
+
style_tweets: nil
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
sig do
|
|
169
|
+
override.returns(
|
|
170
|
+
{
|
|
171
|
+
content_rules:
|
|
172
|
+
T::Array[
|
|
173
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ContentRule
|
|
174
|
+
],
|
|
175
|
+
engagement_multipliers:
|
|
176
|
+
T::Array[
|
|
177
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::EngagementMultiplier
|
|
178
|
+
],
|
|
179
|
+
engagement_velocity: String,
|
|
180
|
+
follow_up_questions: T::Array[String],
|
|
181
|
+
intent_url: String,
|
|
182
|
+
next_step: String,
|
|
183
|
+
scorer_weights:
|
|
184
|
+
T::Array[
|
|
185
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight
|
|
186
|
+
],
|
|
187
|
+
source: String,
|
|
188
|
+
top_penalties: T::Array[String],
|
|
189
|
+
saved_styles:
|
|
190
|
+
T::Array[
|
|
191
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::SavedStyle
|
|
192
|
+
],
|
|
193
|
+
style_note: String,
|
|
194
|
+
style_tweets: T::Array[String]
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
def to_hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
class ContentRule < XTwitterScraper::Internal::Type::BaseModel
|
|
202
|
+
OrHash =
|
|
203
|
+
T.type_alias do
|
|
204
|
+
T.any(
|
|
205
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ContentRule,
|
|
206
|
+
XTwitterScraper::Internal::AnyHash
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
sig { returns(String) }
|
|
211
|
+
attr_accessor :rule
|
|
212
|
+
|
|
213
|
+
sig { params(rule: String).returns(T.attached_class) }
|
|
214
|
+
def self.new(rule:)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
sig { override.returns({ rule: String }) }
|
|
218
|
+
def to_hash
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
class EngagementMultiplier < XTwitterScraper::Internal::Type::BaseModel
|
|
223
|
+
OrHash =
|
|
224
|
+
T.type_alias do
|
|
225
|
+
T.any(
|
|
226
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::EngagementMultiplier,
|
|
227
|
+
XTwitterScraper::Internal::AnyHash
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Human-readable published signal name.
|
|
232
|
+
sig { returns(String) }
|
|
233
|
+
attr_accessor :action
|
|
234
|
+
|
|
235
|
+
sig { returns(Symbol) }
|
|
236
|
+
attr_accessor :multiplier
|
|
237
|
+
|
|
238
|
+
sig do
|
|
239
|
+
params(action: String, multiplier: Symbol).returns(T.attached_class)
|
|
240
|
+
end
|
|
241
|
+
def self.new(
|
|
242
|
+
# Human-readable published signal name.
|
|
243
|
+
action:,
|
|
244
|
+
multiplier: :"Production weight not published by X"
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
sig { override.returns({ action: String, multiplier: Symbol }) }
|
|
249
|
+
def to_hash
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
class ScorerWeight < XTwitterScraper::Internal::Type::BaseModel
|
|
254
|
+
OrHash =
|
|
255
|
+
T.type_alias do
|
|
256
|
+
T.any(
|
|
257
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::ScorerWeight,
|
|
258
|
+
XTwitterScraper::Internal::AnyHash
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Signal direction and publication limit.
|
|
263
|
+
sig { returns(String) }
|
|
264
|
+
attr_accessor :context
|
|
265
|
+
|
|
266
|
+
# Signal name from X's public ranking repository.
|
|
267
|
+
sig { returns(String) }
|
|
268
|
+
attr_accessor :signal
|
|
269
|
+
|
|
270
|
+
# X does not publish the production weight.
|
|
271
|
+
sig { returns(NilClass) }
|
|
272
|
+
attr_accessor :weight
|
|
273
|
+
|
|
274
|
+
sig do
|
|
275
|
+
params(context: String, signal: String, weight: NilClass).returns(
|
|
276
|
+
T.attached_class
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
def self.new(
|
|
280
|
+
# Signal direction and publication limit.
|
|
281
|
+
context:,
|
|
282
|
+
# Signal name from X's public ranking repository.
|
|
283
|
+
signal:,
|
|
284
|
+
# X does not publish the production weight.
|
|
285
|
+
weight:
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
sig do
|
|
290
|
+
override.returns(
|
|
291
|
+
{ context: String, signal: String, weight: NilClass }
|
|
292
|
+
)
|
|
293
|
+
end
|
|
294
|
+
def to_hash
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
class SavedStyle < XTwitterScraper::Internal::Type::BaseModel
|
|
299
|
+
OrHash =
|
|
300
|
+
T.type_alias do
|
|
301
|
+
T.any(
|
|
302
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposePrepareResult::SavedStyle,
|
|
303
|
+
XTwitterScraper::Internal::AnyHash
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
sig { returns(Integer) }
|
|
308
|
+
attr_accessor :tweet_count
|
|
309
|
+
|
|
310
|
+
sig { returns(String) }
|
|
311
|
+
attr_accessor :username
|
|
312
|
+
|
|
313
|
+
sig do
|
|
314
|
+
params(tweet_count: Integer, username: String).returns(
|
|
315
|
+
T.attached_class
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
def self.new(tweet_count:, username:)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
sig { override.returns({ tweet_count: Integer, username: String }) }
|
|
322
|
+
def to_hash
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
class ComposeRefineResult < XTwitterScraper::Internal::Type::BaseModel
|
|
328
|
+
OrHash =
|
|
329
|
+
T.type_alias do
|
|
330
|
+
T.any(
|
|
331
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult,
|
|
332
|
+
XTwitterScraper::Internal::AnyHash
|
|
333
|
+
)
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Goal, tone, media, and editorial guidance.
|
|
337
|
+
sig { returns(T::Array[String]) }
|
|
338
|
+
attr_accessor :composition_guidance
|
|
339
|
+
|
|
340
|
+
sig do
|
|
341
|
+
returns(
|
|
342
|
+
T::Array[
|
|
343
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult::ExamplePattern
|
|
344
|
+
]
|
|
345
|
+
)
|
|
346
|
+
end
|
|
347
|
+
attr_accessor :example_patterns
|
|
348
|
+
|
|
349
|
+
# X post intent seeded with the topic.
|
|
350
|
+
sig { returns(String) }
|
|
351
|
+
attr_accessor :intent_url
|
|
352
|
+
|
|
353
|
+
sig { returns(String) }
|
|
354
|
+
attr_accessor :next_step
|
|
355
|
+
|
|
356
|
+
sig do
|
|
357
|
+
params(
|
|
358
|
+
composition_guidance: T::Array[String],
|
|
359
|
+
example_patterns:
|
|
360
|
+
T::Array[
|
|
361
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult::ExamplePattern::OrHash
|
|
362
|
+
],
|
|
363
|
+
intent_url: String,
|
|
364
|
+
next_step: String
|
|
365
|
+
).returns(T.attached_class)
|
|
366
|
+
end
|
|
367
|
+
def self.new(
|
|
368
|
+
# Goal, tone, media, and editorial guidance.
|
|
369
|
+
composition_guidance:,
|
|
370
|
+
example_patterns:,
|
|
371
|
+
# X post intent seeded with the topic.
|
|
372
|
+
intent_url:,
|
|
373
|
+
next_step:
|
|
374
|
+
)
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
sig do
|
|
378
|
+
override.returns(
|
|
379
|
+
{
|
|
380
|
+
composition_guidance: T::Array[String],
|
|
381
|
+
example_patterns:
|
|
382
|
+
T::Array[
|
|
383
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult::ExamplePattern
|
|
384
|
+
],
|
|
385
|
+
intent_url: String,
|
|
386
|
+
next_step: String
|
|
387
|
+
}
|
|
388
|
+
)
|
|
389
|
+
end
|
|
390
|
+
def to_hash
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
class ExamplePattern < XTwitterScraper::Internal::Type::BaseModel
|
|
394
|
+
OrHash =
|
|
395
|
+
T.type_alias do
|
|
396
|
+
T.any(
|
|
397
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeRefineResult::ExamplePattern,
|
|
398
|
+
XTwitterScraper::Internal::AnyHash
|
|
399
|
+
)
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
sig { returns(String) }
|
|
403
|
+
attr_accessor :description
|
|
404
|
+
|
|
405
|
+
sig { returns(String) }
|
|
406
|
+
attr_accessor :pattern
|
|
407
|
+
|
|
408
|
+
sig do
|
|
409
|
+
params(description: String, pattern: String).returns(
|
|
410
|
+
T.attached_class
|
|
411
|
+
)
|
|
412
|
+
end
|
|
413
|
+
def self.new(description:, pattern:)
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
sig { override.returns({ description: String, pattern: String }) }
|
|
417
|
+
def to_hash
|
|
418
|
+
end
|
|
419
|
+
end
|
|
49
420
|
end
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
421
|
+
|
|
422
|
+
class ComposeScoreResult < XTwitterScraper::Internal::Type::BaseModel
|
|
423
|
+
OrHash =
|
|
424
|
+
T.type_alias do
|
|
425
|
+
T.any(
|
|
426
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult,
|
|
427
|
+
XTwitterScraper::Internal::AnyHash
|
|
428
|
+
)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# Deterministic editorial checks. Not a reach prediction.
|
|
432
|
+
sig do
|
|
433
|
+
returns(
|
|
434
|
+
T::Array[
|
|
435
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult::Checklist
|
|
436
|
+
]
|
|
437
|
+
)
|
|
438
|
+
end
|
|
439
|
+
attr_accessor :checklist
|
|
440
|
+
|
|
441
|
+
sig { returns(String) }
|
|
442
|
+
attr_accessor :next_step
|
|
443
|
+
|
|
444
|
+
sig { returns(T::Boolean) }
|
|
445
|
+
attr_accessor :passed
|
|
446
|
+
|
|
447
|
+
sig { returns(Integer) }
|
|
448
|
+
attr_accessor :passed_count
|
|
449
|
+
|
|
450
|
+
sig { returns(String) }
|
|
451
|
+
attr_accessor :top_suggestion
|
|
452
|
+
|
|
453
|
+
sig { returns(Integer) }
|
|
454
|
+
attr_accessor :total_checks
|
|
455
|
+
|
|
456
|
+
# Present only when every check passes.
|
|
457
|
+
sig { returns(T.nilable(String)) }
|
|
458
|
+
attr_reader :intent_url
|
|
459
|
+
|
|
460
|
+
sig { params(intent_url: String).void }
|
|
461
|
+
attr_writer :intent_url
|
|
462
|
+
|
|
463
|
+
sig do
|
|
464
|
+
params(
|
|
465
|
+
checklist:
|
|
466
|
+
T::Array[
|
|
467
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult::Checklist::OrHash
|
|
468
|
+
],
|
|
469
|
+
next_step: String,
|
|
470
|
+
passed: T::Boolean,
|
|
471
|
+
passed_count: Integer,
|
|
472
|
+
top_suggestion: String,
|
|
473
|
+
intent_url: String,
|
|
474
|
+
total_checks: Integer
|
|
475
|
+
).returns(T.attached_class)
|
|
476
|
+
end
|
|
477
|
+
def self.new(
|
|
478
|
+
# Deterministic editorial checks. Not a reach prediction.
|
|
479
|
+
checklist:,
|
|
480
|
+
next_step:,
|
|
481
|
+
passed:,
|
|
482
|
+
passed_count:,
|
|
483
|
+
top_suggestion:,
|
|
484
|
+
# Present only when every check passes.
|
|
485
|
+
intent_url: nil,
|
|
486
|
+
total_checks: 9
|
|
487
|
+
)
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
sig do
|
|
491
|
+
override.returns(
|
|
492
|
+
{
|
|
493
|
+
checklist:
|
|
494
|
+
T::Array[
|
|
495
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult::Checklist
|
|
496
|
+
],
|
|
497
|
+
next_step: String,
|
|
498
|
+
passed: T::Boolean,
|
|
499
|
+
passed_count: Integer,
|
|
500
|
+
top_suggestion: String,
|
|
501
|
+
total_checks: Integer,
|
|
502
|
+
intent_url: String
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
end
|
|
506
|
+
def to_hash
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
class Checklist < XTwitterScraper::Internal::Type::BaseModel
|
|
510
|
+
OrHash =
|
|
511
|
+
T.type_alias do
|
|
512
|
+
T.any(
|
|
513
|
+
XTwitterScraper::Models::ComposeCreateResponse::ComposeScoreResult::Checklist,
|
|
514
|
+
XTwitterScraper::Internal::AnyHash
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
sig { returns(String) }
|
|
519
|
+
attr_accessor :factor
|
|
520
|
+
|
|
521
|
+
sig { returns(T::Boolean) }
|
|
522
|
+
attr_accessor :passed
|
|
523
|
+
|
|
524
|
+
# Present only when the check fails.
|
|
525
|
+
sig { returns(T.nilable(String)) }
|
|
526
|
+
attr_reader :suggestion
|
|
527
|
+
|
|
528
|
+
sig { params(suggestion: String).void }
|
|
529
|
+
attr_writer :suggestion
|
|
530
|
+
|
|
531
|
+
sig do
|
|
532
|
+
params(
|
|
533
|
+
factor: String,
|
|
534
|
+
passed: T::Boolean,
|
|
535
|
+
suggestion: String
|
|
536
|
+
).returns(T.attached_class)
|
|
537
|
+
end
|
|
538
|
+
def self.new(
|
|
539
|
+
factor:,
|
|
540
|
+
passed:,
|
|
541
|
+
# Present only when the check fails.
|
|
542
|
+
suggestion: nil
|
|
543
|
+
)
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
sig do
|
|
547
|
+
override.returns(
|
|
548
|
+
{ factor: String, passed: T::Boolean, suggestion: String }
|
|
549
|
+
)
|
|
550
|
+
end
|
|
551
|
+
def to_hash
|
|
552
|
+
end
|
|
553
|
+
end
|
|
60
554
|
end
|
|
61
555
|
|
|
62
556
|
sig do
|
|
63
557
|
override.returns(
|
|
64
|
-
|
|
65
|
-
feedback: String,
|
|
66
|
-
score: Float,
|
|
67
|
-
suggestions: T::Array[String],
|
|
68
|
-
text: String
|
|
69
|
-
}
|
|
558
|
+
T::Array[XTwitterScraper::Models::ComposeCreateResponse::Variants]
|
|
70
559
|
)
|
|
71
560
|
end
|
|
72
|
-
def
|
|
561
|
+
def self.variants
|
|
73
562
|
end
|
|
74
563
|
end
|
|
75
564
|
end
|
|
@@ -14,7 +14,7 @@ module XTwitterScraper
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# Top-up session ID to inspect.
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :session_id
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ module XTwitterScraper
|
|
|
25
25
|
).returns(T.attached_class)
|
|
26
26
|
end
|
|
27
27
|
def self.new(
|
|
28
|
-
#
|
|
28
|
+
# Top-up session ID to inspect.
|
|
29
29
|
session_id:,
|
|
30
30
|
request_options: {}
|
|
31
31
|
)
|