lib/picasa.rb in morgoth-picasa-0.1.0 vs lib/picasa.rb in morgoth-picasa-0.1.1

- old
+ new

@@ -1,11 +1,10 @@ module Picasa require 'net/http' require "xmlsimple" def albums(google_user) - #returns [ {:id => "id", :title => "title"}, {another one} ] http=Net::HTTP.new('picasaweb.google.com') resp, data = http.get("/data/feed/api/user/#{google_user}") xml=XmlSimple.xml_in(data, 'KeyAttr' => 'name') albums = [] xml['entry'].each do |album| @@ -17,10 +16,9 @@ end albums end def photos(google_user, album_id) - #returns {:photos => [:title, :thumbnail, :photo], :slideshow => "link to picasa slideshow"} http=Net::HTTP.new('picasaweb.google.com') resp, data = http.get("/data/feed/api/user/#{google_user}/albumid/#{album_id}") xml=XmlSimple.xml_in(data, 'KeyAttr' => 'name') photos = [] xml['entry'].each do |photo|