Skip to content

Commit

Permalink
chore(route): add apnews api tag options
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Oct 9, 2024
1 parent 98b7703 commit a86f8f6
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions lib/routes/apnews/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
Expand Down

0 comments on commit a86f8f6

Please sign in to comment.