consts.nim 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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* = "4hhGRbehkcUVTKf8n0f0xw/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. "ranking_mode": "$3",
  87. "includeHasBirdwatchNotes": false,
  88. "includePromotedContent": false,
  89. "withBirdwatchNotes": true,
  90. "withVoice": false,
  91. "withV2Timeline": true
  92. }""".replace(" ", "").replace("\n", "")
  93. tweetDetailVars* = """{
  94. "focalTweetId": "$1",
  95. $2
  96. "referrer": "profile",
  97. "with_rux_injections": false,
  98. "rankingMode": "Relevance",
  99. "includePromotedContent": true,
  100. "withCommunity": true,
  101. "withQuickPromoteEligibilityTweetFields": true,
  102. "withBirdwatchNotes": true,
  103. "withVoice": true
  104. }""".replace(" ", "").replace("\n", "")
  105. tweetEditHistoryVars* = """{
  106. "tweetId": "$1",
  107. "withQuickPromoteEligibilityTweetFields": true
  108. }""".replace(" ", "").replace("\n", "")
  109. restIdVars* = """{
  110. "rest_id": "$1", $2
  111. "count": $3
  112. }""".replace(" ", "").replace("\n", "")
  113. userMediaVars* = """{
  114. "userId": "$1", $2
  115. "count": $3,
  116. "includePromotedContent": false,
  117. "withClientEventToken": false,
  118. "withBirdwatchNotes": false,
  119. "withVoice": true
  120. }""".replace(" ", "").replace("\n", "")
  121. userTweetsVars* = """{
  122. "userId": "$1", $2
  123. "count": 20,
  124. "includePromotedContent": false,
  125. "withQuickPromoteEligibilityTweetFields": true,
  126. "withVoice": true
  127. }""".replace(" ", "").replace("\n", "")
  128. userTweetsAndRepliesVars* = """{
  129. "userId": "$1", $2
  130. "count": 20,
  131. "includePromotedContent": false,
  132. "withCommunity": true,
  133. "withVoice": true
  134. }""".replace(" ", "").replace("\n", "")
  135. articleVars* = """{
  136. "tweetId": "$1",
  137. "includePromotedContent": false,
  138. "withBirdwatchNotes": true,
  139. "withVoice": true,
  140. "withCommunity": true
  141. }""".replace(" ", "").replace("\n", "")
  142. articleBatchVars* = """{
  143. "tweetIds": $1,
  144. "includePromotedContent": false,
  145. "withBirdwatchNotes": true,
  146. "withVoice": true,
  147. "withCommunity": true
  148. }""".replace(" ", "").replace("\n", "")
  149. articleFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withArticleSummaryText":true,"withArticleVoiceOver":true}"""
  150. tweetByRestIdVars* = """{
  151. "tweetId": "$1",
  152. "includePromotedContent": false,
  153. "withBirdwatchNotes": false,
  154. "withVoice": false,
  155. "withCommunity": false
  156. }""".replace(" ", "").replace("\n", "")
  157. communityTweetsVars* = """{
  158. "communityId": "$1", $2
  159. "count": 20,
  160. "displayLocation": "Community",
  161. "rankingMode": "$3",
  162. "withCommunity": true
  163. }""".replace(" ", "").replace("\n", "")
  164. communityMediaVars* = """{
  165. "communityId": "$1", $2
  166. "count": 20,
  167. "withCommunity": true
  168. }""".replace(" ", "").replace("\n", "")
  169. communityMembersVars* = """{
  170. "communityId": "$1",
  171. "cursor": $2
  172. }""".replace(" ", "").replace("\n", "")
  173. communityHashtagsVars* = """{
  174. "communityId": "$1", $2
  175. "count": 20,
  176. "hashtags": ["$3"],
  177. "withCommunity": true
  178. }""".replace(" ", "").replace("\n", "")
  179. userFieldToggles = """{"withPayments":false,"withAuxiliaryUserLabels":true}"""
  180. userTweetsFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false}"""
  181. tweetDetailFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withGrokAnalyze":false,"withDisallowedReplyControls":false}"""