regio 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/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +30 -2
- data/lib/regio/errors/failed.rb +13 -0
- data/lib/regio/errors/forbidden.rb +13 -0
- data/lib/regio/errors/not_found.rb +13 -0
- data/lib/regio/errors/unprocessable.rb +13 -0
- data/lib/regio/geocode.rb +2 -0
- data/lib/regio/version.rb +1 -1
- data/lib/regio.rb +4 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 503356adbc6069f1dfd5cc6c965aef1dcd3a85bc4cf2600551bf050d45af3900
|
4
|
+
data.tar.gz: 198f74020d181bbb107a00f25d933e99e54daceaa73726300f1fa76a8efb9df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f844a02af39777cf32a749b4b5df59a50a95a584359711535fcbf38b222b1e0a8a2f41530e2f1ee5718b5ca0868130c2da4c9bee718a1c84a1b5dab7c226c5c2
|
7
|
+
data.tar.gz: 709352194bbb875a6e2394fdb85c22fd6bf42c74c50cd06516cac6faa39c4ab99ae4a3c3f7d78572ca97405c6d5a0857c872949381bbd31ee256e2b9de8f4e6e
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Regio
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/regio.svg)](https://badge.fury.io/rb/regio)
|
4
|
+
|
3
5
|
[Regio geocoding API](https://api.regio.ee/documentation/#docs/geocode) lets you search for addresses from complete Estonian address database.
|
4
6
|
|
5
7
|
[Regio](https://www.regio.ee/en/)
|
@@ -9,7 +11,7 @@
|
|
9
11
|
Add this line to your application's Gemfile:
|
10
12
|
|
11
13
|
```ruby
|
12
|
-
gem 'regio'
|
14
|
+
gem 'regio', '~> 0.1.1'
|
13
15
|
```
|
14
16
|
|
15
17
|
And then execute:
|
@@ -22,7 +24,33 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
Get your own API key
|
28
|
+
|
29
|
+
```shell
|
30
|
+
REGIO_API_KEY=SECRET
|
31
|
+
```
|
32
|
+
|
33
|
+
Use geocode class in your code
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'regio'
|
37
|
+
|
38
|
+
class Geocoding
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def results
|
43
|
+
@results ||= Regio::Geocode.new(options).results
|
44
|
+
end
|
45
|
+
|
46
|
+
def options
|
47
|
+
{
|
48
|
+
address: 'Tartu maantee 83',
|
49
|
+
country: 'ee'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
```
|
26
54
|
|
27
55
|
## Development
|
28
56
|
|
data/lib/regio/geocode.rb
CHANGED
data/lib/regio/version.rb
CHANGED
data/lib/regio.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regio
|
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
|
- tab
|
@@ -162,6 +162,10 @@ files:
|
|
162
162
|
- bin/setup
|
163
163
|
- lib/regio.rb
|
164
164
|
- lib/regio/configuration.rb
|
165
|
+
- lib/regio/errors/failed.rb
|
166
|
+
- lib/regio/errors/forbidden.rb
|
167
|
+
- lib/regio/errors/not_found.rb
|
168
|
+
- lib/regio/errors/unprocessable.rb
|
165
169
|
- lib/regio/geocode.rb
|
166
170
|
- lib/regio/version.rb
|
167
171
|
- regio.gemspec
|