TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'yandex_rss'
And then execute:
$ bundle
Or install it yourself as:
$ gem install yandex_rss
add this code to your model (set feed variables and map feed attributes)
yandex_rss total: 20, #optional, default 20, max 100
channel: {
title: 'Site title here',
link: 'Site url here',
description: 'Site description here',
image: {
url: 'http://website.com/logo.png',
title: 'Site title here',
link: 'Site url here'
}
},
attributes: {
title: :name,
link: :path,
pdalink: :pda_path,
description: :body,
author: :username,
category: :section_name,
pub_date: :published_at,
genre: 'Horror',
full_text: :body_full},
assets: {
collection_method: :publication_pictures,
collection_items_methods: {
url: :link,
is_video: false #true or false - optional
}
},
related: {
collection_method: '',
collection_items_methods: {
url: '',
name: ''
}
}
go to the /yandex_rss
path and see if you get what you need
- Fork it ( https://github.com/[my-github-username]/yandex_rss/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request