Minor cleanup
This commit is contained in:
parent
384b0a2033
commit
2128b280b4
|
@ -4,21 +4,24 @@ const
|
||||||
auth* = "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
auth* = "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
||||||
|
|
||||||
api = parseUri("https://api.twitter.com")
|
api = parseUri("https://api.twitter.com")
|
||||||
graphql = api / "graphql"
|
|
||||||
timelineApi = api / "2/timeline"
|
|
||||||
activate* = $(api / "1.1/guest/activate.json")
|
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"
|
listMembers* = api / "1.1/lists/members.json"
|
||||||
userShow* = api / "1.1/users/show.json"
|
userShow* = api / "1.1/users/show.json"
|
||||||
photoRail* = api / "1.1/statuses/media_timeline.json"
|
photoRail* = api / "1.1/statuses/media_timeline.json"
|
||||||
tweet* = timelineApi / "conversation"
|
|
||||||
search* = api / "2/search/adaptive.json"
|
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* = {
|
timelineParams* = {
|
||||||
"include_profile_interstitial_type": "0",
|
"include_profile_interstitial_type": "0",
|
||||||
"include_blocking": "0",
|
"include_blocking": "0",
|
||||||
|
|
|
@ -159,7 +159,6 @@ proc replacedWith(runes: seq[Rune]; repls: openArray[ReplaceSlice];
|
||||||
|
|
||||||
result = newStringOfCap(runes.len)
|
result = newStringOfCap(runes.len)
|
||||||
|
|
||||||
var upperBound = textSlice.b
|
|
||||||
for i, rep in repls:
|
for i, rep in repls:
|
||||||
result.add $runes[extractLowerBound(i, i - 1) ..< rep.slice.a]
|
result.add $runes[extractLowerBound(i, i - 1) ..< rep.slice.a]
|
||||||
case rep.kind
|
case rep.kind
|
||||||
|
|
Loading…
Reference in New Issue