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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfee21a980a744aa50cceb071d6f2065a8e74a32
4
- data.tar.gz: 8cfc6e189a61a215784a312d2427d863847ecee4
3
+ metadata.gz: c00eb2bb16fa86446984b37d7aca7a20c0cc03aa
4
+ data.tar.gz: 8f865d49a00d0302e6fae0d42b5af27ee361d6c2
5
5
  SHA512:
6
- metadata.gz: 4272759f755c0e170b95c8ef14e010a8f60427354166378ac774e7fb911239c3f8b8062756fb1d558181a087b049d4209765569a85ae25e857f33a598eac8680
7
- data.tar.gz: dc98baf83f960e0f1197ad43b4ff6307fa403476f02e13af272846b61ec18dc421a9963116f2a1979d9cf5da4024cde180d50dd53cd75e24797efd7277a0f322
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
- response = JSON.parse(RestClient.get recall_url, {:params => {
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: response
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
@@ -1,3 +1,3 @@
1
1
  module VinData
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
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.8
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-21 00:00:00.000000000 Z
11
+ date: 2015-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client