synsbasen_api 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/synsbasen_api/api_response.rb +6 -1
- data/lib/synsbasen_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: 0ec09887bb8b74dc5f47f9dcb332df43bc09fe4fcea136ec6d9aeac2b49bacd7
|
4
|
+
data.tar.gz: 0ce055a70a194f3d39f27b4e53dbb8cbb98dac3d1d6a1626c2cbe60c06137158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5626d8778158b88925117cdacd28131dc95fc1571ebe04b9306a1b446ac92d60d4067162ca0801b7105e1b161ed5e1b8773b2ca8dcc684ed670b9130a8a867f
|
7
|
+
data.tar.gz: ad7fba5fe84d5dae76cd87f767e67019e08c050fec7262af4a4ed32fbfc805c275837aede3622f2a417e3f6b36e0b33706b5292c4485bdbd3d07a43e777df094
|
@@ -15,17 +15,22 @@ module SynsbasenApi
|
|
15
15
|
# @return [Numeric] The total number of pages available.
|
16
16
|
attr_reader :total_pages
|
17
17
|
|
18
|
+
# @return [Numeric] The total count of items available.
|
19
|
+
attr_reader :total_count
|
20
|
+
|
18
21
|
# Initializes a new instance of `ApiResponse` with the provided response data.
|
19
22
|
#
|
20
23
|
# @param response [Hash] The response data from the API.
|
21
24
|
# @option response [Hash] :data The data included in the API response.
|
22
25
|
# @option response [Numeric] :cost The cost associated with the API response.
|
23
26
|
# @option response [Boolean] :has_more Indicates whether there is more data available in the response.
|
27
|
+
# @option response [Boolean] :total_pages The total number of pages available.
|
28
|
+
# @option response [Boolean] :total_count The total count of items available.
|
24
29
|
def initialize(response)
|
25
30
|
@data = response[:data]
|
26
31
|
@cost = response[:cost]
|
27
32
|
|
28
|
-
%i[has_more total_pages].each do |key|
|
33
|
+
%i[has_more total_pages total_count].each do |key|
|
29
34
|
instance_variable_set("@#{key}", response[key]) if response.key?(key)
|
30
35
|
end
|
31
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synsbasen_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Poulsen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-01-
|
12
|
+
date: 2024-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|