consts.nim 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # SPDX-License-Identifier: AGPL-3.0-only
  2. import strutils
  3. const
  4. consumerKey* = "3nVuSoBZnx6U4vzUxf5w"
  5. consumerSecret* = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys"
  6. bearerToken* = "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
  7. bearerToken2* = "Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F"
  8. graphUser* = "IGgvgiOx4QZndDHuD3x9TQ/UserByScreenName"
  9. graphUserV2* = "-ZzAG_Bckx16LMbEvHC3lg/UserResultByScreenNameQuery"
  10. graphUserById* = "-DAaa9jPxPswYeI2fZ9rug/UserResultByIdQuery"
  11. graphUserTweetsV2* = "LE3eTyeqhBh2g-fX85O2eQ/UserWithProfileTweetsQueryV2"
  12. graphUserTweetsAndRepliesV2* = "AcYHjc_YAx-9_rKWdMsKvA/UserWithProfileTweetsAndRepliesQueryV2"
  13. graphUserTweets* = "PNd0vlufvrcIwrAnBYKE9g/UserTweets"
  14. graphUserTweetsAndReplies* = "EqtpEwt0CoQXmDfq5DKH0A/UserTweetsAndReplies"
  15. graphUserMedia* = "g_rGPF0fLON-M9cyVjXuzA/UserMedia"
  16. graphUserMediaV2* = "WK111rbR0vM0ZX4lyZCYjw/MediaTimelineV2"
  17. graphTweet* = "OZMbEnEa96AN8Pq6HyTWdw/ConversationTimeline"
  18. graphTweetDetail* = "6uCvnic3m5reVuehkvHa3w/TweetDetail"
  19. graphTweetResult* = "xYOrBQoTlfKJJPsX76MZEw/TweetResultByIdQuery"
  20. graphTweetEditHistory* = "MGElmrYILE8wUfI8GorUYA/TweetEditHistory"
  21. graphSearchTimeline* = "-TFXKoMnMTKdEXcCn-eahw/SearchTimeline"
  22. graphListById* = "t9AbdyHaJVfjL9jsODwgpQ/ListByRestId"
  23. graphListBySlug* = "LDQpQ89B5ipR8izCKrWU0g/ListBySlug"
  24. graphListMembers* = "EM7YRaM3gCnzDESmchA7RA/ListMembers"
  25. graphListTweets* = "0QJtcuMzVywHGAWD6Dtjlw/ListTimeline"
  26. graphAboutAccount* = "zUnx-DLN9dkwOkNhTLySjg/AboutAccountQuery"
  27. graphCommunity* = "-ElI1vg3dYbttVMhBhGdLw/CommunityQuery"
  28. graphCommunityTweets* = "Mvs5UOOEkpXVMDZtUcxR-Q/CommunityTweetsTimeline"
  29. graphCommunityMedia* = "Bt9XYnY7D3OcmZE5lhdx-A/CommunityMediaTimeline"
  30. graphCommunityMembers* = "WSbJGJjZaVasSj9bnqSZSA/membersSliceTimeline_Query"
  31. graphCommunityModerators* = "GBMT3GOWy5dYsYC4XJfvow/moderatorsSliceTimeline_Query"
  32. graphCommunityHashtags* = "40DyrMxfCknGuZwE-keW_Q/CommunityHashtagsTimeline"
  33. graphTweetResultByRestId* = "qtXMy1p5Y62uCskc_NUPJw/TweetResultByRestId"
  34. graphTweetResultsByRestIds* = "Sc9EUQTZNEH-wzegn-nHvQ/TweetResultsByRestIds"
  35. graphBroadcast* = "FJLCzpXCLPM1jUZqmM7oEA/BroadcastQuery"
  36. graphAudioSpace* = "rWRLsOhNJ2xjpI1tREYurQ/AudioSpaceById"
  37. restLiveStream* = "1.1/live_video_stream/status/"
  38. graphFollowers* = "9jsVJ9l2uXUIKslHvJqIhw/Followers"
  39. graphFollowing* = "OLm4oHZBfqWx8jbcEhWoFw/Following"
  40. gqlFeatures* = """{
  41. "rweb_video_screen_enabled": false,
  42. "rweb_cashtags_enabled": true,
  43. "profile_label_improvements_pcf_label_in_post_enabled": true,
  44. "responsive_web_profile_redirect_enabled": false,
  45. "rweb_tipjar_consumption_enabled": false,
  46. "verified_phone_label_enabled": false,
  47. "creator_subscriptions_tweet_preview_api_enabled": true,
  48. "responsive_web_graphql_timeline_navigation_enabled": true,
  49. "responsive_web_graphql_skip_user_profile_image_extensions_enabled": false,
  50. "premium_content_api_read_enabled": false,
  51. "communities_web_enable_tweet_community_results_fetch": true,
  52. "c9s_tweet_anatomy_moderator_badge_enabled": true,
  53. "c9s_list_members_action_api_enabled": false,
  54. "c9s_superc9s_indication_enabled": false,
  55. "responsive_web_grok_analyze_button_fetch_trends_enabled": false,
  56. "responsive_web_grok_analyze_post_followups_enabled": true,
  57. "rweb_cashtags_composer_attachment_enabled": true,
  58. "responsive_web_jetfuel_frame": true,
  59. "responsive_web_grok_share_attachment_enabled": true,
  60. "responsive_web_grok_annotations_enabled": true,
  61. "articles_preview_enabled": true,
  62. "responsive_web_edit_tweet_api_enabled": true,
  63. "rweb_conversational_replies_downvote_enabled": false,
  64. "graphql_is_translatable_rweb_tweet_is_translatable_enabled": true,
  65. "view_counts_everywhere_api_enabled": true,
  66. "longform_notetweets_consumption_enabled": true,
  67. "responsive_web_twitter_article_tweet_consumption_enabled": true,
  68. "content_disclosure_indicator_enabled": true,
  69. "content_disclosure_ai_generated_indicator_enabled": true,
  70. "responsive_web_grok_show_grok_translated_post": true,
  71. "responsive_web_grok_analysis_button_from_backend": true,
  72. "post_ctas_fetch_enabled": true,
  73. "freedom_of_speech_not_reach_fetch_enabled": true,
  74. "standardized_nudges_misinfo": true,
  75. "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": true,
  76. "longform_notetweets_rich_text_read_enabled": true,
  77. "longform_notetweets_inline_media_enabled": false,
  78. "responsive_web_grok_image_annotation_enabled": true,
  79. "responsive_web_grok_imagine_annotation_enabled": true,
  80. "responsive_web_grok_community_note_auto_translation_is_enabled": true,
  81. "responsive_web_enhance_cards_enabled": false
  82. }""".replace(" ", "").replace("\n", "")
  83. tweetVars* = """{
  84. "postId": "$1",
  85. $2
  86. "includeHasBirdwatchNotes": false,
  87. "includePromotedContent": false,
  88. "withBirdwatchNotes": true,
  89. "withVoice": false,
  90. "withV2Timeline": true
  91. }""".replace(" ", "").replace("\n", "")
  92. tweetDetailVars* = """{
  93. "focalTweetId": "$1",
  94. $2
  95. "referrer": "profile",
  96. "with_rux_injections": false,
  97. "rankingMode": "Relevance",
  98. "includePromotedContent": true,
  99. "withCommunity": true,
  100. "withQuickPromoteEligibilityTweetFields": true,
  101. "withBirdwatchNotes": true,
  102. "withVoice": true
  103. }""".replace(" ", "").replace("\n", "")
  104. tweetEditHistoryVars* = """{
  105. "tweetId": "$1",
  106. "withQuickPromoteEligibilityTweetFields": true
  107. }""".replace(" ", "").replace("\n", "")
  108. restIdVars* = """{
  109. "rest_id": "$1", $2
  110. "count": $3
  111. }""".replace(" ", "").replace("\n", "")
  112. userMediaVars* = """{
  113. "userId": "$1", $2
  114. "count": $3,
  115. "includePromotedContent": false,
  116. "withClientEventToken": false,
  117. "withBirdwatchNotes": false,
  118. "withVoice": true
  119. }""".replace(" ", "").replace("\n", "")
  120. userTweetsVars* = """{
  121. "userId": "$1", $2
  122. "count": 20,
  123. "includePromotedContent": false,
  124. "withQuickPromoteEligibilityTweetFields": true,
  125. "withVoice": true
  126. }""".replace(" ", "").replace("\n", "")
  127. userTweetsAndRepliesVars* = """{
  128. "userId": "$1", $2
  129. "count": 20,
  130. "includePromotedContent": false,
  131. "withCommunity": true,
  132. "withVoice": true
  133. }""".replace(" ", "").replace("\n", "")
  134. articleVars* = """{
  135. "tweetId": "$1",
  136. "includePromotedContent": false,
  137. "withBirdwatchNotes": true,
  138. "withVoice": true,
  139. "withCommunity": true
  140. }""".replace(" ", "").replace("\n", "")
  141. articleBatchVars* = """{
  142. "tweetIds": $1,
  143. "includePromotedContent": false,
  144. "withBirdwatchNotes": true,
  145. "withVoice": true,
  146. "withCommunity": true
  147. }""".replace(" ", "").replace("\n", "")
  148. articleFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withArticleSummaryText":true,"withArticleVoiceOver":true}"""
  149. communityTweetsVars* = """{
  150. "communityId": "$1", $2
  151. "count": 20,
  152. "displayLocation": "Community",
  153. "rankingMode": "$3",
  154. "withCommunity": true
  155. }""".replace(" ", "").replace("\n", "")
  156. communityMediaVars* = """{
  157. "communityId": "$1", $2
  158. "count": 20,
  159. "withCommunity": true
  160. }""".replace(" ", "").replace("\n", "")
  161. communityMembersVars* = """{
  162. "communityId": "$1",
  163. "cursor": $2
  164. }""".replace(" ", "").replace("\n", "")
  165. communityHashtagsVars* = """{
  166. "communityId": "$1", $2
  167. "count": 20,
  168. "hashtags": ["$3"],
  169. "withCommunity": true
  170. }""".replace(" ", "").replace("\n", "")
  171. userFieldToggles = """{"withPayments":false,"withAuxiliaryUserLabels":true}"""
  172. userTweetsFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false}"""
  173. tweetDetailFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withGrokAnalyze":false,"withDisallowedReplyControls":false}"""