Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added RSS 2.0 example with medias

  • Loading branch information...
commit 4675c9c1db40fdf49e13abae89940f60563eeb03 1 parent 473ca15
@zedtux authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 README.md
View
22 README.md
@@ -18,6 +18,8 @@ Or install it yourself as:
## Usage
+### Simple RSS
+
````ruby
rss = Urss.at("http://www.ruby-lang.org/en/feeds/news.rss")
rss.title
@@ -40,6 +42,26 @@ rss.entries.first.content.truncate(200)
#=> "<p>Ruby 1.9.2-p320 is released.</p><p>This release include Security Fix for RubyGems: SSL server verification failure for remote repository.\nAnd many bugs are fixed in this release.</p> <h2><a name..."
````
+### RSS With medias
+
+````ruby
+rss = Urss.at("http://api.flickr.com/services/feeds/photos_public.gne?id=90313708@N00&lang=en-us&format=rss_200")
+rss.title
+#=> "Uploads from CoolbieRe"
+rss.updated_at
+#=> "Mon, 23 Apr 2012 09:48:57 -0700"
+rss.entries.first.title
+#=> "vertical panorama"
+rss.entries.first.medias.size
+#=> 1
+rss.entries.first.medias.first.title
+#=> "vertical panorama"
+rss.entries.first.medias.first.thumbnail_url
+#=> http://farm9.staticflickr.com/8159/6960539484_56665aba46_s.jpg
+rss.entries.first.medias.first.content_url
+#=> http://farm9.staticflickr.com/8159/6960539484_56665aba46_b.jpg
+````
+
## Contributing
1. Fork it
Please sign in to comment.
Something went wrong with that request. Please try again.