geokit 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +19 -0
- data/Gemfile +3 -4
- data/README.markdown +1 -0
- data/Rakefile +10 -10
- data/fixtures/vcr_cassettes/geobytes_geocode.yml +41 -0
- data/fixtures/vcr_cassettes/google_administrative_area_level_3.yml +111 -0
- data/fixtures/vcr_cassettes/google_city_ordering.yml +168 -0
- data/fixtures/vcr_cassettes/google_full_v3_20.yml +123 -0
- data/fixtures/vcr_cassettes/mapbox_forward_geocode.yml +40 -21
- data/fixtures/vcr_cassettes/mapbox_forward_geocode_city_only.yml +73 -0
- data/fixtures/vcr_cassettes/mapbox_reverse_geocode.yml +34 -24
- data/geokit.gemspec +17 -16
- data/lib/geokit.rb +7 -7
- data/lib/geokit/bounds.rb +2 -2
- data/lib/geokit/geo_loc.rb +15 -9
- data/lib/geokit/geocoders.rb +41 -41
- data/lib/geokit/geocoders/bing.rb +3 -3
- data/lib/geokit/geocoders/ca_geocoder.rb +12 -12
- data/lib/geokit/geocoders/fcc.rb +9 -11
- data/lib/geokit/geocoders/free_geo_ip.rb +7 -7
- data/lib/geokit/geocoders/geo_plugin.rb +6 -6
- data/lib/geokit/geocoders/geobytes.rb +28 -0
- data/lib/geokit/geocoders/geocodio.rb +14 -14
- data/lib/geokit/geocoders/geonames.rb +11 -11
- data/lib/geokit/geocoders/google.rb +77 -61
- data/lib/geokit/geocoders/ip.rb +9 -9
- data/lib/geokit/geocoders/mapbox.rb +25 -25
- data/lib/geokit/geocoders/mapquest.rb +12 -12
- data/lib/geokit/geocoders/maxmind.rb +1 -1
- data/lib/geokit/geocoders/opencage.rb +20 -20
- data/lib/geokit/geocoders/openstreetmap.rb +22 -21
- data/lib/geokit/geocoders/ripe.rb +6 -6
- data/lib/geokit/geocoders/us_geocoder.rb +4 -4
- data/lib/geokit/geocoders/yahoo.rb +55 -55
- data/lib/geokit/geocoders/yandex.rb +17 -17
- data/lib/geokit/inflectors.rb +8 -8
- data/lib/geokit/lat_lng.rb +7 -6
- data/lib/geokit/mappable.rb +22 -11
- data/lib/geokit/multi_geocoder.rb +3 -3
- data/lib/geokit/net_adapter/net_http.rb +3 -3
- data/lib/geokit/polygon.rb +4 -6
- data/lib/geokit/version.rb +1 -1
- data/test/helper.rb +33 -30
- data/test/test_base_geocoder.rb +9 -9
- data/test/test_bing_geocoder.rb +31 -31
- data/test/test_bounds.rb +1 -1
- data/test/test_ca_geocoder.rb +16 -13
- data/test/test_fcc_geocoder.rb +7 -7
- data/test/test_free_geo_ip_geocoder.rb +7 -7
- data/test/test_geo_plugin_geocoder.rb +17 -17
- data/test/test_geobytes_geocoder.rb +22 -0
- data/test/test_geocodio_geocoder.rb +8 -8
- data/test/test_geoloc.rb +55 -46
- data/test/test_geonames_geocoder.rb +13 -13
- data/test/test_google_geocoder.rb +160 -101
- data/test/test_inflector.rb +13 -13
- data/test/test_ipgeocoder.rb +34 -34
- data/test/test_latlng.rb +46 -32
- data/test/test_map_quest.rb +18 -18
- data/test/test_mapbox_geocoder.rb +26 -13
- data/test/test_mappable.rb +31 -18
- data/test/test_maxmind_geocoder.rb +14 -14
- data/test/test_multi_geocoder.rb +10 -5
- data/test/test_multi_ip_geocoder.rb +3 -3
- data/test/test_net_adapter.rb +4 -5
- data/test/test_opencage_geocoder.rb +41 -43
- data/test/test_openstreetmap_geocoder.rb +35 -35
- data/test/test_polygon.rb +1 -1
- data/test/test_ripe_geocoder.rb +14 -14
- data/test/test_us_geocoder.rb +7 -7
- data/test/test_yahoo_geocoder.rb +23 -26
- data/test/test_yandex_geocoder.rb +23 -23
- metadata +32 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5e261043601741cbe5b583fd410ca1f7e325e7b
|
4
|
+
data.tar.gz: 48317b60a9f7bf1cf3ff1627a7627c08d91477e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36624a118eddde3cc4a507eef4e08d694a18e954b145c3bb08ac77722497433117d49b6b51d5ddfd4f9b30b3f8e6de4ff06f8c125e4430e908a77072298198e2
|
7
|
+
data.tar.gz: d96564b602c5a62fd3497e6cf805bf1b917b3ca6c94d9fda5f40bf3626ce4e23eaace141012e49b5580e7af36b29dab3e35c7b7715485b4313b37474e9ccd306
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## 1.10.0
|
2
|
+
|
3
|
+
**Existing Geocoder Changes**
|
4
|
+
* Google: place_id/formatted_address support
|
5
|
+
* Google: Improve error handling
|
6
|
+
* Google: Consistent precision names
|
7
|
+
* Google: Improve ordering
|
8
|
+
* Mapbox: city-only support
|
9
|
+
* Mapbox: Make MultiGeocoder compatible
|
10
|
+
* CaGeocoder: Fix url and xml
|
11
|
+
* Yandex: Use https
|
12
|
+
|
13
|
+
**Other Changes**
|
14
|
+
* Added Geobytes geocoder
|
15
|
+
* Replace MultiJSON with JSON
|
16
|
+
* Fix Get with URI (not URL)
|
17
|
+
* Fix missing openssl requirement
|
18
|
+
* Error when units invalid/unsupported
|
19
|
+
|
1
20
|
## 1.9.0
|
2
21
|
|
3
22
|
* Drop Ruby 1.8 support
|
data/Gemfile
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in geokit.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem 'geoip' # for testing - only required for max_mind
|
6
|
+
gem "geoip" # for testing - only required for max_mind
|
7
|
+
gem "pry", platforms: :ruby_19
|
data/README.markdown
CHANGED
@@ -58,6 +58,7 @@ Combine this gem with the [geokit-rails](http://github.com/geokit/geokit-rails)
|
|
58
58
|
### IP address geocoders
|
59
59
|
* IP - geocodes an IP address using hostip.info's web service.
|
60
60
|
* Geoplugin.net -- another IP address geocoder
|
61
|
+
* Geobytes
|
61
62
|
* RIPE
|
62
63
|
* MaxMind
|
63
64
|
* freegeoip.net
|
data/Rakefile
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require
|
2
|
+
require "rake/testtask"
|
3
3
|
|
4
4
|
task :default do
|
5
5
|
end
|
6
6
|
|
7
7
|
Rake::TestTask.new do |t|
|
8
8
|
t.libs << "test"
|
9
|
-
t.test_files = FileList[
|
9
|
+
t.test_files = FileList["test/test*.rb"]
|
10
10
|
t.verbose = true
|
11
11
|
end
|
12
12
|
|
13
13
|
desc "Generate SimpleCov test coverage and open in your browser"
|
14
14
|
task :coverage do
|
15
|
-
ENV[
|
16
|
-
Rake::Task[
|
15
|
+
ENV["COVERAGE"] = "true"
|
16
|
+
Rake::Task["test"].invoke
|
17
17
|
end
|
18
18
|
|
19
19
|
desc "Downloads GeoLiteCity.dat from maxmind.com"
|
20
20
|
task :download_geolitecity do
|
21
21
|
total_size = nil
|
22
|
-
url =
|
23
|
-
progress_cb = lambda {|size| print("Downloaded #{size} of #{total_size} bytes\r") if total_size }
|
24
|
-
length_cb = lambda {|content_length| total_size = content_length }
|
25
|
-
require
|
22
|
+
url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
|
23
|
+
progress_cb = lambda { |size| print("Downloaded #{size} of #{total_size} bytes\r") if total_size }
|
24
|
+
length_cb = lambda { |content_length| total_size = content_length }
|
25
|
+
require "open-uri"
|
26
26
|
File.open("/tmp/GeoLiteCity.dat.gz", "wb") do |f|
|
27
|
-
open(url,
|
27
|
+
open(url, "rb", progress_proc: progress_cb, content_length_proc: length_cb) do |downloaded_file|
|
28
28
|
f.write(downloaded_file.read)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
puts "\nDone."
|
32
|
-
end
|
32
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://getcitydetails.geobytes.com/GetCityDetails?fqcn=12.12.12.12
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- getcitydetails.geobytes.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Sun, 11 Apr 2015 19:52:36 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Expires:
|
28
|
+
- '0'
|
29
|
+
Content-Length:
|
30
|
+
- '676'
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: '{"geobytescertainty":"66","geobytesinternet":"US","geobytescountry":"United
|
34
|
+
States","geobytesregionlocationcode":"USNY","geobytesregion":"New York","geobytescode":"NY","geobyteslocationcode":"USNYNYOR","geobytescity":"New
|
35
|
+
York","geobytescityid":"10182","geobytesfqcn":"New York, NY, United States","geobyteslatitude":"40.748798","geobyteslongitude":"-73.984596","geobytescapital":"Washington,
|
36
|
+
DC ","geobytestimezone":"-05:00","geobytesnationalitysingular":"American","geobytespopulation":"278058881","geobytesnationalityplural":"Americans","geobytesmapreference":"North
|
37
|
+
America ","geobytescurrency":"US Dollar","geobytescurrencycode":"USD","geobytestitle":"The
|
38
|
+
United States"}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sat, 11 Apr 2015 19:52:37 GMT
|
41
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,111 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://maps.google.com/maps/api/geocode/json?address=8%20Barkwood%20Lane,%20Clifton%20Park,%20NY%2012065&sensor=false
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=UTF-8
|
23
|
+
Date:
|
24
|
+
- Thu, 21 Aug 2014 19:05:13 GMT
|
25
|
+
Expires:
|
26
|
+
- Fri, 22 Aug 2014 19:05:13 GMT
|
27
|
+
Cache-Control:
|
28
|
+
- public, max-age=86400
|
29
|
+
Vary:
|
30
|
+
- Accept-Language
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Server:
|
34
|
+
- mafe
|
35
|
+
X-Xss-Protection:
|
36
|
+
- 1; mode=block
|
37
|
+
X-Frame-Options:
|
38
|
+
- SAMEORIGIN
|
39
|
+
Alternate-Protocol:
|
40
|
+
- 443:quic
|
41
|
+
Transfer-Encoding:
|
42
|
+
- chunked
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"results" : [
|
48
|
+
{
|
49
|
+
"address_components" : [
|
50
|
+
{
|
51
|
+
"long_name" : "8",
|
52
|
+
"short_name" : "8",
|
53
|
+
"types" : [ "street_number" ]
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"long_name" : "Barkwood Lane",
|
57
|
+
"short_name" : "Barkwood Ln",
|
58
|
+
"types" : [ "route" ]
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"long_name" : "Clifton Park",
|
62
|
+
"short_name" : "Clifton Park",
|
63
|
+
"types" : [ "administrative_area_level_3", "political" ]
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"long_name" : "Saratoga County",
|
67
|
+
"short_name" : "Saratoga County",
|
68
|
+
"types" : [ "administrative_area_level_2", "political" ]
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"long_name" : "New York",
|
72
|
+
"short_name" : "NY",
|
73
|
+
"types" : [ "administrative_area_level_1", "political" ]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"long_name" : "United States",
|
77
|
+
"short_name" : "US",
|
78
|
+
"types" : [ "country", "political" ]
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"long_name" : "12065",
|
82
|
+
"short_name" : "12065",
|
83
|
+
"types" : [ "postal_code" ]
|
84
|
+
}
|
85
|
+
],
|
86
|
+
"formatted_address" : "8 Barkwood Lane, Clifton Park, NY 12065, USA",
|
87
|
+
"geometry" : {
|
88
|
+
"location" : {
|
89
|
+
"lat" : 42.829583,
|
90
|
+
"lng" : -73.788174
|
91
|
+
},
|
92
|
+
"location_type" : "ROOFTOP",
|
93
|
+
"viewport" : {
|
94
|
+
"northeast" : {
|
95
|
+
"lat" : 42.8309319802915,
|
96
|
+
"lng" : -73.78682501970849
|
97
|
+
},
|
98
|
+
"southwest" : {
|
99
|
+
"lat" : 42.8282340197085,
|
100
|
+
"lng" : -73.78952298029151
|
101
|
+
}
|
102
|
+
}
|
103
|
+
},
|
104
|
+
"types" : [ "street_address" ]
|
105
|
+
}
|
106
|
+
],
|
107
|
+
"status" : "OK"
|
108
|
+
}
|
109
|
+
http_version:
|
110
|
+
recorded_at: Thu, 21 Aug 2014 19:05:18 GMT
|
111
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,168 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://maps.google.com/maps/api/geocode/json?address=62510,%20fr®ion=fr&sensor=false
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=UTF-8
|
23
|
+
Date:
|
24
|
+
- Tue, 14 Apr 2015 10:02:19 GMT
|
25
|
+
Expires:
|
26
|
+
- Wed, 15 Apr 2015 10:02:19 GMT
|
27
|
+
Cache-Control:
|
28
|
+
- public, max-age=86400
|
29
|
+
Access-Control-Allow-Origin:
|
30
|
+
- "*"
|
31
|
+
Server:
|
32
|
+
- mafe
|
33
|
+
X-Xss-Protection:
|
34
|
+
- 1; mode=block
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
Alternate-Protocol:
|
38
|
+
- 443:quic,p=0.5
|
39
|
+
Accept-Ranges:
|
40
|
+
- none
|
41
|
+
Vary:
|
42
|
+
- Accept-Language,Accept-Encoding
|
43
|
+
Transfer-Encoding:
|
44
|
+
- chunked
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: |
|
48
|
+
{
|
49
|
+
"results" : [
|
50
|
+
{
|
51
|
+
"address_components" : [
|
52
|
+
{
|
53
|
+
"long_name" : "Liévin",
|
54
|
+
"short_name" : "Liévin",
|
55
|
+
"types" : [ "locality", "political" ]
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"long_name" : "Pas-de-Calais",
|
59
|
+
"short_name" : "62",
|
60
|
+
"types" : [ "administrative_area_level_2", "political" ]
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"long_name" : "Nord-Pas-de-Calais",
|
64
|
+
"short_name" : "Nord-Pas-de-Calais",
|
65
|
+
"types" : [ "administrative_area_level_1", "political" ]
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"long_name" : "France",
|
69
|
+
"short_name" : "FR",
|
70
|
+
"types" : [ "country", "political" ]
|
71
|
+
}
|
72
|
+
],
|
73
|
+
"formatted_address" : "Liévin, France",
|
74
|
+
"geometry" : {
|
75
|
+
"bounds" : {
|
76
|
+
"northeast" : {
|
77
|
+
"lat" : 50.4418239,
|
78
|
+
"lng" : 2.805152000000001
|
79
|
+
},
|
80
|
+
"southwest" : {
|
81
|
+
"lat" : 50.4042681,
|
82
|
+
"lng" : 2.735231
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"location" : {
|
86
|
+
"lat" : 50.417921,
|
87
|
+
"lng" : 2.775222
|
88
|
+
},
|
89
|
+
"location_type" : "APPROXIMATE",
|
90
|
+
"viewport" : {
|
91
|
+
"northeast" : {
|
92
|
+
"lat" : 50.4418239,
|
93
|
+
"lng" : 2.805152000000001
|
94
|
+
},
|
95
|
+
"southwest" : {
|
96
|
+
"lat" : 50.4042681,
|
97
|
+
"lng" : 2.735231
|
98
|
+
}
|
99
|
+
}
|
100
|
+
},
|
101
|
+
"place_id" : "ChIJPa6A1BM63UcRxL7j0Oqjd00",
|
102
|
+
"types" : [ "locality", "political" ]
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"address_components" : [
|
106
|
+
{
|
107
|
+
"long_name" : "62510",
|
108
|
+
"short_name" : "62510",
|
109
|
+
"types" : [ "postal_code" ]
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"long_name" : "Arques",
|
113
|
+
"short_name" : "Arques",
|
114
|
+
"types" : [ "locality", "political" ]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"long_name" : "Pas-de-Calais",
|
118
|
+
"short_name" : "62",
|
119
|
+
"types" : [ "administrative_area_level_2", "political" ]
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"long_name" : "Nord-Pas-de-Calais",
|
123
|
+
"short_name" : "Nord-Pas-de-Calais",
|
124
|
+
"types" : [ "administrative_area_level_1", "political" ]
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"long_name" : "France",
|
128
|
+
"short_name" : "FR",
|
129
|
+
"types" : [ "country", "political" ]
|
130
|
+
}
|
131
|
+
],
|
132
|
+
"formatted_address" : "62510 Arques, France",
|
133
|
+
"geometry" : {
|
134
|
+
"bounds" : {
|
135
|
+
"northeast" : {
|
136
|
+
"lat" : 50.7718453,
|
137
|
+
"lng" : 2.3640944
|
138
|
+
},
|
139
|
+
"southwest" : {
|
140
|
+
"lat" : 50.7062008,
|
141
|
+
"lng" : 2.271485
|
142
|
+
}
|
143
|
+
},
|
144
|
+
"location" : {
|
145
|
+
"lat" : 50.73423589999999,
|
146
|
+
"lng" : 2.3198738
|
147
|
+
},
|
148
|
+
"location_type" : "APPROXIMATE",
|
149
|
+
"viewport" : {
|
150
|
+
"northeast" : {
|
151
|
+
"lat" : 50.7718453,
|
152
|
+
"lng" : 2.3640944
|
153
|
+
},
|
154
|
+
"southwest" : {
|
155
|
+
"lat" : 50.7062008,
|
156
|
+
"lng" : 2.271485
|
157
|
+
}
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"place_id" : "ChIJ_7Ma0bT-3EcR4Col8UHxChw",
|
161
|
+
"types" : [ "postal_code" ]
|
162
|
+
}
|
163
|
+
],
|
164
|
+
"status" : "OK"
|
165
|
+
}
|
166
|
+
http_version:
|
167
|
+
recorded_at: Tue, 14 Apr 2015 10:02:19 GMT
|
168
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,123 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://maps.google.com/maps/api/geocode/json?address=100%20Spear%20St%20Apt.%205,%20San%20Francisco,%20CA,%2094105,%20US&sensor=false
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=UTF-8
|
23
|
+
Date:
|
24
|
+
- Wed, 12 Aug 2015 20:07:52 GMT
|
25
|
+
Expires:
|
26
|
+
- Thu, 13 Aug 2015 20:07:52 GMT
|
27
|
+
Cache-Control:
|
28
|
+
- public, max-age=86400
|
29
|
+
Access-Control-Allow-Origin:
|
30
|
+
- "*"
|
31
|
+
Server:
|
32
|
+
- mafe
|
33
|
+
X-Xss-Protection:
|
34
|
+
- 1; mode=block
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
Accept-Ranges:
|
38
|
+
- none
|
39
|
+
Vary:
|
40
|
+
- Accept-Language,Accept-Encoding
|
41
|
+
Transfer-Encoding:
|
42
|
+
- chunked
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: |
|
46
|
+
{
|
47
|
+
"results" : [
|
48
|
+
{
|
49
|
+
"address_components" : [
|
50
|
+
{
|
51
|
+
"long_name" : "5",
|
52
|
+
"short_name" : "5",
|
53
|
+
"types" : [ "subpremise" ]
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"long_name" : "100",
|
57
|
+
"short_name" : "100",
|
58
|
+
"types" : [ "street_number" ]
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"long_name" : "Spear Street",
|
62
|
+
"short_name" : "Spear St",
|
63
|
+
"types" : [ "route" ]
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"long_name" : "South Beach",
|
67
|
+
"short_name" : "South Beach",
|
68
|
+
"types" : [ "neighborhood", "political" ]
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"long_name" : "San Francisco",
|
72
|
+
"short_name" : "SF",
|
73
|
+
"types" : [ "locality", "political" ]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"long_name" : "San Francisco County",
|
77
|
+
"short_name" : "San Francisco County",
|
78
|
+
"types" : [ "administrative_area_level_2", "political" ]
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"long_name" : "California",
|
82
|
+
"short_name" : "CA",
|
83
|
+
"types" : [ "administrative_area_level_1", "political" ]
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"long_name" : "United States",
|
87
|
+
"short_name" : "US",
|
88
|
+
"types" : [ "country", "political" ]
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"long_name" : "94105",
|
92
|
+
"short_name" : "94105",
|
93
|
+
"types" : [ "postal_code" ]
|
94
|
+
}
|
95
|
+
],
|
96
|
+
"formatted_address" : "100 Spear Street #5, San Francisco, CA 94105, USA",
|
97
|
+
"geometry" : {
|
98
|
+
"location" : {
|
99
|
+
"lat" : 37.7920876,
|
100
|
+
"lng" : -122.3938666
|
101
|
+
},
|
102
|
+
"location_type" : "ROOFTOP",
|
103
|
+
"viewport" : {
|
104
|
+
"northeast" : {
|
105
|
+
"lat" : 37.7934365802915,
|
106
|
+
"lng" : -122.3925176197085
|
107
|
+
},
|
108
|
+
"southwest" : {
|
109
|
+
"lat" : 37.7907386197085,
|
110
|
+
"lng" : -122.3952155802915
|
111
|
+
}
|
112
|
+
}
|
113
|
+
},
|
114
|
+
"partial_match" : true,
|
115
|
+
"place_id" : "EjExMDAgU3BlYXIgU3RyZWV0ICM1LCBTYW4gRnJhbmNpc2NvLCBDQSA5NDEwNSwgVVNB",
|
116
|
+
"types" : [ "subpremise" ]
|
117
|
+
}
|
118
|
+
],
|
119
|
+
"status" : "OK"
|
120
|
+
}
|
121
|
+
http_version:
|
122
|
+
recorded_at: Wed, 12 Aug 2015 20:07:52 GMT
|
123
|
+
recorded_with: VCR 2.9.3
|