Search code examples
ajaxangularmeteorrssmedium.com-publishing-api

How to set limit for getting items from rss feed?


I'm getting feed from this link. I want to get only first five items from feed. Instead of that I'm getting all of the items from feed. How can I get first five items only ?. Should I pass any parameters with URL ?

HTTP.get('https://buzz.machaao.com/feed',
  (err, res) => {
    if(err) {
      console.log(err);
    }
    else {
      console.log(res);
    }
});

Solution

  • No that is not possible. What you can do though is to make a GET request to https://buzz.machaao.com/latest with Accept: application/json header. You can pass a count parameter to limit the posts.