auto_ria_api 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8635fbea479db01d9e8530a65f4ad495e69adc0c22a28795f038029d5ac1af13
4
- data.tar.gz: f9a5e97b35a6f3c9243accc396075134689bd8f8dc235604e9c09f90ebf3a1e9
3
+ metadata.gz: a8ab0dcbe23001fb09d111b0ec606aa294c36b3127d12305e34b6e56ff006cf9
4
+ data.tar.gz: 86482a3933c9471daa342de07f7fcb27432beb7888f48f54d8b8657bf3970464
5
5
  SHA512:
6
- metadata.gz: d4e0c32bb7ca8db34bb9fb30bafe33ef953a3e275d6ecc8e49b6211b79b1e137e99b326384d043acec0fcc2218fea830dc9f97bcc3efe587bb0b5bafd9307c55
7
- data.tar.gz: 4027e5bc143eaa35a068513b03824af36fb432fd6372cb2e8a66a37732f67935ef4539a32cdc93195ad232adb1c43fe976d2c0bbe5188b934746773bfa2c4152
6
+ metadata.gz: 5a920fe0b529b321c8afd3579b2b1079c8fa0e20dcd1260a198a82d6de74765bea89e3dc211b03161096356402614847f1902cd4e7d2561217b52b90a4fde0a7
7
+ data.tar.gz: 53ac1564848628d3fbe1749dfa86452ff4a4f0bee6707276ab38bef2623d77fc46c18486bcf46927858c10c71fd2f5ef5e3ad57ddffc4b58a89226901f137cf5
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # IDE
14
+ .idea/
@@ -0,0 +1,58 @@
1
+ #inherit_from: .rubocop_todo.yml
2
+ AllCops:
3
+ TargetRubyVersion: '2.5'
4
+ DisplayCopNames: true
5
+ Exclude:
6
+ - Gemfile
7
+ - bin/*
8
+ - config/**/*
9
+ - config/application.rb
10
+ - db/**/*
11
+ - node_modules/**/*
12
+ - vendor/engines/*/bin/*
13
+ - vendor/engines/*/config/*
14
+ - vendor/engines/*/*.gemspec
15
+
16
+ Documentation:
17
+ Enabled: false
18
+
19
+ Metrics/ClassLength:
20
+ Max: 250
21
+
22
+ Metrics/MethodLength:
23
+ Max: 50
24
+ Exclude:
25
+ - lib/tasks/*.rake
26
+ - spec/lib/tl_lincoln/factories/*
27
+
28
+ Metrics/AbcSize:
29
+ Max: 30
30
+
31
+ Layout/EndOfLine:
32
+ EnforcedStyle: lf
33
+
34
+ Metrics/BlockLength:
35
+ Max: 30
36
+ Exclude:
37
+ - spec/**/*
38
+ - lib/tasks/*.rake
39
+ - lib/tl_lincoln/spec/**/*
40
+ - config/routes.rb
41
+ - config/environments/*
42
+
43
+ Metrics/LineLength:
44
+ Max: 120
45
+
46
+ Metrics/ParameterLists:
47
+ Max: 10
48
+
49
+ Style/AsciiComments:
50
+ Enabled: false
51
+
52
+ Style/BlockComments:
53
+ Exclude:
54
+ - spec/spec_helper.rb
55
+
56
+ Style/FrozenStringLiteralComment:
57
+ Exclude:
58
+ - !ruby/regexp /.xml.builder$/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- auto_ria_api (0.1.4)
4
+ auto_ria_api (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rspec (~> 3.0)
33
33
 
34
34
  BUNDLED WITH
35
- 1.17.1
35
+ 1.17.3
data/README.md CHANGED
@@ -28,12 +28,13 @@ First of all you need an api_key which you can get at [https://developers.ria.co
28
28
 
29
29
  # Methods:
30
30
  @client.types
31
- @client.carcasses(type:, grouped: false, all: false)
31
+ @client.carcasses(type:, options: { grouped: false, all: false })
32
32
  @client.marks(type:)
33
- @client.models(type:, mark, grouped: false, all: false)
33
+ @client.models(type:, mark, options: { grouped: false, all: false })
34
34
  @client.regions
35
35
  @client.cities(region:)
36
36
  @client.gearboxes(type:)
37
+ @client.driver_types(type:)
37
38
  @client.fuels
38
39
  @client.colors
39
40
  @client.options(type:)
@@ -59,8 +59,10 @@ module AutoRiaApi
59
59
  request "/auto/categories/#{type}/gearboxes"
60
60
  end
61
61
 
62
- def driver_types
63
- raise NotImplementedError
62
+ def driver_types(type:)
63
+ raise ArgumentError, '`type` should not be empty' if blank?(type)
64
+
65
+ request "/auto/categories/#{type}/driverTypes"
64
66
  end
65
67
 
66
68
  def fuels
@@ -77,8 +79,8 @@ module AutoRiaApi
77
79
  request "/auto/categories/#{type}/auto_options"
78
80
  end
79
81
 
80
- def average_price(*args)
81
- raise NotImplementedError
82
+ def average_price(params)
83
+ request "/auto/average_price", params
82
84
  end
83
85
 
84
86
  def search(*args)
@@ -1,3 +1,3 @@
1
1
  module AutoRiaApi
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_ria_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - drkmen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-02 00:00:00.000000000 Z
11
+ date: 2020-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
63
  - ".rspec"
64
+ - ".rubocop.yml"
64
65
  - ".travis.yml"
65
66
  - Gemfile
66
67
  - Gemfile.lock