mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Use legacy timeline/user endpoint for Tweets tab
This commit is contained in:
parent
5725780c99
commit
624394430c
8 changed files with 81 additions and 38 deletions
10
src/api.nim
10
src/api.nim
|
|
@ -40,6 +40,16 @@ proc getGraphUserTweets*(id: string; kind: TimelineKind; after=""): Future[Profi
|
|||
# url = oldUserTweets / (id & ".json") ? ps
|
||||
# result = parseTimeline(await fetch(url, Api.timeline), after)
|
||||
|
||||
proc getUserTimeline*(id: string; after=""): Future[Profile] {.async.} =
|
||||
var ps = genParams({"id": id})
|
||||
if after.len > 0:
|
||||
ps.add ("down_cursor", after)
|
||||
|
||||
let
|
||||
url = legacyUserTweets ? ps
|
||||
js = await fetch(url, Api.userTimeline)
|
||||
result = parseUserTimeline(js, after)
|
||||
|
||||
proc getGraphListTweets*(id: string; after=""): Future[Timeline] {.async.} =
|
||||
if id.len == 0: return
|
||||
let
|
||||
|
|
|
|||
Loading…
Reference in a new issue