innologix 0.0.10 → 0.0.11
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/innologix/m2m.rb +15 -6
- data/lib/innologix/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7e5f0d5a63cca96b05ff3a5ffb507bc9382aa85
|
4
|
+
data.tar.gz: 0de87192287961b769e2a709b4d556137e1ea609
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c568803e05b6c0eb9e5c4cb7799a4bb1e959b1251f9846402c73ba351a8411b6231729e0c78c7c2929d18b0669b56f215ffba391a1e3ab7da9cdc303b4e8b240
|
7
|
+
data.tar.gz: d9a36a88aceeb8a39426ff0b39e104deda59e6f1f26dc9ad66112460c82f7f990e3841ecaca42ace141056034d5e5d2338514952629ce27c1406f7581750bee5
|
data/lib/innologix/m2m.rb
CHANGED
@@ -9,7 +9,6 @@ module Innologix
|
|
9
9
|
attr_accessor :updated_at
|
10
10
|
|
11
11
|
attr_accessor :group
|
12
|
-
attr_accessor :devices
|
13
12
|
|
14
13
|
attr_accessor :client
|
15
14
|
attr_accessor :error
|
@@ -155,13 +154,23 @@ module Innologix
|
|
155
154
|
if attributes[:group] != nil
|
156
155
|
m2m.group = Innologix::Group.new(attributes[:group])
|
157
156
|
end
|
158
|
-
m2m
|
159
|
-
|
160
|
-
|
161
|
-
|
157
|
+
m2m
|
158
|
+
end
|
159
|
+
|
160
|
+
def devices(offset = 0, limit = 10)
|
161
|
+
path = '/devices'
|
162
|
+
method = 'get'
|
163
|
+
options = {query_params: {m2m_id: self.id, offset: offset, limit: limit}}
|
164
|
+
result = client.call_api(path, method, options)
|
165
|
+
if result[:error].nil?
|
166
|
+
list =[]
|
167
|
+
result[:devices].each do |device|
|
168
|
+
list.push(Innologix::Device.new(device))
|
162
169
|
end
|
170
|
+
list
|
171
|
+
else
|
172
|
+
RequestError.new(result)
|
163
173
|
end
|
164
|
-
m2m
|
165
174
|
end
|
166
175
|
end
|
167
176
|
end
|
data/lib/innologix/version.rb
CHANGED