UNPKG

rsshub

Version:
38 lines (36 loc) 1.31 kB
import "./dist-Bog6z_OM.mjs"; import "./config-MQ-7ebJ_.mjs"; import "./logger-C4avouvV.mjs"; import "./ofetch-DKl_Ma9g.mjs"; import { t as parseDate } from "./parse-date-r5WDWHno.mjs"; import "./is-worker-DESPicPc.mjs"; import "./cache-SV6W5EPy.mjs"; import { t as timezone } from "./timezone-CA9Huotp.mjs"; import { a as getUserInfo, m as REQUIRE_CONFIG, r as getResently, s as checkConfig, u as INDEX_URL } from "./api-B94zz5hx.mjs"; //#region lib/routes/sdo/ff14risingstones/user-resently.ts const route = { path: "/ff14risingstones/user-resently/:uid", categories: ["bbs"], example: "/sdo/ff14risingstones/user-resently/10008214", name: "游戏近况", maintainers: ["KarasuShin"], features: { requireConfig: REQUIRE_CONFIG }, handler }; async function handler(ctx) { checkConfig(); const uid = ctx.req.param("uid"); const [resently, userInfo] = await Promise.all([getResently(uid), getUserInfo(uid)]); return { title: `石之家 - ${userInfo.character_name}@${userInfo.group_name} 的游戏近况`, link: `${INDEX_URL}#/me/info?uuid=${uid}`, image: userInfo.avatar, item: resently.map((i) => ({ title: `${i.event_type} - ${i.detail}`, pubDate: timezone(parseDate(i.log_time), 8), guid: `sdo/ff14risingstones/resently:${uid}-${i.detail}` })) }; } //#endregion export { route };