ecoportal-api 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ecoportal/api/v1/people.rb +4 -4
- data/lib/ecoportal/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ab199a043ed1a5eb7e9fc093438ab18d6f096268954a2d9d5fdffff1213a055
|
4
|
+
data.tar.gz: 49bc4860aaf99eaf89262c4cdb5445a4803252b687ef94881baa1b2ce424ef97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b15f3130c94ad5c11e8ab5309139b65d41e7049bb9c07e460737ef0d64f5cf3f634acc491579d3aae33b238192c7d35768bc0e268cd117ca4277c364bd87bda6
|
7
|
+
data.tar.gz: 1f821c872aa39b6b6a6bdc7632033ef3872c802ff83a1fca6b4f36c94af34020ccfe62ca0f0081c68f8d760be91e1e3b34cd3b46ebc4123ab08907a003d9493f
|
@@ -22,7 +22,7 @@ module Ecoportal
|
|
22
22
|
|
23
23
|
# Iterates all the people of the organization.
|
24
24
|
# @note
|
25
|
-
# - it ignores the key `
|
25
|
+
# - it ignores the key `cursor_id:` of `params:`.
|
26
26
|
# - `each` is called by `to_a`
|
27
27
|
# @param params [Hash]
|
28
28
|
# @option params [String] :per_page the number of people you get per request.
|
@@ -31,15 +31,15 @@ module Ecoportal
|
|
31
31
|
# @yieldparam person [Person]
|
32
32
|
def each(params: {}, &block)
|
33
33
|
return to_enum(:each) unless block
|
34
|
-
|
34
|
+
cursor_id = nil
|
35
35
|
loop do
|
36
|
-
params.update(
|
36
|
+
params.update(cursor_id: cursor_id) if cursor_id
|
37
37
|
response = client.get("/people", params: params)
|
38
38
|
raise "Request failed." unless response.success?
|
39
39
|
response.body["results"].each do |person|
|
40
40
|
yield person_class.new(person)
|
41
41
|
end
|
42
|
-
break unless (
|
42
|
+
break unless (cursor_id = response.body["cursor_id"])
|
43
43
|
end
|
44
44
|
self
|
45
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecoportal-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tapio Saarinen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|