class Api::RssController < ApiController
  resource_description do
    short "RSS feeds"
    formats [ "xml" ]
  end

  api :GET, "/api/rss/blog", "Blog RSS feed"
  returns code: 200, desc: "RSS XML feed of blog posts"
  def blog
    xml = RssService.new.blog_feed
    render xml: xml, content_type: "application/rss+xml"
  end

  api :GET, "/api/rss/releases", "Software releases RSS feed"
  returns code: 200, desc: "RSS XML feed of software releases"
  def releases
    xml = RssService.new.releases_feed
    render xml: xml, content_type: "application/rss+xml"
  end

  api :GET, "/api/rss/howtos", "HowTos RSS feed"
  returns code: 200, desc: "RSS XML feed of tech howtos"
  def howtos
    xml = RssService.new.howtos_feed
    render xml: xml, content_type: "application/rss+xml"
  end
end
