* ChannelView feeds * Fixes for web app * Add request id to error message
196 lines
4.7 KiB
JSON
196 lines
4.7 KiB
JSON
{
|
|
endpoints: [
|
|
{
|
|
name: "trending",
|
|
displayName: "Trending",
|
|
url: "/api/v1/trending",
|
|
queryParams: {
|
|
type: {
|
|
required: false,
|
|
type: ["Music", "Gaming", "Movies"],
|
|
},
|
|
region: {
|
|
required: false,
|
|
type: "#ISO3166",
|
|
default: "GetUserCountryCode",
|
|
},
|
|
fields: {
|
|
required: false,
|
|
type: [],
|
|
arrayType: "comma-separated",
|
|
default: [
|
|
"title",
|
|
"videoId",
|
|
"videoThumbnails",
|
|
"lengthSeconds",
|
|
"viewCount",
|
|
"author",
|
|
"publishedText",
|
|
"liveNow",
|
|
"isUpcoming",
|
|
"premiereTimestamp",
|
|
],
|
|
},
|
|
},
|
|
cacheSeconds: 21600, // 6 hours
|
|
},
|
|
{
|
|
name: "popular",
|
|
displayName: "Popular",
|
|
url: "/api/v1/popular",
|
|
queryParams: {
|
|
fields: {
|
|
required: false,
|
|
type: [],
|
|
arrayType: "comma-separated",
|
|
default: [
|
|
"title",
|
|
"videoId",
|
|
"videoThumbnails",
|
|
"lengthSeconds",
|
|
"viewCount",
|
|
"author",
|
|
"publishedText",
|
|
"liveNow",
|
|
"isUpcoming",
|
|
"premiereTimestamp",
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "search",
|
|
displayName: "Search",
|
|
url: "/api/v1/search",
|
|
paginationType: "Pages",
|
|
queryParams: {
|
|
q: {
|
|
required: true,
|
|
type: "string",
|
|
},
|
|
sort_by: {
|
|
required: false,
|
|
type: ["relevance", "rating", "upload_date", "view_count"],
|
|
},
|
|
date: {
|
|
required: false,
|
|
type: ["hour", "today", "week", "month", "year"],
|
|
},
|
|
duration: {
|
|
required: false,
|
|
type: ["short", "long"],
|
|
},
|
|
type: {
|
|
required: false,
|
|
type: ["video", "playlist", "channel", "all"],
|
|
arrayType: "comma-separated",
|
|
default: ["video", "playlist", "channel"],
|
|
},
|
|
features: {
|
|
required: false,
|
|
type: [
|
|
"hd",
|
|
"subtitles",
|
|
"creative_commons",
|
|
"3d",
|
|
"live",
|
|
"purchased",
|
|
"4k",
|
|
"360",
|
|
"location",
|
|
"hdr",
|
|
],
|
|
},
|
|
region: {
|
|
required: false,
|
|
type: "#ISO3166",
|
|
default: "GetUserCountryCode",
|
|
},
|
|
},
|
|
cacheSeconds: 900, // 15 minutes
|
|
},
|
|
{
|
|
name: "auth_feed",
|
|
displayName: "User Feed",
|
|
url: "/api/v1/auth/feed",
|
|
authenticated: true,
|
|
responseHandler: "AuthFeedHandler",
|
|
queryParams: {
|
|
max_results: {
|
|
required: false,
|
|
type: "number",
|
|
default: 20,
|
|
},
|
|
},
|
|
paginationType: "Pages",
|
|
},
|
|
{
|
|
name: "playlists",
|
|
displayName: "Playlists",
|
|
url: "/api/v1/auth/playlists",
|
|
authenticated: true,
|
|
},
|
|
{
|
|
name: "playlist",
|
|
displayName: "Playlist",
|
|
url: "/api/v1/playlists/{plid}",
|
|
responseHandler: "PlaylistHandler",
|
|
paginationType: "Pages",
|
|
},
|
|
{
|
|
name: "channel_videos",
|
|
displayName: "Channel videos",
|
|
url: "/api/v1/channels/{ucid}/videos",
|
|
responseHandler: "ChannelVideosHandler",
|
|
paginationType: "Continuation",
|
|
queryParams: {
|
|
sort_by: {
|
|
required: false,
|
|
type: ["newest", "oldest", "popular"],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "channel_playlists",
|
|
displayName: "Channel playlists",
|
|
url: "/api/v1/channels/{ucid}/playlists",
|
|
responseHandler: "ChannelPlaylistsHandler",
|
|
paginationType: "Continuation",
|
|
queryParams: {
|
|
sort_by: {
|
|
required: false,
|
|
type: ["newest", "oldest", "last"],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "channel_shorts",
|
|
displayName: "Channel shorts",
|
|
url: "/api/v1/channels/{ucid}/shorts",
|
|
responseHandler: "ChannelVideosHandler",
|
|
paginationType: "Continuation",
|
|
},
|
|
{
|
|
name: "channel_streams",
|
|
displayName: "Channel livestreams",
|
|
url: "/api/v1/channels/{ucid}/streams",
|
|
responseHandler: "ChannelVideosHandler",
|
|
paginationType: "Continuation",
|
|
},
|
|
{
|
|
name: "channel_podcasts",
|
|
displayName: "Channel podcasts",
|
|
url: "/api/v1/channels/{ucid}/podcasts",
|
|
responseHandler: "ChannelPlaylistsHandler",
|
|
paginationType: "Continuation",
|
|
},
|
|
{
|
|
name: "channel_channels",
|
|
displayName: "Related channels",
|
|
url: "/api/v1/channels/{ucid}/channels",
|
|
responseHandler: "ChannelRelatedChannelsHandler",
|
|
paginationType: "Continuation",
|
|
},
|
|
],
|
|
}
|