|
|
@ -2570,7 +2570,7 @@ get "/api/v1/stats" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
statistics.to_json
|
|
|
|
statistics.to_json
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/captions/:id" do |env|
|
|
|
|
get "/api/v1/captions/:id" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -2734,7 +2734,7 @@ get "/api/v1/comments/:id" do |env|
|
|
|
|
next response.to_json
|
|
|
|
next response.to_json
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/insights/:id" do |env|
|
|
|
|
get "/api/v1/insights/:id" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -2822,7 +2822,7 @@ get "/api/v1/insights/:id" do |env|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
next response.to_json
|
|
|
|
next response.to_json
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/videos/:id" do |env|
|
|
|
|
get "/api/v1/videos/:id" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3028,7 +3028,7 @@ get "/api/v1/videos/:id" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
video_info
|
|
|
|
video_info
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/trending" do |env|
|
|
|
|
get "/api/v1/trending" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3076,7 +3076,7 @@ get "/api/v1/trending" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
videos
|
|
|
|
videos
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/popular" do |env|
|
|
|
|
get "/api/v1/popular" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3106,7 +3106,7 @@ get "/api/v1/popular" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
videos
|
|
|
|
videos
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/top" do |env|
|
|
|
|
get "/api/v1/top" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3149,7 +3149,7 @@ get "/api/v1/top" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
videos
|
|
|
|
videos
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/channels/:ucid" do |env|
|
|
|
|
get "/api/v1/channels/:ucid" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3354,7 +3354,7 @@ get "/api/v1/channels/:ucid" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
channel_info
|
|
|
|
channel_info
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
["/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"].each do |route|
|
|
|
|
["/api/v1/channels/:ucid/videos", "/api/v1/channels/videos/:ucid"].each do |route|
|
|
|
|
get route do |env|
|
|
|
|
get route do |env|
|
|
|
@ -3423,7 +3423,7 @@ get "/api/v1/channels/:ucid" do |env|
|
|
|
|
|
|
|
|
|
|
|
|
result
|
|
|
|
result
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
["/api/v1/channels/:ucid/latest", "/api/v1/channels/latest/:ucid"].each do |route|
|
|
|
|
["/api/v1/channels/:ucid/latest", "/api/v1/channels/latest/:ucid"].each do |route|
|
|
|
|
get route do |env|
|
|
|
|
get route do |env|
|
|
|
@ -3472,7 +3472,7 @@ get "/api/v1/channels/:ucid" do |env|
|
|
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
response
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
["/api/v1/channels/:ucid/playlists", "/api/v1/channels/playlists/:ucid"].each do |route|
|
|
|
|
["/api/v1/channels/:ucid/playlists", "/api/v1/channels/playlists/:ucid"].each do |route|
|
|
|
|
get route do |env|
|
|
|
|
get route do |env|
|
|
|
@ -3538,7 +3538,7 @@ get "/api/v1/channels/:ucid" do |env|
|
|
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
response
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/channels/search/:ucid" do |env|
|
|
|
|
get "/api/v1/channels/search/:ucid" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3638,7 +3638,7 @@ get "/api/v1/channels/search/:ucid" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
response
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/search" do |env|
|
|
|
|
get "/api/v1/search" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3763,7 +3763,7 @@ get "/api/v1/search" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
response
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/playlists/:plid" do |env|
|
|
|
|
get "/api/v1/playlists/:plid" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
@ -3863,7 +3863,7 @@ get "/api/v1/playlists/:plid" do |env|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
response
|
|
|
|
response
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
get "/api/v1/mixes/:rdid" do |env|
|
|
|
|
get "/api/v1/mixes/:rdid" do |env|
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
|
|
|