- News Aggregator API Handle searches on The Guardian's and The New York Time's APIs.
- News Aggregator is able to filter from using The Guardian's or The New York Time's API.
- News Aggregator define a common interface for the responses of the APIS.
- Server runs on port 3000.
- On searching over The New York Times' source require a JWT key for authorization!
Maybe you could use this:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1IiwibmFtZSI6IndlZWsiLCJpYXQiOjE1MTYyMzkwMjJ9.JkgkM-dFUzy0cVx9NQOd_d3lg_LtAkOWMhsTqNEhG2k
VERSION | |
---|---|
Node | ^12.16.3 |
Typescript | ^3.7.4 |
Nestjs | ^7.0.0 |
@types/express | ^4.17.6 |
@nestjs/config | ^0.5.0 |
- Important: Only use GET method!
http://localhost:3000/news
PARAMETER | DESCRIPTION | EXAMPLE |
---|---|---|
q | Request content containing this free text. Supports AND, OR and NOT operators. | q=pizza |
oncontent | This query will look for matches in the body of the articles | content=pineapple |
onsecton | Return only content in the sections | onsecton=food |
fromdate | Return only content published on or after that date | fromdate=01/01/2012 |
todate | Return only content published on or before that date | todate=10/12/2012 |
onpage | Return only the result set from a particular page, must be a number | onpage=1 |
nyt | Request only on The New York Times API | nyt=true |
tg | Request only on The Guardian API | tg=true |
Important: By default the API Request on both sources!
Examples :
http://localhost:3000/news?q=pizza&oncontent=pineapple&onsection=food&fromdate=01/01/2012&todate=31/12/2012
http://localhost:3000/news?tg=true