consts.nim 1.9 KB

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