rss - Rails - feedjira get last n news -


is there method of feedjira gets last n news rss feed? (i have looked on api find similar).

is there way of getting last n news feedjira?

it doesn't appear feedjira has option limiting number of results. now, you'll need limit them yourself. like:

limit   = 5 feed    = feedjira::feed.fetch_and_parse('http://velocitylabs.io/feed.xml') entries = feed.entries[0..(limit-1)] 

be aware fetch_and_parse method inconsistent in it's return values, if not successful, may need checks around that.

e.g., return 0 if url param string, hash if url param array

you might consider submitting issue , pull request project :)


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -