innologix 0.0.14 → 0.0.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e5eac39c96187672743b1c6c689f4d0d4962cbe
4
- data.tar.gz: 062c503083572e20fc907ade02ed7efe01a2a5f6
3
+ metadata.gz: d471d1502e5ddbbf230c371a3c7b4fd8c2449fe6
4
+ data.tar.gz: 9b26ef40f7ff9d715b689208ecd55676683bf378
5
5
  SHA512:
6
- metadata.gz: f0c5096a9ee9690d80ce03555209624e746c198aeb36d9d474220db61bd1dd73ec3ddb60bf4964b705218047bb66611b42344db75ece8ba28eb1cb43d39679d7
7
- data.tar.gz: 6926ccc8bc1c6169bfe85fa040126387b22b43139056a520b21711cde2a36116a16829e2968a468596e648e3f8f9a29acd0f63933b3c7dbc7fa2b30633739cf3
6
+ metadata.gz: c6f69faa32dec660450e30c96b15e20a8366a7e1e778ba109694ea1677f61385a7f7b6db10791b58fe710e50c9fb2f7c7b36b4f7491057dd2597355afea9c13c
7
+ data.tar.gz: 48f2a6ba6e63f8388a71751c8f51cfbd90e0dfb654018868bcaba05d6dc91b26484028afaf4f75efaf0159504867cded033f8ceb0357a7df5de335ef820ca2ac
@@ -59,6 +59,25 @@ module Innologix
59
59
  end
60
60
  end
61
61
 
62
+ def statistic_minutes(from_time, to_time, arrange, supervisor_id = 0)
63
+ path = '/devices/statistic_minutes'
64
+ method = 'get'
65
+ options = {query_params: {from_time: from_time, to_time: to_time, arrange: arrange, supervisor_id: supervisor_id}}
66
+ result = client.call_api(path, method, options)
67
+ if result[:error] == 0
68
+ list = []
69
+ result[:statistics].each do |statistic|
70
+ _statistic = OpenStruct.new
71
+ _statistic.timestamp = statistic[:timestamp]
72
+ _statistic.devices = statistic[:devices]
73
+ list.push(_statistic)
74
+ end
75
+ list
76
+ else
77
+ []
78
+ end
79
+ end
80
+
62
81
  def get(id)
63
82
  path = '/devices/' + id.to_s
64
83
  method = 'get'
@@ -1,3 +1,3 @@
1
1
  module Innologix
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: innologix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - SkyLab Innogram