consts.nim 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import uri, sequtils
  2. const
  3. auth* = "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
  4. api = parseUri("https://api.twitter.com")
  5. graphql = api / "graphql"
  6. timelineApi = api / "2/timeline"
  7. graphUser* = graphql / "E4iSsd6gypGFWx2eUhSC1g/UserByScreenName"
  8. graphList* = graphql / "ErWsz9cObLel1BF-HjuBlA/ListBySlug"
  9. graphListId* = graphql / "JADTh6cjebfgetzvF3tQvQ/List"
  10. timeline* = timelineApi / "profile"
  11. mediaTimeline* = timelineApi / "media"
  12. listTimeline* = timelineApi / "list.json"
  13. listMembers* = api / "1.1/lists/members.json"
  14. tweet* = timelineApi / "conversation"
  15. search* = api / "2/search/adaptive.json"
  16. timelineParams* = {
  17. "include_profile_interstitial_type": "0",
  18. "include_blocking": "0",
  19. "include_blocked_by": "0",
  20. "include_followed_by": "1",
  21. "include_want_retweets": "0",
  22. "include_mute_edge": "0",
  23. "include_can_dm": "0",
  24. "include_can_media_tag": "1",
  25. "skip_status": "1",
  26. "cards_platform": "Web-12",
  27. "include_cards": "1",
  28. "include_composer_source": "false",
  29. "include_ext_alt_text": "true",
  30. "include_reply_count": "1",
  31. "tweet_mode": "extended",
  32. "include_entities": "true",
  33. "include_user_entities": "true",
  34. "include_ext_media_color": "false",
  35. "include_ext_media_availability": "true",
  36. "send_error_codes": "true",
  37. "simple_quoted_tweet": "true",
  38. "count": "20",
  39. "ext": "mediaStats,highlightedLabel,cameraMoment",
  40. "include_quote_count": "true"
  41. }.toSeq
  42. searchParams* = {
  43. "query_source": "typed_query",
  44. "pc": "1",
  45. "spelling_corrections": "1"
  46. }.toSeq
  47. ## top: nothing
  48. ## latest: "tweet_search_mode: live"
  49. ## user: "result_filter: user"
  50. ## photos: "result_filter: photos"
  51. ## videos: "result_filter: videos"