module AeRssMaker

Constants

VERSION

Public Instance Methods

kwkm(id, password) click to toggle source
# File lib/ae_rss_maker.rb, line 19
def kwkm(id, password)
  feeds = Kwkm.fetch(id, password)
  make(feeds, title: 'Kwkm')
end
make(feeds, opts={}) click to toggle source
# File lib/ae_rss_maker/make.rb, line 7
def make(feeds, opts={})
  title = opts[:title].nil? ? '' : " | #{opts[:title]}"
  RSS::Maker.make('atom') do |maker|
    maker.channel.author = 'Momoiro Clover Z'
    maker.channel.updated = Time.now.to_s
    maker.channel.about = 'http://fc.momoclo.net/pc/'
    maker.channel.title = "ANGEL EYES#{title}"

    feeds.each do |feed|
      maker.items.new_item do |item|
        item.link = feed.url
        item.title = feed.title
        item.updated = feed.date
        item.description = feed.description
      end
    end
  end
end
momorikobuta(id, password) click to toggle source
# File lib/ae_rss_maker.rb, line 24
def momorikobuta(id, password)
  feeds = Momorikobuta.fetch(id, password)
  make(feeds, title: 'Momorikobuta')
end
news(id, password) click to toggle source
# File lib/ae_rss_maker.rb, line 14
def news(id, password)
  feeds = News.fetch(id, password)
  make(feeds, title: 'News')
end