Class RssMethods


  • public final class RssMethods
    extends Object

    Contains one-liners for RSS-related operations.

    • Method Detail

      • rss

        public static SyndFeed rss​(String url)

        Read and return an RSS feed from a URL. Loaded entries for any RSS URL will be cached at ${martini-home}/data/rss. Only new RSS feed items will be returned by this one-liner.

        Example usage:

         def feed = 'http://news.google.com/?output=rss'.rss()
         def titles = feed.entries.collect {
             it.title
         }
         

        Parameters:
        url - the URL where the RSS feed will be read from
        Returns:
        the RSS feed from the provided URL
        Since:
        1.0
      • rss

        public static SyndFeed rss​(String url,
                                   boolean onlyNew)

        Read and return an RSS feed from a URL. Loaded entries for any RSS URL will be cached at ${martini-home}/data/rss.

        Example usage:

         def feed = 'http://news.google.com/?output=rss'.rss( false )
         def titles = feed.entries.collect {
             it.title
         }
         

        Parameters:
        url - the URL where the RSS feed will be read from
        onlyNew - flag determining whether or not only new RSS feed items will be included in the returned feed
        Returns:
        the RSS feed from the provided URL
        Since:
        1.0
      • readRss

        @GloopObjectParameter("output{\n  RSSFeed#io.toro.martini.rss.Feed{\n  }\n}")
        public static GloopModel readRss​(@GloopParameter(allowNull=false)
                                         String url)

        Read and return an RSS feed from a URL. Loaded entries for any RSS URL will be cached at ${martini-home}/data/rss. Only new RSS feed items will be returned by this one-liner.

        Example usage:

         def feed = 'http://news.google.com/?output=rss'.rss()
         def titles = feed.entries.collect {
             it.title
         }
         

        Parameters:
        url - the URL where the RSS feed will be read from
        Returns:
        the RSS feed from the provided URL
        Since:
        1.0
      • readRss

        @GloopObjectParameter("output{\n  RSSFeed#io.toro.martini.rss.Feed{\n  }\n}")
        public static GloopModel readRss​(@GloopParameter(allowNull=false)
                                         String url,
                                         boolean onlyNew)

        Read and return an RSS feed from a URL. Loaded entries for any RSS URL will be cached at ${martini-home}/data/rss.

        Example usage:

         def feed = 'http://news.google.com/?output=rss'.rss( false )
         def titles = feed.entries.collect {
             it.title
         }
         

        Parameters:
        url - the URL where the RSS feed will be read from
        onlyNew - flag determining whether or not only new RSS feed items will be included in the returned feed
        Returns:
        the RSS feed from the provided URL
        Since:
        1.0