Sha256: 4f012ea6668b5e1a06230cd89f22fd04885bacfa566a878033475afd1c8b9264
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
module Smirk class Album < Client def initialize(session_id, info) info.each do |key, value| instance_variable_set("@#{key.downcase}", value) Album.instance_eval do attr_reader key.downcase.to_sym end end @session_id = session_id end def images(heavy = false) params = default_params.merge!({:method => "smugmug.images.get", :AlbumID => id, :AlbumKey => key, :Heavy => heavy}) json = get(params)["Album"]["Images"] json.inject([]) do |images, i| images << Smirk::Image.new(@session_id, i) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
smirk-0.0.6 | lib/smirk/album.rb |
smirk-0.0.5 | lib/smirk/album.rb |