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 CHANGED
@@ -84,6 +84,11 @@ Domain Object Properties
84
84
  - `date_updated`
85
85
  - `cover_photo_url`
86
86
  - `description`
87
+ - `access`
88
+ - `number_of_photos`
89
+ - `number_of_comments`
90
+ - `number_of_photos_remaining`
91
+ - `total_bytes`
87
92
 
88
93
  ### Tag
89
94
 
@@ -1,3 +1,3 @@
1
1
  module PicasaWebAlbums
2
- VERSION = "1.1.3"
2
+ VERSION = "1.2.3"
3
3
  end
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
@@ -1,5 +1,5 @@
1
1
  module PicasaWebAlbums
2
2
  class Photo
3
- attr_accessor :id, :url, :caption, :width, :height, :file_name
3
+ attr_accessor :id, :url, :caption, :width, :height, :file_name #, :bytes
4
4
  end
5
5
  end
@@ -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
@@ -21,7 +21,7 @@ module PicasaWebAlbums
21
21
  end
22
22
 
23
23
  def test_get_photos_by_tags
24
- photos = @repo.get_photos_by_tags(['penny'])
24
+ photos = @repo.get_photos_by_tags(['leonard'])
25
25
  assert photos.count > 0
26
26
  end
27
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picasawebalbums
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: