mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add simple job_details card support
This commit is contained in:
parent
06ab1ea2e7
commit
4dac9f0798
10 changed files with 60 additions and 21 deletions
|
|
@ -68,6 +68,11 @@ proc toUser*(raw: RawUser): User =
|
|||
|
||||
result.expandUserEntities(raw)
|
||||
|
||||
proc parseHook*(s: string; i: var int; v: var User) =
|
||||
var u: RawUser
|
||||
parseHook(s, i, u)
|
||||
v = toUser u
|
||||
|
||||
proc parseUser*(json: string; username=""): User =
|
||||
handleErrors:
|
||||
case error.code
|
||||
|
|
@ -75,7 +80,7 @@ proc parseUser*(json: string; username=""): User =
|
|||
of userNotFound: return
|
||||
else: echo "[error - parseUser]: ", error
|
||||
|
||||
result = toUser json.fromJson(RawUser)
|
||||
result = json.fromJson(User)
|
||||
|
||||
proc parseUsers*(json: string; after=""): Result[User] =
|
||||
result = Result[User](beginning: after.len == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue