consts.nim 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # SPDX-License-Identifier: AGPL-3.0-only
  2. import uri, strutils
  3. const
  4. consumerKey* = "3nVuSoBZnx6U4vzUxf5w"
  5. consumerSecret* = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys"
  6. api = parseUri("https://api.twitter.com")
  7. activate* = $(api / "1.1/guest/activate.json")
  8. graphql = api / "graphql"
  9. graphUser* = graphql / "u7wQyGi6oExe8_TRWGMq4Q/UserResultByScreenNameQuery"
  10. graphUserById* = graphql / "oPppcargziU1uDQHAUmH-A/UserResultByIdQuery"
  11. graphUserTweets* = graphql / "3JNH4e9dq1BifLxAa3UMWg/UserWithProfileTweetsQueryV2"
  12. graphUserTweetsAndReplies* = graphql / "8IS8MaO-2EN6GZZZb8jF0g/UserWithProfileTweetsAndRepliesQueryV2"
  13. graphUserMedia* = graphql / "PDfFf8hGeJvUCiTyWtw4wQ/MediaTimelineV2"
  14. graphTweet* = graphql / "q94uRCEn65LZThakYcPT6g/TweetDetail"
  15. graphTweetResult* = graphql / "sITyJdhRPpvpEjg4waUmTA/TweetResultByIdQuery"
  16. graphSearchTimeline* = graphql / "gkjsKepM6gl_HmFWoWKfgg/SearchTimeline"
  17. graphListById* = graphql / "iTpgCtbdxrsJfyx0cFjHqg/ListByRestId"
  18. graphListBySlug* = graphql / "-kmqNvm5Y-cVrfvBy6docg/ListBySlug"
  19. graphListMembers* = graphql / "P4NpVZDqUD_7MEM84L-8nw/ListMembers"
  20. graphListTweets* = graphql / "BbGLL1ZfMibdFNWlk7a0Pw/ListTimeline"
  21. gqlFeatures* = """{
  22. "android_graphql_skip_api_media_color_palette": false,
  23. "blue_business_profile_image_shape_enabled": false,
  24. "creator_subscriptions_subscription_count_enabled": false,
  25. "creator_subscriptions_tweet_preview_api_enabled": true,
  26. "freedom_of_speech_not_reach_fetch_enabled": false,
  27. "graphql_is_translatable_rweb_tweet_is_translatable_enabled": false,
  28. "hidden_profile_likes_enabled": false,
  29. "highlights_tweets_tab_ui_enabled": false,
  30. "interactive_text_enabled": false,
  31. "longform_notetweets_consumption_enabled": true,
  32. "longform_notetweets_inline_media_enabled": false,
  33. "longform_notetweets_richtext_consumption_enabled": true,
  34. "longform_notetweets_rich_text_read_enabled": false,
  35. "responsive_web_edit_tweet_api_enabled": false,
  36. "responsive_web_enhance_cards_enabled": false,
  37. "responsive_web_graphql_exclude_directive_enabled": true,
  38. "responsive_web_graphql_skip_user_profile_image_extensions_enabled": false,
  39. "responsive_web_graphql_timeline_navigation_enabled": false,
  40. "responsive_web_media_download_video_enabled": false,
  41. "responsive_web_text_conversations_enabled": false,
  42. "responsive_web_twitter_article_tweet_consumption_enabled": false,
  43. "responsive_web_twitter_blue_verified_badge_is_enabled": true,
  44. "rweb_lists_timeline_redesign_enabled": true,
  45. "spaces_2022_h2_clipping": true,
  46. "spaces_2022_h2_spaces_communities": true,
  47. "standardized_nudges_misinfo": false,
  48. "subscriptions_verification_info_enabled": true,
  49. "subscriptions_verification_info_reason_enabled": true,
  50. "subscriptions_verification_info_verified_since_enabled": true,
  51. "super_follow_badge_privacy_enabled": false,
  52. "super_follow_exclusive_tweet_notifications_enabled": false,
  53. "super_follow_tweet_api_enabled": false,
  54. "super_follow_user_api_enabled": false,
  55. "tweet_awards_web_tipping_enabled": false,
  56. "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": false,
  57. "tweetypie_unmention_optimization_enabled": false,
  58. "unified_cards_ad_metadata_container_dynamic_card_content_query_enabled": false,
  59. "verified_phone_label_enabled": false,
  60. "vibe_api_enabled": false,
  61. "view_counts_everywhere_api_enabled": false
  62. }""".replace(" ", "").replace("\n", "")
  63. tweetVariables* = """{
  64. "focalTweetId": "$1",
  65. $2
  66. "includeHasBirdwatchNotes": false,
  67. "includePromotedContent": false,
  68. "withBirdwatchNotes": false,
  69. "withVoice": false,
  70. "withV2Timeline": true
  71. }""".replace(" ", "").replace("\n", "")
  72. # oldUserTweetsVariables* = """{
  73. # "userId": "$1", $2
  74. # "count": 20,
  75. # "includePromotedContent": false,
  76. # "withDownvotePerspective": false,
  77. # "withReactionsMetadata": false,
  78. # "withReactionsPerspective": false,
  79. # "withVoice": false,
  80. # "withV2Timeline": true
  81. # }
  82. # """
  83. userTweetsVariables* = """{
  84. "rest_id": "$1", $2
  85. "count": 20
  86. }"""
  87. listTweetsVariables* = """{
  88. "rest_id": "$1", $2
  89. "count": 20
  90. }"""