bzarras / newsapi

A promise-based node interface for NewsAPI
MIT License
146 stars 39 forks source link

Suggestions for newsapi #29

Closed Flynx7 closed 4 years ago

Flynx7 commented 4 years ago

Hello @bzarras . I am facing an issue. I am using the nodejs client with discord.js. However it doesn't depend on the module discord.js. What I am trying to ask is why does it gimme the error Cannot read property 'everything' of undefined??? Hope you will help.

bzarras commented 4 years ago

Hi @Flynx7 , can you please provide a code snippet or example of how you are using newsapi? That will help me better understand the issue you are seeing

Flynx7 commented 4 years ago

Hello @bzarras ! Thank you for contacting me! Well, I solved the issue and it is working FINE! Since I have no issue now, I would like to ask a question. How do I get BREAKING NEWS into my app? I am using nodejs. I would like to suggest an endpoint for breakingNews.... And when you do add more endpoints, please don't change the syntax... Like, I mean, in v2 it is newsapi.v2.everything. Please keep it in the same format, that is, newsapi.v3.breakingNews. Hope you will value my suggestions. Thank you.

bzarras commented 4 years ago

Glad you resolved the issue. As for adding new capabilities, I have no affiliation with the underlying API provider, NewsAPI.org. I just maintain this JS library. You would need to contact them directly to request a new endpoint like that.

According to their docs though, it looks like the top-headlines endpoint might give you breaking news. You can call it with this library via newsapi.v2.topHeadlines.