From 8b7568bf4f47e946f45dcb30ebcaa38acac309ca Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Tue, 5 Nov 2024 04:30:44 +0800 Subject: [PATCH] feat(route/yande): extend yande post route with popular category (#17319) --- lib/routes/yande/post.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/routes/yande/post.ts b/lib/routes/yande/post.ts index 794bcf613f..07d78aa990 100644 --- a/lib/routes/yande/post.ts +++ b/lib/routes/yande/post.ts @@ -1,13 +1,23 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; export const route: Route = { path: '/post/popular_recent/:period?', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/yande/post/popular_recent/1d', parameters: { - period: '展示时间', + period: { + description: '展示时间', + options: [ + { value: '1d', label: '最近 24 小时' }, + { value: '1w', label: '最近一周' }, + { value: '1m', label: '最近一月' }, + { value: '1y', label: '最近一年' }, + ], + default: '1d', + }, }, radar: [ {