ZenfolioAPI 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -118,8 +118,10 @@ module ZenfolioAPI
118
118
  # @param [Integer] group_id 64-bit identifier of the photoset group to load
119
119
  # @param [String] info_level Specifies which Group snapshot fields to return. This parameter is new in API version 1.4.
120
120
  # @param [String] include_children Indicates whether to return immediate group children. This parameter is new in API version 1.4.
121
+ # @return [Array] Returns an array of elements from the group. Elements can be Galleries or Groups.
121
122
  def load_group group_id, info_level = "Full", include_children = "true"
122
123
  @response = api_request 'LoadGroup', [group_id, info_level, include_children]
124
+ raise ZenfolioAPI::ZenfolioAPISessionError, @response['error']['message'] if @response['result'].nil? && @response['error'].length > 0
123
125
 
124
126
  elements = []
125
127
  @response['result']['Elements'].each do |element|
@@ -139,6 +141,8 @@ module ZenfolioAPI
139
141
  :photo_count => element['PhotoCount'], :parent_groups => element['ParentGroups'], :title => element['Title'])
140
142
  end
141
143
  end
144
+
145
+ elements
142
146
  end
143
147
  end
144
148
  end
@@ -1,3 +1,3 @@
1
1
  module ZenfolioAPI
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ZenfolioAPI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-25 00:00:00.000000000 Z
12
+ date: 2013-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec