mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Move API endpoints under '/api/v1/' prefix
This commit is contained in:
parent
1eedd6ebf9
commit
1202e1f2bf
2 changed files with 5 additions and 5 deletions
|
@ -411,7 +411,7 @@ get "/watch" do |env|
|
||||||
templated "watch"
|
templated "watch"
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/captions/:id" do |env|
|
get "/api/v1/captions/:id" do |env|
|
||||||
id = env.params.url["id"]
|
id = env.params.url["id"]
|
||||||
|
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
|
@ -497,7 +497,7 @@ get "/captions/:id" do |env|
|
||||||
webvtt
|
webvtt
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/comments/:id" do |env|
|
get "/api/v1/comments/:id" do |env|
|
||||||
id = env.params.url["id"]
|
id = env.params.url["id"]
|
||||||
|
|
||||||
source = env.params.query["source"]?
|
source = env.params.query["source"]?
|
||||||
|
@ -653,7 +653,7 @@ get "/comments/:id" do |env|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/videos/:id" do |env|
|
get "/api/v1/videos/:id" do |env|
|
||||||
id = env.params.url["id"]
|
id = env.params.url["id"]
|
||||||
|
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% captions.each do |caption| %>
|
<% captions.each do |caption| %>
|
||||||
<track kind="captions" src="/captions/<%= video.id %>?label=<%= caption["name"]["simpleText"] %>"
|
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption["name"]["simpleText"] %>"
|
||||||
srclang="<%= caption["languageCode"] %>" label="<%= caption["name"]["simpleText"]%> ">
|
srclang="<%= caption["languageCode"] %>" label="<%= caption["name"]["simpleText"]%> ">
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -158,7 +158,7 @@ for ( var i = 0; i < currentSources.length; i++ ) {
|
||||||
player.src(currentSources);
|
player.src(currentSources);
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
fetch("/comments/<%= video.id %>?source=reddit")
|
fetch("/api/v1/comments/<%= video.id %>?source=reddit")
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue