mirror of
https://github.com/iv-org/invidious.git
synced 2024-09-10 01:08:11 +02:00
Update API to match documentation
This commit is contained in:
parent
8ff8ed1e5f
commit
0f6fcf5833
@ -1976,7 +1976,7 @@ get "/api/v1/videos/:id" do |env|
|
|||||||
hlsvp = video.info["hlsvp"]
|
hlsvp = video.info["hlsvp"]
|
||||||
hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
|
hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", host_url)
|
||||||
|
|
||||||
json.field "hls", hlsvp
|
json.field "hlsUrl", hlsvp
|
||||||
end
|
end
|
||||||
|
|
||||||
json.field "adaptiveFormats" do
|
json.field "adaptiveFormats" do
|
||||||
@ -2167,7 +2167,7 @@ get "/api/v1/trending" do |env|
|
|||||||
json.field "author", author
|
json.field "author", author
|
||||||
json.field "authorUrl", author_url
|
json.field "authorUrl", author_url
|
||||||
|
|
||||||
json.field "published", published
|
json.field "published", published.epoch
|
||||||
json.field "description", description
|
json.field "description", description
|
||||||
json.field "descriptionHtml", descriptionHtml
|
json.field "descriptionHtml", descriptionHtml
|
||||||
end
|
end
|
||||||
@ -2448,7 +2448,7 @@ get "/api/v1/channels/:ucid/videos" do |env|
|
|||||||
json.field "descriptionHtml", descriptionHtml
|
json.field "descriptionHtml", descriptionHtml
|
||||||
|
|
||||||
json.field "viewCount", view_count
|
json.field "viewCount", view_count
|
||||||
json.field "published", published
|
json.field "published", published.epoch
|
||||||
json.field "lengthSeconds", length_seconds
|
json.field "lengthSeconds", length_seconds
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user