Initial commit

This commit is contained in:
Zed
2019-06-20 16:16:20 +02:00
commit cea5cc0523
14 changed files with 1370 additions and 0 deletions

40
src/types.nim Normal file
View File

@@ -0,0 +1,40 @@
import times, sequtils
type
Profile* = object
username*: string
fullname*: string
description*: string
userpic*: string
banner*: string
following*: string
followers*: string
tweets*: string
verified*: bool
protected*: bool
Tweet* = object
id*: string
profile*: Profile
link*: string
text*: string
time*: Time
shortTime*: string
replies*: string
retweets*: string
likes*: string
retweetBy*: string
pinned*: bool
photos*: seq[string]
gif*: string
Tweets* = seq[Tweet]
Conversation* = object
tweet*: Tweet
before*: Tweets
after*: Tweets
replies*: seq[Tweets]
proc contains*(thread: Tweets; tweet: Tweet): bool =
thread.anyIt(it.id == tweet.id)