dadata_ru 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -2
  3. data/lib/dadata_ru.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb545beb11bc1e2032bc76a6f6aad537d156b056
4
- data.tar.gz: 07f3dda3f99a3f87c72084dc2eccb3bdfa07a5bf
3
+ metadata.gz: e4dfaeaa3f9d136ef9984571bae083ad67e79c2f
4
+ data.tar.gz: f3d588da690b9f93537845dd81475a87fad19cf1
5
5
  SHA512:
6
- metadata.gz: caba175fa5f74757a204645cb03d2219581a080bca449d068ff86738309c1a5ceffb27617d9c47c53fa4f2dacb805d4fc9a33d61a123a5ba0ccde92fdb33bb5f
7
- data.tar.gz: 036439a6c30226caa170534cce5e0dd59862c36331d6e9a3711f206332db5a724db9a107bf8976b5a473764efd9cf3046f20600bfd5ee58903a29c6408aa27b6
6
+ metadata.gz: 2e45ae8e2396d4ab65cc1652171149bf5e38243593b4b5766b458ea644957ed634785845f3cc17f96738dd1f50986319bbea4d5dc2e881a4d335b7448ca2a875
7
+ data.tar.gz: 5cb6b2786dd9883ddca806fad70bbab46664beb21a92e08b6129dc03ffa7604d8200d45c84b6a8c2e7207f522508e1c8577fbc8ca75db93b6dca4479e97cc6f0
data/README.md CHANGED
@@ -15,7 +15,7 @@ gem 'dadata_ru'
15
15
  ### Usage:
16
16
 
17
17
  ```ruby
18
- require 'dadata'
18
+ require 'dadata_ru'
19
19
 
20
20
  DadataRu.configure do |config|
21
21
  config.url = "https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address"
@@ -23,7 +23,10 @@ DadataRu.configure do |config|
23
23
  end
24
24
 
25
25
  api = DadataRu::Address.new
26
- req = api.call('Невский 48')
26
+ req = api.call({
27
+ query: 'Невский 48',
28
+ count: 15
29
+ })
27
30
  puts req.status
28
31
  puts req.result["suggestions"]
29
32
 
@@ -47,7 +47,7 @@ module DadataRu
47
47
  ERRORS[code]
48
48
  end
49
49
 
50
- def call query
50
+ def call params
51
51
  submit(
52
52
  url: DadataRu.config.url,
53
53
  headers: {
@@ -55,7 +55,7 @@ module DadataRu
55
55
  "Accept": "application/json"},
56
56
  method: 'POST',
57
57
  type: 'json',
58
- body: {query: query}.to_json
58
+ body: params.to_json
59
59
  )
60
60
  end
61
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dadata_ru
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Ishenin