import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{t as r}from"./config-not-found-B9AOp828.mjs";import{i,n as a,r as o,t as s}from"./utils-JPOGWCkW2.mjs";import c from"query-string";function l(e,t){return o(`https://app-api.pixiv.net/v1/user/illusts`,{headers:{...i,Authorization:`Bearer `+t},searchParams:c.stringify({user_id:e,filter:`for_ios`})})}const u={path:`/user/:id`,categories:[`social-media`],view:2,example:`/pixiv/user/15288095`,parameters:{id:`user id, available in user's homepage URL`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1,nsfw:!0},radar:[{source:[`www.pixiv.net/users/:id`,`www.pixiv.net/en/users/:id`]}],name:`User Activity`,maintainers:[`DIYgod`],handler:d};async function d(i){if(!e.pixiv||!e.pixiv.refreshToken)throw new r(`pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>`);let o=i.req.param(`id`),c=await a(t.tryGet);if(!c)throw new r(`pixiv not login`);let u=(await l(o,c)).data.illusts,d=u[0].user.name;return{title:`${d} 的 pixiv 动态`,link:`https://www.pixiv.net/users/${o}`,image:s.getProxiedImageUrl(u[0].user.profile_image_urls.medium),description:`${d} 的 pixiv 最新动态`,item:u.map(e=>{let t=s.getImgs(e);return{title:e.title,author:d,pubDate:n(e.create_date),description:`${e.caption}<br><p>画师：${d} - 阅览数：${e.total_view} - 收藏数：${e.total_bookmarks}</p>${t.join(``)}`,link:`https://www.pixiv.net/artworks/${e.id}`,category:e.tags.map(e=>e.name)}})}}export{u as route};