huginn_renault_ze_agent 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64a20f9a2416e9157653f7cd84c78c8fd4db1deca8c78f555ba1207fa7f65108
4
- data.tar.gz: 945a63af1ade8be7b5b52b88bbc3190dcf9c83017d55112fdf9b4534f5a9da1b
3
+ metadata.gz: 1e05902dbefc48961c1a6392c562c862e34eec4b2855931fe9cf1ef720346148
4
+ data.tar.gz: 82c7cf393d268bc1761191a113c224c63801686c72a6d3ba17d4a7a11ad9f4aa
5
5
  SHA512:
6
- metadata.gz: 168ec2d1a6a3e1316ddda5f095eb9f7ed667845a69ae1037f2ea9cda17244552fc260a04c2ee0ccd586475ad38c5f76034d8bfb6975050b2cea8edcb86fc820c
7
- data.tar.gz: b0829527678c994887f927623228f223657454c7f5b53cc7b23333a521d1fc26d1a374f4bc27f0f4af1915c677cb16ced6c8f444c0179e0848e0487571202365
6
+ metadata.gz: fa6e5dedec4dd05c117dd253d5e2b8840e9d0f513ce493272daf97036f979e54a15407370a4a46c63753461d9ffb9664aafb9e80392b4c18b0d7d201903acc0a
7
+ data.tar.gz: f938c71489e3dc565c4a13a240bfab108b0b915f649625d85bbecf3241fd649b49b2078e9b7a852f5c70a37359654b3f2d6e7675e964783c0da539a10aa8c7ad
@@ -8,7 +8,11 @@ module RenaultZE
8
8
  def login
9
9
  response = HTTParty.post(
10
10
  "https://www.services.renault-ze.com/api/user/login",
11
- headers: {"Content-Type": "application/json"},
11
+ headers: {
12
+ "Accept": "application/json",
13
+ "Content-Type": "application/json",
14
+ "User-Agent": "Huginn/2019"
15
+ },
12
16
  body: {username: @username, password: @password}.to_json
13
17
  )
14
18
  raise "Login - Unexpected response code: #{response}" unless response.code == 200
@@ -26,7 +30,11 @@ module RenaultZE
26
30
 
27
31
  response = HTTParty.get(
28
32
  "https://www.services.renault-ze.com/api/vehicle/#{creds[:vin]}/battery",
29
- headers: {"Authorization": "Bearer #{creds[:token]}"}
33
+ headers: {
34
+ "Accept": "application/json",
35
+ "Authorization": "Bearer #{creds[:token]}",
36
+ "User-Agent": "Huginn/2019"
37
+ }
30
38
  )
31
39
  raise "Battery - Unexpected response code: #{response}" unless response.code == 200
32
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_renault_ze_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Schoenig