Add 'type' field to ChannelVideo and Video

pull/577/head
Omar Roth 6 years ago
parent d892ba6aa5
commit d197497349
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2

@ -11,6 +11,8 @@ end
struct ChannelVideo
def to_json(locale, config, kemal_config, json : JSON::Builder)
json.object do
json.field "type", "shortVideo"
json.field "title", self.title
json.field "videoId", self.id
json.field "videoThumbnails" do

@ -276,6 +276,8 @@ struct Video
def to_json(locale, config, kemal_config, decrypt_function)
JSON.build do |json|
json.object do
json.field "type", "video"
json.field "title", self.title
json.field "videoId", self.id
json.field "videoThumbnails" do

Loading…
Cancel
Save