picasawebalbums 1.1.3 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -0
- data/lib/PicasaWebAlbums/version.rb +1 -1
- data/lib/domain/album.rb +1 -1
- data/lib/domain/photo.rb +1 -1
- data/lib/repositories/albums_repository.rb +5 -0
- data/lib/repositories/photos_repository.rb +5 -0
- data/test/test_photos.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
data/lib/domain/album.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module PicasaWebAlbums
|
2
2
|
class Album
|
3
|
-
attr_accessor :id, :photos, :title, :slug, :date_created, :date_updated, :cover_photo_url, :description
|
3
|
+
attr_accessor :id, :photos, :title, :slug, :date_created, :date_updated, :cover_photo_url, :description, :access, :number_of_photos, :number_of_comments, :number_of_photos_remaining, :total_bytes
|
4
4
|
|
5
5
|
def initialize
|
6
6
|
@photos = []
|
data/lib/domain/photo.rb
CHANGED
@@ -12,6 +12,11 @@ module AlbumsRepository
|
|
12
12
|
gallery.date_created = DateTime.parse(entry.elements["published"].text)
|
13
13
|
gallery.date_updated = DateTime.parse(entry.elements["updated"].text)
|
14
14
|
gallery.slug = entry.elements["gphoto:name"].text
|
15
|
+
gallery.access = entry.elements["gphoto:access"].text
|
16
|
+
gallery.number_of_photos = entry.elements["gphoto:numphotos"].text.to_i
|
17
|
+
gallery.number_of_comments = entry.elements["gphoto:commentCount"].text.to_i
|
18
|
+
gallery.number_of_photos_remaining = entry.elements["gphoto:numphotosremaining"].text.to_i
|
19
|
+
gallery.total_bytes = entry.elements["gphoto:bytesUsed"].text.to_i
|
15
20
|
gallery.cover_photo_url = entry.elements["media:group/media:content"].attributes["url"]
|
16
21
|
gallery.description = entry.elements["media:group/media:description"].text
|
17
22
|
albums << gallery
|
@@ -42,6 +42,11 @@ module PhotosRepository
|
|
42
42
|
else
|
43
43
|
photo.id = get_photo_id_from_photo_id_url(entry.elements["id"].text)
|
44
44
|
end
|
45
|
+
# TODO: Request that google put the size in the feed that retrieves photos by album id
|
46
|
+
# so that retrieving by tag isn't the only way to get the photo size.
|
47
|
+
#if (entry.elements["gphoto:size"] != nil && entry.elements["gphoto:size"].text != "")
|
48
|
+
# photo.bytes = entry.elements["gphoto:size"].text.to_i
|
49
|
+
#end
|
45
50
|
photo.url = entry.elements["media:group/media:content"].attributes["url"]
|
46
51
|
photo.width = entry.elements["media:group/media:content"].attributes["width"].to_i
|
47
52
|
photo.height = entry.elements["media:group/media:content"].attributes["height"].to_i
|
data/test/test_photos.rb
CHANGED