alpha_ess 1.2.1 → 1.2.3

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: 5fbebf3e6f3864431465895ab010a8e853b491e2890194310b3bcd2762619f8c
4
+ data.tar.gz: edeca96c4f687dce304a3203aca4b3924472b3d5c9d7a29e5dfc5e5636af2dc1
5
5
  SHA512:
6
- metadata.gz: 86208124094f59312e88bf877c29b946da0fbc0b865a77e3d1948c110d832de8712b3a420d08e499bfc615ab38ab20c41d970825d1194efa01a0c29b22ae6cf5
7
- data.tar.gz: cf071266cb4443e6f83918a0b936c5f6d269fb20d796578782b064d3d73b13b802ef19a5dad6bdab45edbf2ccea88e83f25488b644c45006abbcf89922d29a09
6
+ metadata.gz: 9d9bac8bd3f91bb2f4ecc14ba293424c6accf75a0f47e701f6476efa48302a734fc19c9abf7bd7b8cc64dfaf9261161c117f717d5abcaf74ca671160bdf5cce3
7
+ data.tar.gz: 367da2ac4f3d8868c51f9452343fc947d10f9cce351f69d71b7cd043b16f916fb111a58bace1265f94ee9682305aee0ce3cb21c73f90546a5bc5e8a018c6d495
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.3'
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=#{Time.now.strftime("%Y-%m-%d")}&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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Gaida