Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Jan 7, 2021
1 parent 384b0a2 commit 2128b28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
21 changes: 12 additions & 9 deletions src/consts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ const
auth* = "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"

api = parseUri("https://api.twitter.com")
graphql = api / "graphql"
timelineApi = api / "2/timeline"
activate* = $(api / "1.1/guest/activate.json")
graphUser* = graphql / "E4iSsd6gypGFWx2eUhSC1g/UserByScreenName"
graphList* = graphql / "ErWsz9cObLel1BF-HjuBlA/ListBySlug"
graphListId* = graphql / "JADTh6cjebfgetzvF3tQvQ/List"
timeline* = timelineApi / "profile"
mediaTimeline* = timelineApi / "media"
listTimeline* = timelineApi / "list.json"

listMembers* = api / "1.1/lists/members.json"
userShow* = api / "1.1/users/show.json"
photoRail* = api / "1.1/statuses/media_timeline.json"
tweet* = timelineApi / "conversation"
search* = api / "2/search/adaptive.json"

timelineApi = api / "2/timeline"
tweet* = timelineApi / "conversation"
timeline* = timelineApi / "profile"
mediaTimeline* = timelineApi / "media"
listTimeline* = timelineApi / "list.json"

graphql = api / "graphql"
graphUser* = graphql / "E4iSsd6gypGFWx2eUhSC1g/UserByScreenName"
graphList* = graphql / "ErWsz9cObLel1BF-HjuBlA/ListBySlug"
graphListId* = graphql / "JADTh6cjebfgetzvF3tQvQ/List"

timelineParams* = {
"include_profile_interstitial_type": "0",
"include_blocking": "0",
Expand Down
1 change: 0 additions & 1 deletion src/parserutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ proc replacedWith(runes: seq[Rune]; repls: openArray[ReplaceSlice];

result = newStringOfCap(runes.len)

var upperBound = textSlice.b
for i, rep in repls:
result.add $runes[extractLowerBound(i, i - 1) ..< rep.slice.a]
case rep.kind
Expand Down

0 comments on commit 2128b28

Please sign in to comment.