From a86f8f647043805fc4e427422c70ed03ac71c791 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Wed, 9 Oct 2024 11:29:32 +0700 Subject: [PATCH] chore(route): add apnews api tag options --- lib/routes/apnews/api.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/routes/apnews/api.ts b/lib/routes/apnews/api.ts index db520c2c5028cc..c0c0372f4b6590 100644 --- a/lib/routes/apnews/api.ts +++ b/lib/routes/apnews/api.ts @@ -7,11 +7,26 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/api/:tags?', categories: ['traditional-media', 'popular'], - example: '/apnews/api/business', + example: '/apnews/api/apf-topnews', view: ViewType.Articles, parameters: { tags: { - description: 'Getting a list of articles from a public API based on tags. See https://github.com/kovidgoyal/calibre/blob/81666219718b5f57d56b149a7ac017cc2a76b931/recipes/ap.recipe#L43-L46', + description: 'Getting a list of articles from a public API based on tags.', + options: [ + { value: 'apf-topnews', label: 'Top News' }, + { value: 'apf-sports', label: 'Sports' }, + { value: 'apf-politics', label: 'Politics' }, + { value: 'apf-entertainment', label: 'Entertainment' }, + { value: 'apf-usnews', label: 'US News' }, + { value: 'apf-oddities', label: 'Oddities' }, + { value: 'apf-Travel', label: 'Travel' }, + { value: 'apf-technology', label: 'Technology' }, + { value: 'apf-lifestyle', label: 'Lifestyle' }, + { value: 'apf-business', label: 'Business' }, + { value: 'apf-Health', label: 'Health' }, + { value: 'apf-science', label: 'Science' }, + { value: 'apf-intlnews', label: 'International News' }, + ], default: 'apf-topnews', }, },