carquery-client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/carquery-client-0.1.0.gem +0 -0
- data/lib/carquery/client/version.rb +2 -2
- data/lib/carquery/client.rb +4 -8
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edc3754c2ffc151991c8637472709c8298047cc7e3bd40e4c0a4dd51896e82ee
|
4
|
+
data.tar.gz: 0c91c929ffeffb46cacf1d34ea513351cd1dba9fdc0b1a87c6cea77343f5a31e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d01a21f24ed2f64d1737ebb49ea32c10a700d1db6d2acb8b5a33abcc992db19e567513ed4ccf356ae6088c2a9f483a65431c99ad64538c59ec8e2079cecd3ee
|
7
|
+
data.tar.gz: 4e58231c55ca4d8c8f4a1c77c6c9435682146f9326fea6002d39d4c7710269d837865f9cbb225f91a1c359f72c9a0c788261690c4697c2342dc41e75606ea41a
|
Binary file
|
data/lib/carquery/client.rb
CHANGED
@@ -3,7 +3,7 @@ require 'faraday'
|
|
3
3
|
require 'faraday_middleware'
|
4
4
|
|
5
5
|
module Carquery
|
6
|
-
|
6
|
+
class Client
|
7
7
|
API_VERSION = '0.3'.freeze
|
8
8
|
BASE_URL = 'https://www.carqueryapi.com'.freeze
|
9
9
|
|
@@ -22,19 +22,15 @@ module Carquery
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def years
|
25
|
-
request(cmd: 'getYears')
|
25
|
+
request(cmd: 'getYears')['Years']
|
26
26
|
end
|
27
27
|
|
28
28
|
def makes_for_year(year, us_only = 1)
|
29
|
-
request(cmd: 'getMakes', year: year, sold_in_us: us_only)
|
29
|
+
request(cmd: 'getMakes', year: year, sold_in_us: us_only)['Makes']
|
30
30
|
end
|
31
31
|
|
32
32
|
def models_for_year_and_make(year, make, us_only = 1)
|
33
|
-
request(cmd: 'getModels', year: year, make: make, sold_in_us: us_only)
|
34
|
-
end
|
35
|
-
|
36
|
-
def trims_for_model_year(year, make, model)
|
37
|
-
request(cmd: 'getTrims', year: year, make: make, model: model)
|
33
|
+
request(cmd: 'getModels', year: year, make: make, sold_in_us: us_only)['Models']
|
38
34
|
end
|
39
35
|
|
40
36
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carquery-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zshawn Syed
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- Rakefile
|
57
57
|
- bin/console
|
58
58
|
- bin/setup
|
59
|
+
- carquery-client-0.1.0.gem
|
59
60
|
- carquery-client.gemspec
|
60
61
|
- lib/carquery/client.rb
|
61
62
|
- lib/carquery/client/version.rb
|