blackbook_client 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -2
- data/lib/autocomplete_service.rb +14 -0
- data/lib/blackbook_client/version.rb +1 -1
- data/lib/blackbook_client.rb +4 -0
- data/lib/uvc_service.rb +17 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f3f8431b45b9bd81c1e43d7a7783a6de79cc3ab722b68ed522a5d1c1ac4c665
|
4
|
+
data.tar.gz: c32dcfce2092f07683663dc78a69212a1e3b9e780e12136b1b9ed0bcbdaca1d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b320f8a9cbabf477d19837d9dcb284ce275b1d6fc5031a84b41bb5e2a387fb41ece0d22376cce70ad2d72d9452740e994018da08dbad4e32843c9c39133e611
|
7
|
+
data.tar.gz: 8ee28b6f7b2346ab713733134379c3abfd275a1fe53509d1418b312733d7e2b722cf4efb471dcf12dad9fb748c188dbc34f67e13405f2d0e34e503906bd13c5a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
blackbook_client (0.1.
|
4
|
+
blackbook_client (0.1.5)
|
5
5
|
httparty (~> 0.15)
|
6
6
|
|
7
7
|
GEM
|
@@ -13,8 +13,12 @@ GEM
|
|
13
13
|
safe_yaml (~> 1.0.0)
|
14
14
|
diff-lcs (1.3)
|
15
15
|
hashdiff (0.3.7)
|
16
|
-
httparty (0.16.
|
16
|
+
httparty (0.16.3)
|
17
|
+
mime-types (~> 3.0)
|
17
18
|
multi_xml (>= 0.5.2)
|
19
|
+
mime-types (3.2.2)
|
20
|
+
mime-types-data (~> 3.2015)
|
21
|
+
mime-types-data (3.2018.0812)
|
18
22
|
multi_xml (0.6.0)
|
19
23
|
public_suffix (3.0.1)
|
20
24
|
rake (10.5.0)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module AutocompleteService
|
2
|
+
include RestClient
|
3
|
+
|
4
|
+
VEHICLE_AUTOCOMPLETE_URL = "#{BASE_URL}/UsedCarWS/UsedCarWS/Autocomplete".freeze
|
5
|
+
|
6
|
+
def lookup_autocomplete(query_params = {})
|
7
|
+
begin
|
8
|
+
response = HTTParty.get(VEHICLE_AUTOCOMPLETE_URL, headers: headers, query: query_params)
|
9
|
+
process_response(JSON.parse(response))
|
10
|
+
rescue => e
|
11
|
+
[{ error: e.to_s }, 500]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/blackbook_client.rb
CHANGED
@@ -2,12 +2,16 @@ require 'blackbook_client/version'
|
|
2
2
|
require 'trade_service'
|
3
3
|
require 'vin_service'
|
4
4
|
require 'chromedata_service'
|
5
|
+
require 'autocomplete_service'
|
6
|
+
require 'uvc_service'
|
5
7
|
require 'httparty'
|
6
8
|
|
7
9
|
class BlackbookClient
|
8
10
|
extend VinService
|
9
11
|
extend ChromedataService
|
10
12
|
extend TradeService
|
13
|
+
extend AutocompleteService
|
14
|
+
extend UVCService
|
11
15
|
|
12
16
|
class << self
|
13
17
|
attr_accessor :username, :password
|
data/lib/uvc_service.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
module UVCService
|
2
|
+
include RestClient
|
3
|
+
|
4
|
+
VEHICLE_BY_UVC_URL =
|
5
|
+
"#{BASE_URL}/UsedCarWS/UsedCarWS/UsedVehicle/UVC".freeze
|
6
|
+
|
7
|
+
def vehicle_by_uvc(uvc_id, query_params = {})
|
8
|
+
url = "#{VEHICLE_BY_UVC_URL}/#{uvc_id}"
|
9
|
+
|
10
|
+
begin
|
11
|
+
response = HTTParty.get(url, headers: headers, query: query_params)
|
12
|
+
process_response(JSON.parse(response))
|
13
|
+
rescue => e
|
14
|
+
[{ error: e.to_s }, 500]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackbook_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Schmeichel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -114,11 +114,13 @@ files:
|
|
114
114
|
- bin/console
|
115
115
|
- bin/setup
|
116
116
|
- blackbook_client.gemspec
|
117
|
+
- lib/autocomplete_service.rb
|
117
118
|
- lib/blackbook_client.rb
|
118
119
|
- lib/blackbook_client/version.rb
|
119
120
|
- lib/chromedata_service.rb
|
120
121
|
- lib/rest_client.rb
|
121
122
|
- lib/trade_service.rb
|
123
|
+
- lib/uvc_service.rb
|
122
124
|
- lib/vin_service.rb
|
123
125
|
homepage: https://github.com/theappraisallane/blackbook-client
|
124
126
|
licenses:
|