consts.nim 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. graphUser* = graphql / "7mjxD3-C6BxitPMVQ6w0-Q/UserByScreenName"
  18. graphUserById* = graphql / "I5nvpI91ljifos1Y3Lltyg/UserByRestId"
  19. graphList* = graphql / "JADTh6cjebfgetzvF3tQvQ/List"
  20. graphListBySlug* = graphql / "ErWsz9cObLel1BF-HjuBlA/ListBySlug"
  21. graphListMembers* = graphql / "Ke6urWMeCV2UlKXGRy4sow/ListMembers"
  22. timelineParams* = {
  23. "include_profile_interstitial_type": "0",
  24. "include_blocking": "0",
  25. "include_blocked_by": "0",
  26. "include_followed_by": "0",
  27. "include_want_retweets": "0",
  28. "include_mute_edge": "0",
  29. "include_can_dm": "0",
  30. "include_can_media_tag": "1",
  31. "skip_status": "1",
  32. "cards_platform": "Web-12",
  33. "include_cards": "1",
  34. "include_composer_source": "false",
  35. "include_reply_count": "1",
  36. "tweet_mode": "extended",
  37. "include_entities": "true",
  38. "include_user_entities": "true",
  39. "include_ext_media_color": "false",
  40. "send_error_codes": "true",
  41. "simple_quoted_tweet": "true",
  42. "include_quote_count": "true"
  43. }.toSeq
  44. searchParams* = {
  45. "query_source": "typed_query",
  46. "pc": "1",
  47. "spelling_corrections": "1"
  48. }.toSeq
  49. ## top: nothing
  50. ## latest: "tweet_search_mode: live"
  51. ## user: "result_filter: user"
  52. ## photos: "result_filter: photos"
  53. ## videos: "result_filter: videos"