consts.nim 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # SPDX-License-Identifier: AGPL-3.0-only
  2. import uri, sequtils
  3. const
  4. auth* = "Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw"
  5. api = parseUri("https://api.twitter.com")
  6. activate* = $(api / "1.1/guest/activate.json")
  7. userShow* = api / "1.1/users/show.json"
  8. photoRail* = api / "1.1/statuses/media_timeline.json"
  9. status* = api / "1.1/statuses/show"
  10. search* = api / "2/search/adaptive.json"
  11. timelineApi = api / "2/timeline"
  12. timeline* = timelineApi / "profile"
  13. mediaTimeline* = timelineApi / "media"
  14. listTimeline* = timelineApi / "list.json"
  15. tweet* = timelineApi / "conversation"
  16. graphql = api / "graphql"
  17. graphTweet* = graphql / "6lWNh96EXDJCXl05SAtn_g/TweetDetail"
  18. graphUser* = graphql / "7mjxD3-C6BxitPMVQ6w0-Q/UserByScreenName"
  19. graphUserById* = graphql / "I5nvpI91ljifos1Y3Lltyg/UserByRestId"
  20. graphList* = graphql / "JADTh6cjebfgetzvF3tQvQ/List"
  21. graphListBySlug* = graphql / "ErWsz9cObLel1BF-HjuBlA/ListBySlug"
  22. graphListMembers* = graphql / "Ke6urWMeCV2UlKXGRy4sow/ListMembers"
  23. timelineParams* = {
  24. "include_profile_interstitial_type": "0",
  25. "include_blocking": "0",
  26. "include_blocked_by": "0",
  27. "include_followed_by": "0",
  28. "include_want_retweets": "0",
  29. "include_mute_edge": "0",
  30. "include_can_dm": "0",
  31. "include_can_media_tag": "1",
  32. "skip_status": "1",
  33. "cards_platform": "Web-12",
  34. "include_cards": "1",
  35. "include_composer_source": "false",
  36. "include_reply_count": "1",
  37. "tweet_mode": "extended",
  38. "include_entities": "true",
  39. "include_user_entities": "true",
  40. "include_ext_media_color": "false",
  41. "send_error_codes": "true",
  42. "simple_quoted_tweet": "true",
  43. "include_quote_count": "true"
  44. }.toSeq
  45. searchParams* = {
  46. "query_source": "typed_query",
  47. "pc": "1",
  48. "spelling_corrections": "1"
  49. }.toSeq
  50. ## top: nothing
  51. ## latest: "tweet_search_mode: live"
  52. ## user: "result_filter: user"
  53. ## photos: "result_filter: photos"
  54. ## videos: "result_filter: videos"
  55. tweetVariables* = """{
  56. "focalTweetId": "$1",
  57. $2
  58. "includePromotedContent": false,
  59. "withBirdwatchNotes": false,
  60. "withDownvotePerspective": false,
  61. "withReactionsMetadata": false,
  62. "withReactionsPerspective": false,
  63. "withSuperFollowsTweetFields": false,
  64. "withSuperFollowsUserFields": false,
  65. "withVoice": false,
  66. "withV2Timeline": true
  67. }"""
  68. tweetFeatures* = """{
  69. "graphql_is_translatable_rweb_tweet_is_translatable_enabled": false,
  70. "responsive_web_graphql_timeline_navigation_enabled": false,
  71. "standardized_nudges_misinfo": false,
  72. "verified_phone_label_enabled": false,
  73. "responsive_web_twitter_blue_verified_badge_is_enabled": false,
  74. "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": false,
  75. "view_counts_everywhere_api_enabled": false,
  76. "responsive_web_edit_tweet_api_enabled": false,
  77. "tweetypie_unmention_optimization_enabled": false,
  78. "vibe_api_enabled": false,
  79. "longform_notetweets_consumption_enabled": false,
  80. "responsive_web_text_conversations_enabled": false,
  81. "responsive_web_enhance_cards_enabled": false,
  82. "interactive_text_enabled": false
  83. }"""