From b23bb632290efb28e5fe1ef4fc0761fb4e08c691 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 22 Jul 2024 11:38:05 +0800 Subject: [PATCH] feat: rss3 route docs --- lib/routes/rss3/index.ts | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/lib/routes/rss3/index.ts b/lib/routes/rss3/index.ts index 30287dce4976f3..38ee8907cca5da 100644 --- a/lib/routes/rss3/index.ts +++ b/lib/routes/rss3/index.ts @@ -17,64 +17,74 @@ export const route: Route = { }, network: { description: 'Retrieve activities from the specified network.', + default: 'all', options: [ + { + value: 'all', + label: 'All', + }, { value: 'arbitrum', - label: 'arbitrum', + label: 'Arbitrum', }, { value: 'arweave', - label: 'arweave', + label: 'Arweave', }, { value: 'avax', - label: 'avax', + label: 'Avax', }, { value: 'base', - label: 'base', + label: 'Base', }, { value: 'binance-smart-chain', - label: 'binance-smart-chain', + label: 'Binance Smart Chain', }, { value: 'crossbell', - label: 'crossbell', + label: 'Crossbell', }, { value: 'ethereum', - label: 'ethereum', + label: 'Ethereum', }, { value: 'farcaster', - label: 'farcaster', + label: 'Farcaster', }, { value: 'gnosis', - label: 'gnosis', + label: 'Gnosis', }, { value: 'linea', - label: 'linea', + label: 'Linea', }, { value: 'optimism', - label: 'optimism', + label: 'Optimism', }, { value: 'polygon', - label: 'polygon', + label: 'Polygon', }, { value: 'vsl', - label: 'vsl', + label: 'VSL', }, ], }, tag: { description: 'Retrieve activities from the specified tag.', + default: 'all', options: [ + { + value: 'all', + label: 'All', + }, { value: 'collectible', label: 'collectible', @@ -114,8 +124,8 @@ async function handler(ctx) { const { data } = await ofetch( `https://gi.rss3.io/decentralized/${account}?${new URLSearchParams({ limit: '20', - ...(network && { network }), - ...(tag && { tag }), + ...(network && network !== 'all' && { network }), + ...(tag && tag !== 'all' && { tag }), })}` );