Fix getLink typo
This commit is contained in:
parent
7ef10b88f4
commit
97166feec9
|
@ -96,4 +96,4 @@ proc getTime*(tweet: Tweet): string =
|
||||||
tweet.time.format("d/M/yyyy', ' HH:mm:ss")
|
tweet.time.format("d/M/yyyy', ' HH:mm:ss")
|
||||||
|
|
||||||
proc getLink*(tweet: Tweet | Quote): string =
|
proc getLink*(tweet: Tweet | Quote): string =
|
||||||
&"{tweet.profile.username}/status/{tweet.id}"
|
&"/{tweet.profile.username}/status/{tweet.id}"
|
||||||
|
|
|
@ -127,14 +127,12 @@ proc parseVideo*(node: JsonNode): Video =
|
||||||
durationMs: track["durationMs"].to(int),
|
durationMs: track["durationMs"].to(int),
|
||||||
views: track["viewCount"].to(string),
|
views: track["viewCount"].to(string),
|
||||||
url: track["playbackUrl"].to(string),
|
url: track["playbackUrl"].to(string),
|
||||||
available: track{"mediaAvailability"}["status"].to(string) == "available"
|
available: track{"mediaAvailability"}["status"].to(string) == "available")
|
||||||
)
|
|
||||||
of "vmap":
|
of "vmap":
|
||||||
result = Video(
|
result = Video(
|
||||||
playbackType: vmap,
|
playbackType: vmap,
|
||||||
durationMs: track["durationMs"].to(int),
|
durationMs: track["durationMs"].to(int),
|
||||||
url: track["vmapUrl"].to(string)
|
url: track["vmapUrl"].to(string))
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
echo "Can't parse video of type ", cType
|
echo "Can't parse video of type ", cType
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue