ruze 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +3 -3
- data/Gemfile +5 -5
- data/LICENSE.txt +1 -1
- data/README.md +9 -3
- data/lib/ruze/kamereon.rb +5 -1
- data/lib/ruze/version.rb +1 -1
- data/ruze.gemspec +2 -1
- metadata +5 -5
- data/CHANGELOG.md +0 -5
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
@@ -3,16 +3,16 @@ name: Test
|
|
3
3
|
on: [push,pull_request]
|
4
4
|
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
test:
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
|
9
9
|
strategy:
|
10
10
|
fail-fast: false
|
11
11
|
matrix:
|
12
|
-
ruby: [ '
|
12
|
+
ruby: ['3.0', '3.1', '3.2', '3.3']
|
13
13
|
|
14
14
|
steps:
|
15
|
-
- uses: actions/checkout@
|
15
|
+
- uses: actions/checkout@v3
|
16
16
|
|
17
17
|
- name: Setup Ruby ${{ matrix.ruby }}
|
18
18
|
uses: ruby/setup-ruby@v1
|
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
|
+
[![Test](https://github.com/solectrus/ruze/actions/workflows/main.yml/badge.svg)](https://github.com/solectrus/ruze/actions/workflows/main.yml)
|
3
|
+
[![wakatime](https://wakatime.com/badge/user/697af4f5-617a-446d-ba58-407e7f3e0243/project/60f52429-f36d-4981-84e7-930c71a92d95.svg)](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,15 @@ 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
36
|
|
37
|
+
|
35
38
|
## Usage
|
36
39
|
|
37
40
|
```ruby
|
@@ -60,6 +63,7 @@ car.cockpit
|
|
60
63
|
|
61
64
|
car.location
|
62
65
|
# {
|
66
|
+
# "gpsDirection" => nil,
|
63
67
|
# "gpsLatitude" => 50.12345678,
|
64
68
|
# "gpsLongitude" => 6.12345678,
|
65
69
|
# "lastUpdateTime" => "2021-03-12T11:43:18Z"
|
@@ -102,6 +106,8 @@ This project is not affiliated with, endorsed by, or connected to Renault. I acc
|
|
102
106
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
103
107
|
|
104
108
|
|
109
|
+
Copyright (c) 2021-2024 Georg Ledermann, released under the AGPL-3.0 License
|
110
|
+
|
105
111
|
## Code of Conduct
|
106
112
|
|
107
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
data/ruze.gemspec
CHANGED
@@ -14,7 +14,8 @@ Gem::Specification.new do |spec|
|
|
14
14
|
|
15
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
16
16
|
spec.metadata['source_code_uri'] = 'https://github.com/solectrus/ruze'
|
17
|
-
spec.metadata['changelog_uri'] = 'https://github.com/solectrus/ruze/
|
17
|
+
spec.metadata['changelog_uri'] = 'https://github.com/solectrus/ruze/releases'
|
18
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
18
19
|
|
19
20
|
# Specify which files should be added to the gem when it is released.
|
20
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
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:
|
@@ -22,7 +22,6 @@ files:
|
|
22
22
|
- ".gitignore"
|
23
23
|
- ".rspec"
|
24
24
|
- ".rubocop.yml"
|
25
|
-
- CHANGELOG.md
|
26
25
|
- CODE_OF_CONDUCT.md
|
27
26
|
- Gemfile
|
28
27
|
- LICENSE.txt
|
@@ -42,7 +41,8 @@ licenses:
|
|
42
41
|
metadata:
|
43
42
|
homepage_uri: https://github.com/solectrus/ruze
|
44
43
|
source_code_uri: https://github.com/solectrus/ruze
|
45
|
-
changelog_uri: https://github.com/solectrus/ruze/
|
44
|
+
changelog_uri: https://github.com/solectrus/ruze/releases
|
45
|
+
rubygems_mfa_required: 'true'
|
46
46
|
post_install_message:
|
47
47
|
rdoc_options: []
|
48
48
|
require_paths:
|
@@ -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
|