nitter/src/experimental/types/timeline.nim

29 lines
603 B
Nim
Raw Normal View History

2022-01-26 19:27:11 +00:00
import std/tables
2022-01-30 22:38:39 +00:00
import user, tweet
2022-01-26 19:27:11 +00:00
type
Search* = object
globalObjects*: GlobalObjects
timeline*: Timeline
2022-01-30 22:38:39 +00:00
GlobalObjects* = object
2022-01-26 19:27:11 +00:00
users*: Table[string, RawUser]
2022-01-30 22:38:39 +00:00
tweets*: Table[string, RawTweet]
2022-01-26 19:27:11 +00:00
Timeline = object
instructions*: seq[Instructions]
Instructions = object
addEntries*: tuple[entries: seq[Entry]]
2022-01-30 22:38:39 +00:00
Entry* = object
2022-01-26 19:27:11 +00:00
entryId*: string
content*: tuple[operation: Operation]
Operation = object
cursor*: tuple[value, cursorType: string]
2022-01-30 22:38:39 +00:00
proc renameHook*(v: var Entity; fieldName: var string) =
if fieldName == "type":
fieldName = "kind"