import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./config-not-found-B9AOp828.mjs";import{n}from"./api-CqqvxBUJ.mjs";const r={path:`/trends/:woeid?`,categories:[`social-media`],example:`/twitter/trends/23424856`,parameters:{woeid:`Yahoo! Where On Earth ID. default to woeid=1 (World Wide)`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`Trends`,maintainers:[`sakamossan`],handler:i};async function i(r){if(!e.twitter||!e.twitter.consumerKey||!e.twitter.consumerSecret)throw new t(`Twitter RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>`);let i=r.req.param(`woeid`)??1,a=await(await n()).v1.get(`trends/place.json`,{id:i}),[{trends:o}]=a;return{title:`Twitter Trends on ${a[0].locations[0].name}`,link:`https://x.com/i/trends`,item:o.filter(e=>!e.promoted_content).map(e=>({title:e.name,link:e.url,description:e.name+(e.tweet_volume?` (${e.tweet_volume})`:``)}))}}export{r as route};