UNPKG

rsshub

Version:
53 lines (51 loc) 1.54 kB
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import { t as ViewType } from "./types-D84BRIt4.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import "./ofetch-BIyrKU3Y.mjs"; import "./parse-date-BrP7mxXf.mjs"; import "./not-found-Z_3JX2qs.mjs"; import "./cache-Bo__VnGm.mjs"; import "./render-BQo6B4tL.mjs"; import { a as callApi, n as getDataByPlaylistId } from "./google-Z2XIyS1r.mjs"; import { n as getDataByPlaylistId$1 } from "./youtubei-CgKx8K1D.mjs"; //#region lib/routes/youtube/playlist.ts const route = { path: "/playlist/:id/:embed?", categories: ["social-media"], view: ViewType.Videos, example: "/youtube/playlist/PLqQ1RwlxOgeLTJ1f3fNMSwhjVgaWKo_9Z", parameters: { id: "YouTube playlist id", embed: "Default to embed the video, set to any value to disable embedding" }, features: { requireConfig: [{ name: "YOUTUBE_KEY", description: " YouTube API Key, support multiple keys, split them with `,`, [API Key application](https://console.developers.google.com/)", optional: true }], requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, name: "Playlist", maintainers: ["HenryQW"], handler }; async function handler(ctx) { return await callApi({ googleApi: getDataByPlaylistId, youtubeiApi: getDataByPlaylistId$1, params: { playlistId: ctx.req.param("id"), embed: !ctx.req.param("embed"), isJsonFeed: ctx.req.query("format") === "json" } }); } //#endregion export { route };