ruze 0.1.1 → 0.1.2
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 +4 -4
- data/.github/workflows/main.yml +1 -1
- data/Gemfile +5 -5
- data/LICENSE.txt +1 -1
- data/README.md +7 -4
- data/lib/ruze/kamereon.rb +5 -1
- data/lib/ruze/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c05176b082da3e8a263b95baf98b6982b0bf1563686fd9c357b575d33c860e2e
|
|
4
|
+
data.tar.gz: a95ddfa50c47176f21bf7b36d5a6be61ec84f5ba8994abd99739f58fac2e292e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c48c8ac959d98088fca9d2028e281264a37be188a2a94e5bc5233751bf3d9e4463da88b2a4e7eaf7381a16f15448b55e4e0ccfbbce23ebb94bbc6b068e655e2e
|
|
7
|
+
data.tar.gz: 133d2f1b88778b4b01e56f03a1ba6dd629d7968a8030917ba39b14e71487ccb8e2bed733aaa60b7e402912457d75a9f24852f528e44127d93a838b455ec4e9c5
|
data/.github/workflows/main.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -4,19 +4,19 @@ source 'https://rubygems.org'
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
6
|
# Rake is a Make-like program implemented in Ruby (https://github.com/ruby/rake)
|
|
7
|
-
gem 'rake'
|
|
7
|
+
gem 'rake'
|
|
8
8
|
|
|
9
|
-
# rspec-3.
|
|
10
|
-
gem 'rspec'
|
|
9
|
+
# rspec-3.12.0 (http://github.com/rspec)
|
|
10
|
+
gem 'rspec'
|
|
11
11
|
|
|
12
12
|
# Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. (https://relishapp.com/vcr/vcr/docs)
|
|
13
13
|
gem 'vcr'
|
|
14
14
|
|
|
15
|
-
# Library for stubbing HTTP requests in Ruby. (
|
|
15
|
+
# Library for stubbing HTTP requests in Ruby. (https://github.com/bblimke/webmock)
|
|
16
16
|
gem 'webmock'
|
|
17
17
|
|
|
18
18
|
# Loads environment variables from `.env`. (https://github.com/bkeepers/dotenv)
|
|
19
19
|
gem 'dotenv'
|
|
20
20
|
|
|
21
21
|
# Automatic Ruby code style checking tool. (https://github.com/rubocop/rubocop)
|
|
22
|
-
gem 'rubocop'
|
|
22
|
+
gem 'rubocop'
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# RuZE
|
|
2
|
+
[](https://github.com/solectrus/ruze/actions/workflows/main.yml)
|
|
3
|
+
[](https://wakatime.com/badge/user/697af4f5-617a-446d-ba58-407e7f3e0243/project/60f52429-f36d-4981-84e7-930c71a92d95)
|
|
2
4
|
|
|
3
5
|
Unofficial Ruby client to access the API of Renault ZE. Get vehicle data like mileage, charging state and GPS location.
|
|
4
6
|
|
|
@@ -24,14 +26,13 @@ Or install it yourself as:
|
|
|
24
26
|
|
|
25
27
|
## Obtaining API keys
|
|
26
28
|
|
|
27
|
-
You need two API keys. Both can be obtained from Renault; they're the same for everyone and shouldn't be confused with your email/password credentials. Since the API is apparently not intended for the public, I do not want to publish the API keys here. It's your turn to find them
|
|
29
|
+
You need two API keys. Both can be obtained from Renault; they're the same for everyone and shouldn't be confused with your email/password credentials. Since the API is apparently not intended for the public, I do not want to publish the API keys here. It's your turn to find them, then store them as ENV variables:
|
|
28
30
|
|
|
29
31
|
```bash
|
|
30
|
-
export GIGYA_API_KEY
|
|
31
|
-
export KAMEREON_API_KEY
|
|
32
|
+
export GIGYA_API_KEY=...
|
|
33
|
+
export KAMEREON_API_KEY=...
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
Hint: https://gist.github.com/mountbatt/772e4512089802a2aa2622058dd1ded7
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
## Usage
|
|
@@ -105,6 +106,8 @@ This project is not affiliated with, endorsed by, or connected to Renault. I acc
|
|
|
105
106
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
106
107
|
|
|
107
108
|
|
|
109
|
+
Copyright (c) 2021-2024 Georg Ledermann, released under the AGPL-3.0 License
|
|
110
|
+
|
|
108
111
|
## Code of Conduct
|
|
109
112
|
|
|
110
113
|
Everyone interacting in the Renault project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/solectrus/ruze/blob/main/CODE_OF_CONDUCT.md).
|
data/lib/ruze/kamereon.rb
CHANGED
|
@@ -46,7 +46,7 @@ module Ruze
|
|
|
46
46
|
|
|
47
47
|
def cockpit
|
|
48
48
|
@cockpit ||= return_from get(
|
|
49
|
-
uri("/accounts/#{account_id}/kamereon/kca/car-adapter/
|
|
49
|
+
uri("/accounts/#{account_id}/kamereon/kca/car-adapter/v1/cars/#{vin}/cockpit?country=#{COUNTRY}"),
|
|
50
50
|
headers
|
|
51
51
|
), keys: %w[data attributes]
|
|
52
52
|
end
|
|
@@ -56,6 +56,10 @@ module Ruze
|
|
|
56
56
|
uri("/accounts/#{account_id}/kamereon/kca/car-adapter/v1/cars/#{vin}/location?country=#{COUNTRY}"),
|
|
57
57
|
headers
|
|
58
58
|
), keys: %w[data attributes]
|
|
59
|
+
rescue Error => e
|
|
60
|
+
raise e unless e.message.include?('404')
|
|
61
|
+
|
|
62
|
+
{}
|
|
59
63
|
end
|
|
60
64
|
|
|
61
65
|
private
|
data/lib/ruze/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruze
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Georg Ledermann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Queries vehicle data like mileage, charging state and GPS location
|
|
14
14
|
email:
|
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: '0'
|
|
60
60
|
requirements: []
|
|
61
|
-
rubygems_version: 3.
|
|
61
|
+
rubygems_version: 3.5.9
|
|
62
62
|
signing_key:
|
|
63
63
|
specification_version: 4
|
|
64
64
|
summary: Unofficial Ruby client for the Renault ZE API
|