consts.nim 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. # SPDX-License-Identifier: AGPL-3.0-only
  2. import uri, strutils
  3. const
  4. consumerKey* = "3nVuSoBZnx6U4vzUxf5w"
  5. consumerSecret* = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys"
  6. gql = parseUri("https://api.x.com") / "graphql"
  7. graphUser* = gql / "WEoGnYB0EG1yGwamDCF6zg/UserResultByScreenNameQuery"
  8. graphUserById* = gql / "VN33vKXrPT7p35DgNR27aw/UserResultByIdQuery"
  9. graphUserTweetsV2* = gql / "6QdSuZ5feXxOadEdXa4XZg/UserWithProfileTweetsQueryV2"
  10. graphUserTweetsAndRepliesV2* = gql / "BDX77Xzqypdt11-mDfgdpQ/UserWithProfileTweetsAndRepliesQueryV2"
  11. graphUserTweets* = gql / "oRJs8SLCRNRbQzuZG93_oA/UserTweets"
  12. graphUserTweetsAndReplies* = gql / "kkaJ0Mf34PZVarrxzLihjg/UserTweetsAndReplies"
  13. graphUserMedia* = gql / "36oKqyQ7E_9CmtONGjJRsA/UserMedia"
  14. graphUserMediaV2* = gql / "bp0e_WdXqgNBIwlLukzyYA/MediaTimelineV2"
  15. graphTweet* = gql / "Y4Erk_-0hObvLpz0Iw3bzA/ConversationTimeline"
  16. graphTweetDetail* = gql / "YVyS4SfwYW7Uw5qwy0mQCA/TweetDetail"
  17. graphTweetResult* = gql / "nzme9KiYhfIOrrLrPP_XeQ/TweetResultByIdQuery"
  18. graphSearchTimeline* = gql / "bshMIjqDk8LTXTq4w91WKw/SearchTimeline"
  19. graphListById* = gql / "cIUpT1UjuGgl_oWiY7Snhg/ListByRestId"
  20. graphListBySlug* = gql / "K6wihoTiTrzNzSF8y1aeKQ/ListBySlug"
  21. graphListMembers* = gql / "fuVHh5-gFn8zDBBxb8wOMA/ListMembers"
  22. graphListTweets* = gql / "VQf8_XQynI3WzH6xopOMMQ/ListTimeline"
  23. gqlFeatures* = """{
  24. "android_ad_formats_media_component_render_overlay_enabled": false,
  25. "android_graphql_skip_api_media_color_palette": false,
  26. "android_professional_link_spotlight_display_enabled": false,
  27. "blue_business_profile_image_shape_enabled": false,
  28. "commerce_android_shop_module_enabled": false,
  29. "creator_subscriptions_subscription_count_enabled": false,
  30. "creator_subscriptions_tweet_preview_api_enabled": true,
  31. "freedom_of_speech_not_reach_fetch_enabled": true,
  32. "graphql_is_translatable_rweb_tweet_is_translatable_enabled": true,
  33. "hidden_profile_likes_enabled": false,
  34. "highlights_tweets_tab_ui_enabled": false,
  35. "interactive_text_enabled": false,
  36. "longform_notetweets_consumption_enabled": true,
  37. "longform_notetweets_inline_media_enabled": true,
  38. "longform_notetweets_rich_text_read_enabled": true,
  39. "longform_notetweets_richtext_consumption_enabled": true,
  40. "mobile_app_spotlight_module_enabled": false,
  41. "responsive_web_edit_tweet_api_enabled": true,
  42. "responsive_web_enhance_cards_enabled": false,
  43. "responsive_web_graphql_exclude_directive_enabled": true,
  44. "responsive_web_graphql_skip_user_profile_image_extensions_enabled": false,
  45. "responsive_web_graphql_timeline_navigation_enabled": true,
  46. "responsive_web_media_download_video_enabled": false,
  47. "responsive_web_text_conversations_enabled": false,
  48. "responsive_web_twitter_article_tweet_consumption_enabled": true,
  49. "unified_cards_destination_url_params_enabled": false,
  50. "responsive_web_twitter_blue_verified_badge_is_enabled": true,
  51. "rweb_lists_timeline_redesign_enabled": true,
  52. "spaces_2022_h2_clipping": true,
  53. "spaces_2022_h2_spaces_communities": true,
  54. "standardized_nudges_misinfo": true,
  55. "subscriptions_verification_info_enabled": true,
  56. "subscriptions_verification_info_reason_enabled": true,
  57. "subscriptions_verification_info_verified_since_enabled": true,
  58. "super_follow_badge_privacy_enabled": false,
  59. "super_follow_exclusive_tweet_notifications_enabled": false,
  60. "super_follow_tweet_api_enabled": false,
  61. "super_follow_user_api_enabled": false,
  62. "tweet_awards_web_tipping_enabled": false,
  63. "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": true,
  64. "tweetypie_unmention_optimization_enabled": false,
  65. "unified_cards_ad_metadata_container_dynamic_card_content_query_enabled": false,
  66. "verified_phone_label_enabled": false,
  67. "vibe_api_enabled": false,
  68. "view_counts_everywhere_api_enabled": true,
  69. "premium_content_api_read_enabled": false,
  70. "communities_web_enable_tweet_community_results_fetch": true,
  71. "responsive_web_jetfuel_frame": true,
  72. "responsive_web_grok_analyze_button_fetch_trends_enabled": false,
  73. "responsive_web_grok_image_annotation_enabled": true,
  74. "responsive_web_grok_imagine_annotation_enabled": true,
  75. "rweb_tipjar_consumption_enabled": true,
  76. "profile_label_improvements_pcf_label_in_post_enabled": true,
  77. "creator_subscriptions_quote_tweet_preview_enabled": false,
  78. "c9s_tweet_anatomy_moderator_badge_enabled": true,
  79. "responsive_web_grok_analyze_post_followups_enabled": true,
  80. "rweb_video_timestamps_enabled": false,
  81. "responsive_web_grok_share_attachment_enabled": true,
  82. "articles_preview_enabled": true,
  83. "immersive_video_status_linkable_timestamps": false,
  84. "articles_api_enabled": false,
  85. "responsive_web_grok_analysis_button_from_backend": true,
  86. "rweb_video_screen_enabled": false,
  87. "payments_enabled": false,
  88. "responsive_web_profile_redirect_enabled": false,
  89. "responsive_web_grok_show_grok_translated_post": false,
  90. "responsive_web_grok_community_note_auto_translation_is_enabled": false,
  91. "profile_label_improvements_pcf_label_in_profile_enabled": false,
  92. "grok_android_analyze_trend_fetch_enabled": false,
  93. "grok_translations_community_note_auto_translation_is_enabled": false,
  94. "grok_translations_post_auto_translation_is_enabled": false,
  95. "grok_translations_community_note_translation_is_enabled": false,
  96. "grok_translations_timeline_user_bio_auto_translation_is_enabled": false
  97. }""".replace(" ", "").replace("\n", "")
  98. tweetVariables* = """{
  99. "postId": "$1",
  100. $2
  101. "includeHasBirdwatchNotes": false,
  102. "includePromotedContent": false,
  103. "withBirdwatchNotes": false,
  104. "withVoice": false,
  105. "withV2Timeline": true
  106. }""".replace(" ", "").replace("\n", "")
  107. tweetDetailVariables* = """{
  108. "focalTweetId": "$1",
  109. $2
  110. "referrer": "profile",
  111. "with_rux_injections": false,
  112. "rankingMode": "Relevance",
  113. "includePromotedContent": true,
  114. "withCommunity": true,
  115. "withQuickPromoteEligibilityTweetFields": true,
  116. "withBirdwatchNotes": true,
  117. "withVoice": true
  118. }""".replace(" ", "").replace("\n", "")
  119. restIdVariables* = """{
  120. "rest_id": "$1", $2
  121. "count": 20
  122. }"""
  123. userMediaVariables* = """{
  124. "userId": "$1", $2
  125. "count": 20,
  126. "includePromotedContent": false,
  127. "withClientEventToken": false,
  128. "withBirdwatchNotes": false,
  129. "withVoice": true
  130. }""".replace(" ", "").replace("\n", "")
  131. userTweetsVariables* = """{
  132. "userId": "$1", $2
  133. "count": 20,
  134. "includePromotedContent": false,
  135. "withQuickPromoteEligibilityTweetFields": true,
  136. "withVoice": true
  137. }""".replace(" ", "").replace("\n", "")
  138. userTweetsAndRepliesVariables* = """{
  139. "userId": "$1", $2
  140. "count": 20,
  141. "includePromotedContent": false,
  142. "withCommunity": true,
  143. "withVoice": true
  144. }""".replace(" ", "").replace("\n", "")
  145. fieldToggles* = """{"withArticlePlainText":false}"""
  146. tweetDetailFieldToggles* = """{"withArticleRichContentState":true,"withArticlePlainText":false,"withGrokAnalyze":false,"withDisallowedReplyControls":false}"""