UNPKG

rsshub

Version:
49 lines (47 loc) 1.28 kB
import "./dist-Bog6z_OM.mjs"; import "./config-MQ-7ebJ_.mjs"; import { t as ViewType } from "./types-gOySfSXJ.mjs"; import "./logger-C4avouvV.mjs"; import "./ofetch-DKl_Ma9g.mjs"; import "./parse-date-r5WDWHno.mjs"; import { n as processItems, t as baseUrl } from "./util-l5NqQVNX.mjs"; //#region lib/routes/gcores/articles.ts const handler = async (ctx) => { const limit = Number.parseInt(ctx.req.query("limit") ?? "30", 10); const targetUrl = new URL("articles", baseUrl).href; const apiUrl = new URL(`gapi/v1/articles`, baseUrl).href; return await processItems(limit, { "page[limit]": limit, sort: "-published-at", include: "category,user,media", "filter[list-all]": 1, "filter[is-news]": 0 }, apiUrl, targetUrl); }; const route = { path: "/articles", name: "文章", url: "www.gcores.com", maintainers: ["nczitzk"], handler, example: "/gcores/articles", parameters: void 0, description: void 0, categories: ["game"], features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportRadar: true, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["www.gcores.com/articles"], target: "/gcores/articles" }], view: ViewType.Articles }; //#endregion export { handler, route };