From 2128b280b460c32e4138d5451149e2f1c3fea05b Mon Sep 17 00:00:00 2001 From: Zed Date: Thu, 7 Jan 2021 22:04:19 +0100 Subject: [PATCH] Minor cleanup --- src/consts.nim | 21 ++++++++++++--------- src/parserutils.nim | 1 - 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/consts.nim b/src/consts.nim index 7ae0a01..3676588 100644 --- a/src/consts.nim +++ b/src/consts.nim @@ -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", diff --git a/src/parserutils.nim b/src/parserutils.nim index cd5fb0c..5b694cc 100644 --- a/src/parserutils.nim +++ b/src/parserutils.nim @@ -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