1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-01-29 06:42:50 -05:00

Switch to using typeahead for user search

This commit is contained in:
Zed
2023-08-23 10:14:44 +02:00
parent 45808361af
commit a3e11e3272
5 changed files with 15 additions and 11 deletions

View File

@@ -85,3 +85,10 @@ proc parseUsers*(json: string; after=""): Result[User] =
let raw = json.fromJson(seq[RawUser])
for user in raw:
result.content.add user.toUser
proc parseTypeahead*(json: string): Result[User] =
result = Result[User](beginning: true)
let raw = json.fromJson(Typeahead)
for user in raw.users:
result.content.add user.toUser