mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Implement user_id to screen_name router
This commit is contained in:
parent
aa2fed19d7
commit
52af6b2746
5 changed files with 47 additions and 2 deletions
|
|
@ -38,6 +38,18 @@ proc parseUserShow*(js: JsonNode; username: string): Profile =
|
|||
|
||||
result = parseProfile(js)
|
||||
|
||||
proc parseUserShowId*(js: JsonNode; userId: string): Profile =
|
||||
if js.isNull:
|
||||
return Profile(id: userId)
|
||||
|
||||
with error, js{"errors"}:
|
||||
result = Profile(id: userId)
|
||||
if error.getError == suspended:
|
||||
result.suspended = true
|
||||
return
|
||||
|
||||
result = parseProfile(js)
|
||||
|
||||
proc parseGraphProfile*(js: JsonNode; username: string): Profile =
|
||||
if js.isNull: return
|
||||
with error, js{"errors"}:
|
||||
|
|
|
|||
Loading…
Reference in a new issue