1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-08 04:55:37 -05:00

Implement card fetching and parsing

This commit is contained in:
Zed
2019-07-11 19:22:23 +02:00
parent 1f90e2ab3e
commit d3a7ca834b
7 changed files with 113 additions and 13 deletions

View File

@@ -31,11 +31,11 @@ db("cache.db", "", "", ""):
.}: Time
type
QueryType* = enum
QueryKind* = enum
replies, media, custom = "search"
Query* = object
queryType*: QueryType
kind*: QueryKind
filters*: seq[string]
includes*: seq[string]
excludes*: seq[string]
@@ -70,6 +70,19 @@ type
status*: string
leader*: int
CardKind* = enum
summary, summaryLarge, liveEvent, player, promoWebsite
Card* = object
kind*: CardKind
id*: string
query*: string
url*: string
title*: string
dest*: string
text*: string
image*: string
Quote* = object
id*: string
profile*: Profile
@@ -104,6 +117,7 @@ type
stats*: TweetStats
retweet*: Option[Retweet]
quote*: Option[Quote]
card*: Option[Card]
gif*: Option[Gif]
video*: Option[Video]
photos*: seq[string]