lotus-1 / WebAppNews-AME

News headlines web app
0 stars 1 forks source link

Fix the API call in the backend #19

Closed shiryz closed 5 years ago

shiryz commented 5 years ago

https://github.com/lotus-1/WebAppNews-AME/blob/master/src/handler.js#L46

If you look at the docs you'll find that you're missing a category in the url you're using So your call should look something like this ...newsapi.org/v2/top-headlines?country=us&category=business&apiKey=API_KEY

You need to specify the country you're looking for news in and then choose a category based on user input

enasskmal commented 5 years ago

It's true I know. We did not have time to do both. If we had time, we would make the second one. And also add the list of shortcuts to the countries to facilitate the user.