vindata 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vindata/services/edmunds.rb +12 -2
- data/lib/vindata/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c00eb2bb16fa86446984b37d7aca7a20c0cc03aa
|
4
|
+
data.tar.gz: 8f865d49a00d0302e6fae0d42b5af27ee361d6c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6ff3635aee83d3937ee50a96599f9abde6378cbc7baeadf91ebf474077d98929635dd81e527a4e378a79b6fbc296c6b824869186502eac000f9e431c19d3187
|
7
|
+
data.tar.gz: 4eac1fa6945eee75b7ef6b342f2ce00330b32ba650d78186303a4cad689545381a3793ee6985ffb36305be6869a1ba6149340244035f206a7dd6d2d4d2a84cdb
|
@@ -44,7 +44,14 @@ module VinData::Services
|
|
44
44
|
year_id = response['years'].select{ |x| x['year'] == data[:year] }.first['id']
|
45
45
|
|
46
46
|
recall_url = 'https://api.edmunds.com/v1/api/maintenance/recallrepository/findbymodelyearid'
|
47
|
-
|
47
|
+
recall_response = JSON.parse(RestClient.get recall_url, {:params => {
|
48
|
+
modelyearid: year_id,
|
49
|
+
fmt: 'json',
|
50
|
+
api_key: configuration[:edmunds][:api_key]
|
51
|
+
}})
|
52
|
+
|
53
|
+
bulletin_url = 'https://api.edmunds.com/v1/api/maintenance/servicebulletinrepository/findbymodelyearid'
|
54
|
+
bulletin_response = JSON.parse(RestClient.get bulletin_url, {:params => {
|
48
55
|
modelyearid: year_id,
|
49
56
|
fmt: 'json',
|
50
57
|
api_key: configuration[:edmunds][:api_key]
|
@@ -53,7 +60,10 @@ module VinData::Services
|
|
53
60
|
# TODO: Check data validity here
|
54
61
|
|
55
62
|
return {
|
56
|
-
edmunds:
|
63
|
+
edmunds: {
|
64
|
+
recalls: recall_response,
|
65
|
+
bulletins: bulletin_response
|
66
|
+
}
|
57
67
|
}
|
58
68
|
# Indicates VIN request failed with Edmunds
|
59
69
|
rescue RestClient::BadRequest => err
|
data/lib/vindata/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vindata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roupen Mouradian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|