From 0f6fcf5833b1a1ae55705cdae1ce760588c69578 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 7 Aug 2018 14:45:37 -0500 Subject: [PATCH] Update API to match documentation --- src/invidious.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 4165de02..66846fdd 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1976,7 +1976,7 @@ get "/api/v1/videos/:id" do |env| hlsvp = video.info["hlsvp"] hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url) - json.field "hls", hlsvp + json.field "hlsUrl", hlsvp end json.field "adaptiveFormats" do @@ -2167,7 +2167,7 @@ get "/api/v1/trending" do |env| json.field "author", author json.field "authorUrl", author_url - json.field "published", published + json.field "published", published.epoch json.field "description", description json.field "descriptionHtml", descriptionHtml end @@ -2448,7 +2448,7 @@ get "/api/v1/channels/:ucid/videos" do |env| json.field "descriptionHtml", descriptionHtml json.field "viewCount", view_count - json.field "published", published + json.field "published", published.epoch json.field "lengthSeconds", length_seconds end end