Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added id attribute to photo

  • Loading branch information...
commit 9b7c963b2ffdfc8cfa13774d4247ec2b185931ff 1 parent 55a930e
@morgoth authored
Showing with 2 additions and 0 deletions.
  1. +1 −0  lib/picasa/web_albums.rb
  2. +1 −0  test/test_web_albums.rb
View
1  lib/picasa/web_albums.rb
@@ -32,6 +32,7 @@ def photos(album_id)
photos = []
xml["entry"].each do |photo|
attributes = {}
+ attributes[:id] = photo["id"][1]
attributes[:title] = photo["group"][0]["description"][0]["content"]
attributes[:thumbnail_1] = photo["group"][0]["thumbnail"][0]["url"]
attributes[:thumbnail_2] = photo["group"][0]["thumbnail"][1]["url"]
View
1  test/test_web_albums.rb
@@ -22,6 +22,7 @@
photos = Picasa.photos(:google_user => "some.user", :album_id => "666")
assert_equal 10, photos[:photos].count
refute_nil photos[:slideshow]
+ refute_nil photos[:photos].first[:id]
refute_nil photos[:photos].first[:thumbnail_1]
refute_nil photos[:photos].first[:thumbnail_2]
refute_nil photos[:photos].first[:thumbnail_3]
Please sign in to comment.
Something went wrong with that request. Please try again.