Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pdabrowski6/wordprss
A simple Ruby interface for pulling a RSS feed of any blog with the wordpress engine
https://github.com/pdabrowski6/wordprss
Last synced: 7 days ago
JSON representation
A simple Ruby interface for pulling a RSS feed of any blog with the wordpress engine
- Host: GitHub
- URL: https://github.com/pdabrowski6/wordprss
- Owner: pdabrowski6
- License: mit
- Created: 2018-04-13T11:41:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-22T16:03:36.000Z (over 6 years ago)
- Last Synced: 2024-10-31T12:59:58.572Z (15 days ago)
- Language: Ruby
- Size: 7.81 KB
- Stars: 19
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# The WordpRSS Ruby gem
A simple interface for pulling a RSS feed of any blog with the wordpress engine
## Installation
gem install wordprss## Usage Examples
All you have to do is to subscribe to a given RSS feed and then you can access its data:
```ruby
feed = WordpRSS::Channel.subscribe("http://pdabrowski.com/blog")
```If you are not sure if the given blog is a wordpress engine, you can check this before subscribing to the channel:
```ruby
WordpRSS::Channel.wordpress_rss_feed?("http://pdabrowski.com/blog")
```**Access feed data**
You can access the feed attributes:
```ruby
feed.title # => "Ruby on Rails and Stuff by Paweł Dąbrowski"
feed.description # => "Web development with Ruby on Rails"
```**Access feed items**
Each feed have 10 items by the default:
```ruby
items = feed.items
items.size # => 10last_article = items.first
last_article.title # => "3 things that slow down and make your RSpec tests worse"
last_article.link # => "http://pdabrowski.com/blog/ruby-on-rails/testing/3-things-that-slow-down-and-make-your-rspec-tests-worse/"
last_article.published_at # => "Wed, 21 Mar 2018 05:25:15 +0000"
last_article.creator # => "Paweł Dąbrowski"
last_article.description # => "There are a lot of things that can slow down your tests – some of them are related to your code and some not."
last_article.tags # => ["Ruby on Rails", "RSpec"]
```## Supported Ruby Versions
This gem was tested on the 2.5.0 version. If it's not working with older versions please add a new issue.## Copyright
Copyright (c) 2018 Paweł Dąbrowski.
See [LICENSE][] for details.[license]: LICENSE.md