checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA256:
3
- metadata.gz: d6eb8595b53bd765cb23745ba69474537f573d5359eec2d381e21bfba4d906c6
4
- data.tar.gz: 57868385f03594a028c6140389be0f92b5899ec6953cd0d4a7f504122da2301d
3
+ metadata.gz: bb7f29450cced9fd421dd64c7dacf109d3e3fe93245f19bfcec695b98491f559
4
+ data.tar.gz: d1db2105b3f6566f74b71476e089d9691ad9f8f5b3ff08e27801668d172dd6ac
5
5
SHA512:
6
- metadata.gz: 72304befa0ab9ad0a0ac92b0112d3a37f2b0176f7940d6167eb761be8aadec2de30c12942ad6b495dd39da35a2d47153b769e2d2b7be41f3f71635c7a1afeee2
7
- data.tar.gz: f927605bda707be196eeb7ff18987f4fd6737d2ba6c619e331b8c12832079051663445477ff57ffe2bfd79ca5bf38851b79c379f90d136eba22d448252f1517f
6
+ metadata.gz: b147725c2c13a0ef72771380a9e55518983d2876b6d90a94af2917ca9fe59ef297123ed4ec8d52b2c9cf41f51536b4b3ce0541321e91d8f8649c140de7a031d5
7
+ data.tar.gz: dbaaa1cd7d9d57cd1d78be0e50e21b27723da7b35f6993cfea5c61b882564abb44c1027461ea4fd7f4794ad3b72f11e068cdb0a50cd6904d01f9badcfa8e76af
data/lib/kennel/api.rb CHANGED
@@ -13,7 +13,22 @@ module Kennel
13
13
end
14
14
15
15
def list(api_resource, params = {})
16
- request :get, "/api/v1/#{api_resource}", params: params
16
+ if api_resource == "slo"
17
+ raise ArgumentError if params[:limit] || params[:offset]
18
+ limit = 1000
19
+ offset = 0
20
+ all = []
21
+
22
+ loop do
23
+ result = request :get, "/api/v1/#{api_resource}", params: params.merge(limit: limit, offset: offset)
24
+ data = result.fetch(:data)
25
+ all.concat data
26
+ break all if data.size < limit
27
+ offset += limit
28
+ end
29
+ else
30
+ request :get, "/api/v1/#{api_resource}", params: params
31
+ end
17
32
end
18
33
19
34
def create(api_resource, attributes)
data/lib/kennel/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
# frozen_string_literal: true
2
2
module Kennel
3
- VERSION = "1.58.3"
3
+ VERSION = "1.58.4"
4
4
end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: kennel
3
3
version: !ruby/object:Gem::Version
4
- version: 1.58.3
4
+ version: 1.58.4
5
5
platform: ruby
6
6
authors:
7
7
- Michael Grosser