Class: Picasa::Presenter::Album
- Inherits:
-
Base
- Object
- Base
- Picasa::Presenter::Album
show all
- Defined in:
- lib/picasa/presenter/album.rb
Instance Attribute Summary
Attributes inherited from Base
#parsed_body
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #inspect
Methods included from Utils
array_wrap, inline_query, map_to_boolean, map_to_date, map_to_float, map_to_integer, retrieve, safe_retrieve
Instance Method Details
#access ⇒ String
84
85
86
|
# File 'lib/picasa/presenter/album.rb', line 84
def access
@access ||= safe_retrieve(parsed_body, "gphoto$access")
end
|
#allow_downloads ⇒ true, ...
114
115
116
|
# File 'lib/picasa/presenter/album.rb', line 114
def allow_downloads
@allow_downloads ||= map_to_boolean(safe_retrieve(parsed_body, "gphoto$allowDownloads"))
end
|
#allow_prints ⇒ true, ...
109
110
111
|
# File 'lib/picasa/presenter/album.rb', line 109
def allow_prints
@allow_prints ||= map_to_boolean(safe_retrieve(parsed_body, "gphoto$allowPrints"))
end
|
7
8
9
|
# File 'lib/picasa/presenter/album.rb', line 7
def author
@author ||= Author.new(parsed_body["author"][0])
end
|
#entries ⇒ Array<Presenter::Photo>
Also known as:
photos
12
13
14
|
# File 'lib/picasa/presenter/album.rb', line 12
def entries
@entries ||= array_wrap(safe_retrieve(parsed_body, "entry")).map { |photo| Photo.new(photo) }
end
|
#etag ⇒ String
43
44
45
|
# File 'lib/picasa/presenter/album.rb', line 43
def etag
@etag ||= safe_retrieve(parsed_body, "gd$etag")
end
|
#id ⇒ String
69
70
71
|
# File 'lib/picasa/presenter/album.rb', line 69
def id
@id ||= safe_retrieve(parsed_body, "gphoto$id")
end
|
18
19
20
|
# File 'lib/picasa/presenter/album.rb', line 18
def links
@links ||= array_wrap(safe_retrieve(parsed_body, "link")).map { |link| Link.new(link) }
end
|
#location ⇒ String
79
80
81
|
# File 'lib/picasa/presenter/album.rb', line 79
def location
@location ||= safe_retrieve(parsed_body, "gphoto$location")
end
|
28
29
30
|
# File 'lib/picasa/presenter/album.rb', line 28
def media
@media ||= Media.new(safe_retrieve(parsed_body, "media$group"))
end
|
#name ⇒ String
74
75
76
|
# File 'lib/picasa/presenter/album.rb', line 74
def name
@name ||= safe_retrieve(parsed_body, "gphoto$name")
end
|
#nickname ⇒ String
104
105
106
|
# File 'lib/picasa/presenter/album.rb', line 104
def nickname
@nickname ||= safe_retrieve(parsed_body, "gphoto$nickname")
end
|
#numphotos ⇒ String
94
95
96
|
# File 'lib/picasa/presenter/album.rb', line 94
def numphotos
@numphotos ||= map_to_integer(safe_retrieve(parsed_body, "gphoto$numphotos"))
end
|
#published ⇒ DateTime
33
34
35
|
# File 'lib/picasa/presenter/album.rb', line 33
def published
@published ||= map_to_date(safe_retrieve(parsed_body, "published"))
end
|
#rights ⇒ String
64
65
66
|
# File 'lib/picasa/presenter/album.rb', line 64
def rights
@rights ||= safe_retrieve(parsed_body, "rights")
end
|
#subtitle ⇒ String
Picasa API is not consistent - in show API this field contains summary
59
60
61
|
# File 'lib/picasa/presenter/album.rb', line 59
def subtitle
@subtitle ||= safe_retrieve(parsed_body, "subtitle")
end
|
#summary ⇒ String
53
54
55
|
# File 'lib/picasa/presenter/album.rb', line 53
def summary
@summary ||= safe_retrieve(parsed_body, "summary")
end
|
#timestamp ⇒ String
89
90
91
|
# File 'lib/picasa/presenter/album.rb', line 89
def timestamp
@timestamp ||= (safe_retrieve(parsed_body, "gphoto$timestamp").to_i / 1000).to_s
end
|
#title ⇒ String
48
49
50
|
# File 'lib/picasa/presenter/album.rb', line 48
def title
@title ||= safe_retrieve(parsed_body, "title")
end
|
#total_results ⇒ Integer
23
24
25
|
# File 'lib/picasa/presenter/album.rb', line 23
def total_results
@total_results ||= map_to_integer(safe_retrieve(parsed_body, "openSearch$totalResults"))
end
|
#updated ⇒ DateTime
38
39
40
|
# File 'lib/picasa/presenter/album.rb', line 38
def updated
@updated ||= map_to_date(safe_retrieve(parsed_body, "updated"))
end
|
#user ⇒ String
99
100
101
|
# File 'lib/picasa/presenter/album.rb', line 99
def user
@user ||= safe_retrieve(parsed_body, "gphoto$user")
end
|