News-API-gh / News-API-node

Our officially supported Node client library for accessing News API.
MIT License
42 stars 3 forks source link

todpHeadLines pageSize not working #4

Open AlbertoCrespoGuzman opened 6 years ago

AlbertoCrespoGuzman commented 6 years ago

I am trying to receive just 10 news using this:

function getNew(){ newsapi.v2.topHeadlines({ category: 'general', country: 'br', pageSize: 10 }).then(response => { }); }

But I am receiving 20 news. 'pageSize' seems not to be working. Thanks

kakul232 commented 6 years ago

its working Very Fine

this.news.newsapi.v2.topHeadlines({
      country: 'in',
      category:this.category,
      pageSize:5,

    }).then(response => {

      this.Categorynews = response.articles;

      /*
        {
          status: "ok",
          sources: [...]
        }
      */
    });