rsshub
Version:
Make RSS Great Again!
39 lines (37 loc) • 1.15 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import "./cache-Bo__VnGm.mjs";
import "./helpers-DxBp0Pty.mjs";
import "./got-KxxWdaxq.mjs";
import { n as hyphen2Pascal, t as fetchItems } from "./utils-D6N5DJ4L.mjs";
//#region lib/routes/web/series.ts
const route = {
path: "/series/:seriesName",
parameters: { seriesName: "topic name in the series section" },
categories: ["programming"],
example: "/web/series/new-to-the-web",
radar: [{
source: ["web.dev/series/:seriesName"],
target: "/series/:seriesName"
}],
name: "Series",
maintainers: ["KarasuShin"],
handler,
description: `::: tip
The \`seriesName\` can be extracted from the Series page URL: \`https://web.dev/series/:seriesName\`
:::`
};
async function handler(ctx) {
const seriesName = ctx.req.param("seriesName");
return {
title: seriesName,
link: `https://web.dev/series/${seriesName}`,
image: "https://web.dev/_pwa/web/icons/icon-144x144.png",
item: await fetchItems(`category:${hyphen2Pascal(seriesName)}`)
};
}
//#endregion
export { route };