chore(route): add apnews api tag options

This commit is contained in:
pseudoyu
2024-10-09 11:29:32 +07:00
parent 98b7703e95
commit a86f8f6470
+17 -2
View File
@@ -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',
},
},