alpha_ess 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/alpha_ess.gemspec +1 -1
- data/lib/alpha_ess.rb +2 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c81cbe7a51a271d210972e96ba79ab88775e6a8021d822572072b056cc0c4b2a
|
4
|
+
data.tar.gz: 53cfca26ba154a13195698cf0068b926229f10080e496c9d91b08298b6cf9dc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b02e6738a07f151c35872be94e15c89a8f50031502d2ac3633eef728361ead1744c48af002f208e90c0215ede33014d9ab3133f2e5a36558b52c892a6ee1cc6a
|
7
|
+
data.tar.gz: 7013a66d7298c9a34b159026131ef02c993d8806dd32465ae950dea78b4f18318041e931af3238d4eb488b20617ea6f917c43d9ea1c002a46b00709d59769170
|
data/alpha_ess.gemspec
CHANGED
data/lib/alpha_ess.rb
CHANGED
@@ -37,16 +37,8 @@ class AlphaEss
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def get_stics_by_period(beginDay = Time.now.strftime("%Y-%m-%d"), endDay = Time.now.strftime("%Y-%m-%d"))
|
40
|
-
|
41
|
-
|
42
|
-
"endDay" => endDay,
|
43
|
-
"tday" => Time.now.strftime("%Y-%m-%d"),
|
44
|
-
"isOEM" => 0,
|
45
|
-
"SN" => @serial,
|
46
|
-
"noLoading" => true
|
47
|
-
}
|
48
|
-
url = "https://cloud.alphaess.com/api/Power/SticsByPeriod"
|
49
|
-
res = HTTParty.post(url, headers: header(), body: body.to_json)
|
40
|
+
url = "https://cloud.alphaess.com/api/Power/SticsByPeriod?beginDay=#{beginDay}&endDay=#{endDay}&tday=#{tday}&isOEM=0&SN=#{@serial}&noLoading=true"
|
41
|
+
res = HTTParty.get(url, headers: header())
|
50
42
|
res.parsed_response["data"]
|
51
43
|
end
|
52
44
|
|