README.md in regio-0.2.0 vs README.md in regio-0.3.0
- old
+ new
@@ -9,11 +9,11 @@
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'regio', '~> 0.2.0'
+gem 'regio', '~> 0.3.0'
```
And then execute:
$ bundle
@@ -28,10 +28,19 @@
```shell
REGIO_API_KEY=SECRET
```
+```
+export REGIO_API_KEY=SECRET && irb -I lib
+
+irb(main):001:0> require 'regio'
+=> true
+
+...
+```
+
### Geocoding
Use `Geocode` class in your code
```ruby
@@ -54,11 +63,10 @@
end
```
Check Regio [geocode](https://api.regio.ee/documentation/#docs/geocode) documentation
-
### Reverse geocoding
Use `ReverseGeocode` class in your code
```ruby
@@ -80,9 +88,62 @@
end
end
```
Check Regio [reverse geocode](https://api.regio.ee/documentation/#docs/reverse_geocode) documentation
+
+### Gazetteer
+
+Use `Gazetteer` class in your code
+
+```ruby
+require 'regio'
+
+class Geocoding
+
+ private
+
+ def results
+ @results ||= Regio::Gazetteer.new(options).results
+ end
+
+ def options
+ {
+ id: 16004253,
+ query: 'address_children'
+ }
+ end
+end
+```
+
+Check Regio [Gazetteer](https://api.regio.ee/documentation/#docs/gazetteer) documentation
+
+### Routing and directions
+
+Use `Routing` class in your code
+
+```ruby
+require 'regio'
+
+class Routing
+
+ private
+
+ def results
+ @results ||= Regio::Routing.new(options).results
+ end
+
+ def options
+ {
+ coordinates: [[24.649138022268, 59.14048887149], [25.853136227622, 59.00678681919]],
+ service: 'optimize',
+ overview: 'full'
+ }
+ end
+end
+```
+
+Check Regio [routing and directions](https://api.regio.ee/documentation/#docs/routing_and_directions) documentation
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.