consts.nim 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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. gqlFeatures* = """{
  39. "rweb_video_screen_enabled": false,
  40. "rweb_cashtags_enabled": true,
  41. "profile_label_improvements_pcf_label_in_post_enabled": true,
  42. "responsive_web_profile_redirect_enabled": false,
  43. "rweb_tipjar_consumption_enabled": false,
  44. "verified_phone_label_enabled": false,
  45. "creator_subscriptions_tweet_preview_api_enabled": true,
  46. "responsive_web_graphql_timeline_navigation_enabled": true,
  47. "responsive_web_graphql_skip_user_profile_image_extensions_enabled": false,
  48. "premium_content_api_read_enabled": false,
  49. "communities_web_enable_tweet_community_results_fetch": true,
  50. "c9s_tweet_anatomy_moderator_badge_enabled": true,
  51. "c9s_list_members_action_api_enabled": false,
  52. "c9s_superc9s_indication_enabled": false,
  53. "responsive_web_grok_analyze_button_fetch_trends_enabled": false,
  54. "responsive_web_grok_analyze_post_followups_enabled": true,
  55. "rweb_cashtags_composer_attachment_enabled": true,
  56. "responsive_web_jetfuel_frame": true,
  57. "responsive_web_grok_share_attachment_enabled": true,
  58. "responsive_web_grok_annotations_enabled": true,
  59. "articles_preview_enabled": true,
  60. "responsive_web_edit_tweet_api_enabled": true,
  61. "rweb_conversational_replies_downvote_enabled": false,
  62. "graphql_is_translatable_rweb_tweet_is_translatable_enabled": true,
  63. "view_counts_everywhere_api_enabled": true,
  64. "longform_notetweets_consumption_enabled": true,
  65. "responsive_web_twitter_article_tweet_consumption_enabled": true,
  66. "content_disclosure_indicator_enabled": true,
  67. "content_disclosure_ai_generated_indicator_enabled": true,
  68. "responsive_web_grok_show_grok_translated_post": true,
  69. "responsive_web_grok_analysis_button_from_backend": true,
  70. "post_ctas_fetch_enabled": true,
  71. "freedom_of_speech_not_reach_fetch_enabled": true,
  72. "standardized_nudges_misinfo": true,
  73. "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": true,
  74. "longform_notetweets_rich_text_read_enabled": true,
  75. "longform_notetweets_inline_media_enabled": false,
  76. "responsive_web_grok_image_annotation_enabled": true,
  77. "responsive_web_grok_imagine_annotation_enabled": true,
  78. "responsive_web_grok_community_note_auto_translation_is_enabled": true,
  79. "responsive_web_enhance_cards_enabled": false
  80. }""".replace(" ", "").replace("\n", "")
  81. tweetVars* = """{
  82. "postId": "$1",
  83. $2
  84. "includeHasBirdwatchNotes": false,
  85. "includePromotedContent": false,
  86. "withBirdwatchNotes": true,
  87. "withVoice": false,
  88. "withV2Timeline": true
  89. }""".replace(" ", "").replace("\n", "")
  90. tweetDetailVars* = """{
  91. "focalTweetId": "$1",
  92. $2
  93. "referrer": "profile",
  94. "with_rux_injections": false,
  95. "rankingMode": "Relevance",
  96. "includePromotedContent": true,
  97. "withCommunity": true,
  98. "withQuickPromoteEligibilityTweetFields": true,
  99. "withBirdwatchNotes": true,
  100. "withVoice": true
  101. }""".replace(" ", "").replace("\n", "")
  102. tweetEditHistoryVars* = """{
  103. "tweetId": "$1",
  104. "withQuickPromoteEligibilityTweetFields": true
  105. }""".replace(" ", "").replace("\n", "")
  106. restIdVars* = """{
  107. "rest_id": "$1", $2
  108. "count": $3
  109. }""".replace(" ", "").replace("\n", "")
  110. userMediaVars* = """{
  111. "userId": "$1", $2
  112. "count": $3,
  113. "includePromotedContent": false,
  114. "withClientEventToken": false,
  115. "withBirdwatchNotes": false,
  116. "withVoice": true
  117. }""".replace(" ", "").replace("\n", "")
  118. userTweetsVars* = """{
  119. "userId": "$1", $2
  120. "count": 20,
  121. "includePromotedContent": false,
  122. "withQuickPromoteEligibilityTweetFields": true,
  123. "withVoice": true
  124. }""".replace(" ", "").replace("\n", "")
  125. userTweetsAndRepliesVars* = """{
  126. "userId": "$1", $2
  127. "count": 20,
  128. "includePromotedContent": false,
  129. "withCommunity": true,
  130. "withVoice": true
  131. }""".replace(" ", "").replace("\n", "")
  132. articleVars* = """{
  133. "tweetId": "$1",
  134. "includePromotedContent": false,
  135. "withBirdwatchNotes": true,
  136. "withVoice": true,
  137. "withCommunity": true
  138. }""".replace(" ", "").replace("\n", "")
  139. articleBatchVars* = """{
  140. "tweetIds": $1,
  141. "includePromotedContent": false,
  142. "withBirdwatchNotes": true,
  143. "withVoice": true,
  144. "withCommunity": true
  145. }""".replace(" ", "").replace("\n", "")
  146. articleFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withArticleSummaryText":true,"withArticleVoiceOver":true}"""
  147. communityTweetsVars* = """{
  148. "communityId": "$1", $2
  149. "count": 20,
  150. "displayLocation": "Community",
  151. "rankingMode": "$3",
  152. "withCommunity": true
  153. }""".replace(" ", "").replace("\n", "")
  154. communityMediaVars* = """{
  155. "communityId": "$1", $2
  156. "count": 20,
  157. "withCommunity": true
  158. }""".replace(" ", "").replace("\n", "")
  159. communityMembersVars* = """{
  160. "communityId": "$1",
  161. "cursor": $2
  162. }""".replace(" ", "").replace("\n", "")
  163. communityHashtagsVars* = """{
  164. "communityId": "$1", $2
  165. "count": 20,
  166. "hashtags": ["$3"],
  167. "withCommunity": true
  168. }""".replace(" ", "").replace("\n", "")
  169. userFieldToggles = """{"withPayments":false,"withAuxiliaryUserLabels":true}"""
  170. userTweetsFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false}"""
  171. tweetDetailFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withGrokAnalyze":false,"withDisallowedReplyControls":false}"""