public final class RssMethods extends Object
A TORO utility class for RSS related operations
RSS (Really Simple Syndication)uses a family of standard web feed formats to publish frequently updated information: blog entries, news headlines, audio, video. This simplifies the process of getting the content of a RSS feed.
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.property.GloopModel |
readRss(String url) |
static io.toro.gloop.object.property.GloopModel |
readRss(String url,
boolean onlyNew) |
static com.rometools.rome.feed.synd.SyndFeed |
rss(String url)
Used to read RSS feeds.
|
static com.rometools.rome.feed.synd.SyndFeed |
rss(String url,
boolean onlyNew)
Used to read RSS feeds.
|
static String |
rssToString(io.toro.gloop.object.property.GloopModel feedModel) |
static void |
rssToWriter(io.toro.gloop.object.property.GloopModel feedModel,
Writer writer) |
public static com.rometools.rome.feed.synd.SyndFeed rss(String url)
Used to read RSS feeds. Note:Martini Runtime will cache previously loaded entries for any RSS URL loaded at <esb.home>/data/rss.
Example Usage:
def feed = 'http://news.google.com/?output=rss'.rss( feed.entries.each { println it.title }url
- The URL to parsepublic static com.rometools.rome.feed.synd.SyndFeed rss(String url, boolean onlyNew)
Used to read RSS feeds.
Note:Martini Runtime will cache previously loaded entries for any RSS URL loaded at <esb.home>/data/rss.
Example Usage:
def feed = 'http://news.google.com/?output=rss'.rss(false) feed.entries.each { println it.title }
url
- the RSS URL to parseonlyNew
- filter out previously loaded RSS items.@GloopComment(value="Used to read RSS feeds. Note: Martini Runtime will cache previously loaded entries for any RSS URL loaded at <esb.home>/data/rss - This will only load new entries") @GloopObjectParameter(value="output{\n RSSFeed#io.toro.martini.rss.Feed{\n }\n}") public static io.toro.gloop.object.property.GloopModel readRss(@GloopParameter(allowNull=false) String url)
@GloopComment(value="Used to read RSS feeds. Note: Martini Runtime will cache previously loaded entries for any RSS URL loaded at <esb.home>/data/rss") @GloopObjectParameter(value="output{\n RSSFeed#io.toro.martini.rss.Feed{\n }\n}") public static io.toro.gloop.object.property.GloopModel readRss(@GloopParameter(allowNull=false) String url, boolean onlyNew)
@GloopComment(value="Used to output Gloop RSS models to strings.") public static String rssToString(@GloopParameter(allowNull=false) io.toro.gloop.object.property.GloopModel feedModel) throws IOException, com.rometools.rome.io.FeedException
IOException
com.rometools.rome.io.FeedException
@GloopComment(value="Used to output Gloop RSS models to a writer.") public static void rssToWriter(@GloopParameter(allowNull=false) io.toro.gloop.object.property.GloopModel feedModel, @GloopParameter(allowNull=false) Writer writer) throws IOException, com.rometools.rome.io.FeedException
IOException
com.rometools.rome.io.FeedException
Copyright © 2019. All rights reserved.