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

Add experimental user parser

This commit is contained in:
Zed
2022-01-16 06:00:11 +01:00
parent fcfc1ef497
commit cdf49dcddd
8 changed files with 270 additions and 29 deletions

View File

@@ -0,0 +1,30 @@
from ../../types import Error
type
Url* = object
url*: string
expandedUrl*: string
displayUrl*: string
indices*: array[2, int]
ErrorCode* = enum
null = 0
noUserMatches = 17
protectedUser = 22
couldntAuth = 32
doesntExist = 34
userNotFound = 50
suspended = 63
rateLimited = 88
invalidToken = 89
listIdOrSlug = 112
forbidden = 200
badToken = 239
noCsrf = 353
ErrorObj* = object
code*: Error
message*: string
Errors* = object
errors*: seq[ErrorObj]

View File

@@ -0,0 +1,28 @@
import common
type
User* = object
idStr*: string
name*: string
screenName*: string
location*: string
description*: string
entities*: Entities
createdAt*: string
followersCount*: int
friendsCount*: int
favouritesCount*: int
statusesCount*: int
mediaCount*: int
verified*: bool
protected*: bool
profileBannerUrl*: string
profileImageUrlHttps*: string
profileLinkColor*: string
Entities* = object
url*: Urls
description*: Urls
Urls* = object
urls*: seq[Url]