import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";const n={path:`/community/:id?/:keyword?`,categories:[`other`],example:`/aqara/community`,parameters:{id:`分类 id，可在对应分类页 URL 中找到，默认为全部`,keyword:`关键字，默认为空`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`社区`,maintainers:[`nczitzk`],handler:r};async function r(n){let r=n.req.param(`id`)??``,i=n.req.param(`keyword`)??``,a=n.req.query(`limit`)?Number.parseInt(n.req.query(`limit`)):100,o=`https://community.aqara.com`,s=`${o}/api/v2/feeds?limit=${a}&platedetail_id=${r}&keyword=${i}&all=1`;return{title:`Aqara社区`,link:`${o}/pc/#/post${r?`?id=${r}`:``}`,item:(await t({method:`get`,url:s})).data.map(t=>({title:t.feed_title,link:`${o}/pc/#/post/postDetail/${t.id}`,description:t.feed_content,pubDate:e(t.created_at),author:t.user.nickname})),allowEmpty:!0}}export{n as route};