Parse video profile

This commit is contained in:
Zed 2020-06-10 17:05:55 +02:00
parent 4f6b8bad9e
commit 179b3bc496

View file

@ -255,6 +255,8 @@ proc parseTweet(js: JsonNode): Tweet =
result.photos.add m{"media_url_https"}.getImageStr result.photos.add m{"media_url_https"}.getImageStr
of "video": of "video":
result.video = some(parseVideo(m)) result.video = some(parseVideo(m))
with user, m{"additional_media_info", "source_user"}:
result.attribution = some(parseProfile(user))
of "animated_gif": of "animated_gif":
result.gif = some(parseGif(m)) result.gif = some(parseGif(m))
else: discard else: discard