google-distance-ruby 0.0.2 → 0.0.3
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.
- data/README.md +36 -3
- data/google-distance-ruby.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,4 +1,37 @@
|
|
1
|
-
|
2
|
-
====================
|
1
|
+
# GoogleDistanceRuby
|
3
2
|
|
4
|
-
Ruby client
|
3
|
+
Ruby client for The Google Distance Matrix API.
|
4
|
+
|
5
|
+
Get the distance between two points with one line ruby command.
|
6
|
+
|
7
|
+
It is necessary to have a Google Distance Matrix API Key. If you don't have one you can get at https://code.google.com/apis/console.
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## Examples (one line command)
|
12
|
+
|
13
|
+
GoogleDistanceRuby.new("{your_key}").distance("Vinhedo/SP", "Campinas/SP")
|
14
|
+
|
15
|
+
returns {:origin=>"Vinhedo - São Paulo, Brazil", :destination=>"Campinas - São Paulo, Brazil", :distance=>24034}
|
16
|
+
|
17
|
+
|
18
|
+
GoogleDistanceRuby.new("{your_key}").distance("Miami-FL", "Orlando-FL")
|
19
|
+
|
20
|
+
returns {:origin=>"Miami, FL, USA", :destination=>"Orlando, FL, USA", :distance=>376515}
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
## Installation
|
26
|
+
|
27
|
+
Add this line to your application's Gemfile:
|
28
|
+
|
29
|
+
gem 'google_distance_ruby'
|
30
|
+
|
31
|
+
And then execute:
|
32
|
+
|
33
|
+
$ bundle install
|
34
|
+
|
35
|
+
Or install it as:
|
36
|
+
|
37
|
+
$ gem install google_distance_ruby
|