ecoportal-api 0.5.3 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a89994e76cf541159975756271aa254c709696347e1a5eb9b2181dbea8b54d25
4
- data.tar.gz: 4ef1d5c9ad068faad4922fac5dae85f6fc6e629271b0680c1ee5010a4aadf424
3
+ metadata.gz: 1ab199a043ed1a5eb7e9fc093438ab18d6f096268954a2d9d5fdffff1213a055
4
+ data.tar.gz: 49bc4860aaf99eaf89262c4cdb5445a4803252b687ef94881baa1b2ce424ef97
5
5
  SHA512:
6
- metadata.gz: 21db065f98ef0aa1afe59b5b4766474691eaad98c78d0175f7d1161585f8f8bfa07426ee9edd4f056439e5dffc1d94bd608a2124411bd68fc051537b11048aa5
7
- data.tar.gz: 32b98b96710d3147ab2fde5f32b982e2d8a3ea234cd8c2c1eb707bdb98cf46a62a9f905caae2cfeb2889b62793bb1285c5c8215598da917f7ff944f951328828
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 `results_from:` of `params:`.
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
- results_from = nil
34
+ cursor_id = nil
35
35
  loop do
36
- params.update(results_from: results_from) if results_from
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 (results_from = response.body["next_results_from"])
42
+ break unless (cursor_id = response.body["cursor_id"])
43
43
  end
44
44
  self
45
45
  end
@@ -1,5 +1,5 @@
1
1
  module Ecoportal
2
2
  module API
3
- VERSION = "0.5.3"
3
+ VERSION = "0.5.5"
4
4
  end
5
5
  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.3
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-16 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler