UNPKG

rsshub

Version:
32 lines (31 loc) 1.08 kB
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs"; import { t as parseDate } from "./parse-date-CjhZE69i.mjs"; //#region lib/routes/xmind/mindmap.ts const route = { path: "/mindmap/:lang?", categories: ["study"], example: "/xmind/mindmap", parameters: { lang: "language code, all languages by default" }, name: "Mindmap Gallery", maintainers: ["nczitzk"], handler, description: `| English | Español | Deutsch | Français | 中文 | 日本語 | | ------- | ------- | ------- | -------- | ---- | ------ | | en | es | de | fr | zh | jp |` }; async function handler(ctx) { const { lang = "" } = ctx.req.param(); return { title: "Mindmap Gallery - XMind", link: "https://www.xmind.net/share", item: (await rofetch(`https://www.xmind.net/_api/share/featured-maps?limit=20&lang=${lang}`)).mapList.map((item) => ({ title: item.topic, link: `https://www.xmind.net/${item.id}`, description: `<img src="${item.previewUrl}">`, pubDate: parseDate(item.created), author: item.profileName })) }; } //#endregion export { route };