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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/alpha_ess.gemspec +1 -1
  3. data/lib/alpha_ess.rb +2 -10
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fed25ff583048344b8da4a15dcd92510abf9d69d5adec2e0da030bf23478ef35
4
- data.tar.gz: b2cba2ad069290c82b1e4849ac4c1ce588c19abca72a62fcdf4458033e36f365
3
+ metadata.gz: c81cbe7a51a271d210972e96ba79ab88775e6a8021d822572072b056cc0c4b2a
4
+ data.tar.gz: 53cfca26ba154a13195698cf0068b926229f10080e496c9d91b08298b6cf9dc2
5
5
  SHA512:
6
- metadata.gz: 86208124094f59312e88bf877c29b946da0fbc0b865a77e3d1948c110d832de8712b3a420d08e499bfc615ab38ab20c41d970825d1194efa01a0c29b22ae6cf5
7
- data.tar.gz: cf071266cb4443e6f83918a0b936c5f6d269fb20d796578782b064d3d73b13b802ef19a5dad6bdab45edbf2ccea88e83f25488b644c45006abbcf89922d29a09
6
+ metadata.gz: b02e6738a07f151c35872be94e15c89a8f50031502d2ac3633eef728361ead1744c48af002f208e90c0215ede33014d9ab3133f2e5a36558b52c892a6ee1cc6a
7
+ data.tar.gz: 7013a66d7298c9a34b159026131ef02c993d8806dd32465ae950dea78b4f18318041e931af3238d4eb488b20617ea6f917c43d9ea1c002a46b00709d59769170
data/alpha_ess.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'alpha_ess'
3
- spec.version = '1.2.1'
3
+ spec.version = '1.2.2'
4
4
  spec.date = '2022-10-31'
5
5
  spec.summary = "Alpha Ess API Calls"
6
6
  spec.description = "a Ruby class for Alpha-Ess-API-Calls"
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
- body = {
41
- "beginDay" => beginDay,
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_ess
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Gaida