rsshub
Version:
Make RSS Great Again!
46 lines (44 loc) • 1.58 kB
JavaScript
import { n as init_esm_shims, t as __dirname } from "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import { t as parseDate } from "./parse-date-BrP7mxXf.mjs";
import "./helpers-DxBp0Pty.mjs";
import { t as art } from "./render-BQo6B4tL.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import path from "node:path";
//#region lib/routes/nintendo/eshop-jp.ts
init_esm_shims();
const route = {
path: "/eshop/jp",
radar: [{ source: ["nintendo.co.jp/software/switch/index.html", "nintendo.co.jp/"] }],
name: "Unknown",
maintainers: [],
handler,
url: "nintendo.co.jp/software/switch/index.html"
};
async function handler(ctx) {
return {
title: "Nintendo eShop(日服)新游戏",
link: "https://www.nintendo.co.jp/software/switch/index.html",
description: "Nintendo eShop(日服)新上架的游戏",
item: (await got_default("https://search.nintendo.jp/nintendo_soft/search.json", { searchParams: {
opt_sshow: 1,
fq: "ssitu_s:onsale OR ssitu_s:preorder OR memo_bg:forced",
limit: ctx.req.query("limit") ? Number(ctx.req.query("limit")) : 24,
page: 1,
c: "50310840317994813",
opt_osale: 1,
opt_hard: "1_HAC",
sort: "sodate desc,score"
} })).data.result.items.map((item) => ({
title: item.title,
description: art(path.join(__dirname, "templates/eshop_jp-bd0c4869.art"), { item }),
link: `https://ec.nintendo.com/JP/ja/titles/${item.id}`,
pubDate: parseDate(item.pdate)
}))
};
}
//#endregion
export { route };