google_places 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/.gitignore CHANGED
@@ -7,3 +7,4 @@ pkg/*
7
7
  spec/api_key.rb
8
8
  .yardoc/
9
9
  doc/
10
+ spec/vcr_cassettes/*
@@ -33,6 +33,12 @@ objects has these attributes:
33
33
  * *lng*: the longitude of the spot
34
34
  * *name*: the name of the spot
35
35
  * *icon*: a URL to the icon of this spot
36
+ * *types*: array of feature types describing the spot, see list of supported types[http://code.google.com/apis/maps/documentation/places/supported_types.html]
37
+ * *formatted_phone_number*: formatted phone number of the spot (eg (555)555-555)
38
+ * *formatted_address*: the full address of the spot formatted with commas
39
+ * *address_components*: the components (eg street address, city, state) of the spot's address in an array
40
+ * *rating*: the rating of this spot on Google Places
41
+ * *url*: the url of this spot on Google Places
36
42
 
37
43
  === Retrieving a list of spots
38
44
 
@@ -44,6 +50,30 @@ Then retrieve a list of spots:
44
50
 
45
51
  @client.spots(-33.8670522, 151.1957362)
46
52
 
53
+ Search by a specific type:
54
+
55
+ @client.spots(-33.8670522, 151.1957362, :types => 'restaurant')
56
+
57
+ Search by multiple types:
58
+
59
+ @client.spots(-33.8670522, 151.1957362, :types => ['restaurant','food'])
60
+
61
+ Search by multiple types but exclude one type:
62
+
63
+ @client.spots(-33.8670522, 151.1957362, :types => ['restaurant','food'], :exclude => 'cafe')
64
+
65
+ Search by multiple types but exclude multiple types:
66
+
67
+ @client.spots(-33.8670522, 151.1957362, :types => ['restaurant','food'], :exclude => ['cafe', 'establishment'])
68
+
69
+ Search by name:
70
+
71
+ @client.spots(-33.8670522, 151.1957362, :name => 'italian')
72
+
73
+ Search by name *and* type:
74
+
75
+ @client.spots(-33.8670522, 151.1957362, :name => 'italian', :types => 'restaurant')
76
+
47
77
  === Retrieving a single spot
48
78
 
49
79
  First register a new Client:
@@ -53,3 +83,30 @@ First register a new Client:
53
83
  Then retrieve the spot:
54
84
 
55
85
  @client.spot('CmRYAAA...upoTH3g')
86
+
87
+
88
+ == Development
89
+
90
+ You're very welcome to add functionality to this gem. To do so, follow these steps:
91
+
92
+ 1. Fork the project on Github
93
+ 2. Clone your own fork on your development machine
94
+ 3. Install the dependencies with <tt>bundle install</tt>
95
+ 4. Copy <tt>spec/api_key.sample.rb</tt> to <tt>spec/api_key.rb</tt>
96
+ 5. Insert your own Google Places API key in <tt>spec/api_key.rb</tt>
97
+ 6. Run the specs with <tt>rspec spec</tt>
98
+ 7. Hackety hack
99
+ 8. ???
100
+ 9. PROFIT
101
+
102
+ Feel free to send me a pull request but please make sure your changes are sufficiently covered by RSpec.
103
+
104
+
105
+ == Important Note
106
+
107
+ Concerning the <tt>reference</tt> field, the Google Places API documentation states:
108
+
109
+ "You can store this token and use it at any time in future to refresh cached data about this Place,
110
+ but the same token is not guaranteed to be returned for any given Place across different searches."
111
+
112
+ Please be aware that the <tt>reference</tt> field in spot details may differ from the <tt>reference</tt> used to retrieve that spot.
@@ -3,11 +3,11 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "google_places"
6
- s.version = '0.0.2'
6
+ s.version = '0.0.3'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Marcel de Graaf"]
9
9
  s.email = ["mail@marceldegraaf.net"]
10
- s.homepage = "http://marceldegraaf.net"
10
+ s.homepage = "https://github.com/marceldegraaf/google_places"
11
11
  s.summary = %q{A Ruby wrapper around the Google Places API.}
12
12
  s.description = %q{This gem provides a Ruby wrapper around the Google Places API for use in your own project. Please note that this gem does not provide OAuth authentication.}
13
13
 
@@ -1,22 +1,35 @@
1
1
  module GooglePlaces
2
2
  class Spot
3
- attr_accessor :lat, :lng, :name, :icon, :reference, :vicinity
3
+ attr_accessor :lat, :lng, :name, :icon, :reference, :vicinity, :types, :id, :formatted_phone_number, :formatted_address, :address_components, :rating, :url
4
4
 
5
5
  def self.list(lat, lng, api_key, options = {})
6
6
  radius = options.delete(:radius) || 200
7
7
  sensor = options.delete(:sensor) || false
8
+ types = options.delete(:types)
9
+ name = options.delete(:name)
8
10
  location = Location.new(lat, lng)
11
+ exclude = options.delete(:exclude) || []
9
12
 
10
- response = Request.spots(
13
+ exclude = [exclude] unless exclude.is_a?(Array)
14
+
15
+ options = {
11
16
  :location => location.format,
12
17
  :radius => radius,
13
18
  :sensor => sensor,
14
- :key => api_key
15
- )
19
+ :key => api_key,
20
+ :name => name
21
+ }
16
22
 
17
- response['results'].map do |result|
18
- self.new(result)
23
+ # Accept Types as a string or array
24
+ if types
25
+ types = (types.is_a?(Array) ? types.join('|') : types)
26
+ options.merge!(:types => types)
19
27
  end
28
+
29
+ response = Request.spots(options)
30
+ response['results'].map do |result|
31
+ self.new(result) if (result['types'] & exclude) == []
32
+ end.compact
20
33
  end
21
34
 
22
35
  def self.find(reference, api_key, options = {})
@@ -32,12 +45,19 @@ module GooglePlaces
32
45
  end
33
46
 
34
47
  def initialize(json_result_object)
35
- @reference = json_result_object['reference']
36
- @vicinity = json_result_object['vicinity']
37
- @lat = json_result_object['geometry']['location']['lat']
38
- @lng = json_result_object['geometry']['location']['lng']
39
- @name = json_result_object['name']
40
- @icon = json_result_object['icon']
48
+ @reference = json_result_object['reference']
49
+ @vicinity = json_result_object['vicinity']
50
+ @lat = json_result_object['geometry']['location']['lat']
51
+ @lng = json_result_object['geometry']['location']['lng']
52
+ @name = json_result_object['name']
53
+ @icon = json_result_object['icon']
54
+ @types = json_result_object['types']
55
+ @id = json_result_object['id']
56
+ @formatted_phone_number = json_result_object['formatted_phone_number']
57
+ @formatted_address = json_result_object['formatted_address']
58
+ @address_components = json_result_object['address_components']
59
+ @rating = json_result_object['rating']
60
+ @url = json_result_object['url']
41
61
  end
42
62
 
43
63
  end
@@ -28,7 +28,7 @@ describe GooglePlaces::Request do
28
28
  use_vcr_cassette 'single_spot'
29
29
 
30
30
  it 'should retrieve a single spot' do
31
- response = GooglePlaces::Request.spots(
31
+ response = GooglePlaces::Request.spot(
32
32
  :reference => @reference,
33
33
  :sensor => @sensor,
34
34
  :key => api_key
@@ -13,13 +13,107 @@ describe GooglePlaces::Spot do
13
13
  context 'List spots' do
14
14
  use_vcr_cassette 'list_spots'
15
15
 
16
- before :each do
17
- @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor)
16
+ after(:each) do
17
+ @collection.map(&:class).uniq.should == [GooglePlaces::Spot]
18
18
  end
19
19
 
20
20
  it 'should be a collection of Spots' do
21
- @collection.map(&:class).uniq.should == [GooglePlaces::Spot]
21
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor)
22
+ end
23
+
24
+ describe 'with a single type' do
25
+ use_vcr_cassette 'list_spots_with_single_type'
26
+
27
+ before(:each) do
28
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor, :types => 'cafe')
29
+ end
30
+
31
+ it 'should have Spots with a specific type' do
32
+ @collection.each do |spot|
33
+ spot.types.should include('cafe')
34
+ end
35
+ end
36
+ end
37
+
38
+ describe 'with multiple types' do
39
+ use_vcr_cassette 'list_spots_with_multiple_types'
40
+
41
+ before(:each) do
42
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor, :types => ['food','establishment'])
43
+ end
44
+
45
+ it 'should have Spots with specific types' do
46
+ @collection.each do |spot|
47
+ spot.types.should include('food','establishment')
48
+ end
49
+ end
50
+ end
51
+
52
+ describe 'searching by name' do
53
+ use_vcr_cassette 'list_spots_with_name'
54
+
55
+ before(:each) do
56
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor, :name => 'italian')
57
+ end
58
+
59
+ # Apparently the Google Places API returns spots with
60
+ # other names than "italian" as well. Disabled this
61
+ # test for now.
62
+ it 'should have Spots with a specific name' do
63
+ pending 'Disabled due to unpredictable API results'
64
+
65
+ #@collection.each do |spot|
66
+ # spot.name.downcase.should include('italian')
67
+ #end
68
+ end
22
69
  end
70
+
71
+ describe 'searching by name and types' do
72
+ use_vcr_cassette 'list_spots_with_name_and_types'
73
+
74
+ before(:each) do
75
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor, :types => ['food','establishment'], :name => 'italian')
76
+ end
77
+
78
+ # Apparently the Google Places API returns spots with
79
+ # other names than "italian" as well. Disabled this
80
+ # test for now.
81
+ it 'should have Spots with a specific name' do
82
+ pending 'Disabled due to unpredictable API results'
83
+
84
+ #@collection.each do |spot|
85
+ # spot.name.downcase.should include('italian')
86
+ #end
87
+ end
88
+
89
+ it 'should have Spots with specific types' do
90
+ @collection.each do |spot|
91
+ spot.types.should include('food','establishment')
92
+ end
93
+ end
94
+ end
95
+
96
+ describe 'searching by types with exclusion' do
97
+ use_vcr_cassette 'list_spots_with_types_and_exclusion'
98
+
99
+ it 'should exclude spots with type "restaurant"' do
100
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor, :types => ['food','establishment'], :exclude => 'restaurant')
101
+
102
+ @collection.map(&:types).each do |types|
103
+ types.should_not include('restaurant')
104
+ end
105
+ end
106
+
107
+ it 'should exclude spots with type "restaurant" and "cafe"' do
108
+ @collection = GooglePlaces::Spot.list(@lat, @lng, api_key, :radius => @radius, :sensor => @sensor, :types => ['food','establishment'], :exclude => ['restaurant', 'cafe'])
109
+
110
+ @collection.map(&:types).each do |types|
111
+ types.should_not include('restaurant')
112
+ types.should_not include('cafe')
113
+ end
114
+ end
115
+ end
116
+
23
117
  end
24
118
 
25
119
  context 'Find a single spot' do
@@ -33,9 +127,9 @@ describe GooglePlaces::Spot do
33
127
  @spot.class.should == GooglePlaces::Spot
34
128
  end
35
129
 
36
- %w(reference vicinity lat lng name icon).each do |attribute|
130
+ %w(reference vicinity lat lng name icon types id formatted_phone_number formatted_address address_components rating url types).each do |attribute|
37
131
  it "should have the attribute: #{attribute}" do
38
- @spot.send(attribute).to_s.should_not be_empty
132
+ @spot.respond_to?(attribute).should == true
39
133
  end
40
134
  end
41
135
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_places
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcel de Graaf
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-17 00:00:00 +02:00
18
+ date: 2011-06-21 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -100,11 +100,9 @@ files:
100
100
  - spec/google_places/request_spec.rb
101
101
  - spec/google_places/spot_spec.rb
102
102
  - spec/spec_helper.rb
103
- - spec/vcr_cassettes/list_spots.yml
104
- - spec/vcr_cassettes/single_spot.yml
105
103
  - spec/vcr_setup.rb
106
104
  has_rdoc: true
107
- homepage: http://marceldegraaf.net
105
+ homepage: https://github.com/marceldegraaf/google_places
108
106
  licenses: []
109
107
 
110
108
  post_install_message:
@@ -144,6 +142,4 @@ test_files:
144
142
  - spec/google_places/request_spec.rb
145
143
  - spec/google_places/spot_spec.rb
146
144
  - spec/spec_helper.rb
147
- - spec/vcr_cassettes/list_spots.yml
148
- - spec/vcr_cassettes/single_spot.yml
149
145
  - spec/vcr_setup.rb
@@ -1,326 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: https://maps.googleapis.com:443/maps/api/place/search/json?radius=200&sensor=false&key=AIzaSyATGBjcfrRXQtNEMMyt8Fw7tSGEY8PQwv0&location=-33.8670522%2C151.1957362
6
- body:
7
- headers:
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- content-type:
14
- - application/json; charset=UTF-8
15
- x-xss-protection:
16
- - 1; mode=block
17
- server:
18
- - mafe
19
- date:
20
- - Mon, 16 May 2011 20:56:23 GMT
21
- cache-control:
22
- - private
23
- vary:
24
- - Accept-Language
25
- body: |
26
- {
27
- "status": "OK",
28
- "results": [ {
29
- "name": "Pyrmont",
30
- "types": [ "locality", "political" ],
31
- "geometry": {
32
- "location": {
33
- "lat": -33.8695456,
34
- "lng": 151.1945404
35
- },
36
- "viewport": {
37
- "southwest": {
38
- "lat": -33.8788097,
39
- "lng": 151.1785330
40
- },
41
- "northeast": {
42
- "lat": -33.8602805,
43
- "lng": 151.2105478
44
- }
45
- }
46
- },
47
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
48
- "reference": "CnRoAAAAZjKdehGj2kVxm9J7E0UoOGJo_bGXDThTlRlifDJlDlPGeEJ5yQ-2fUSofYhS3twtTZED0hhebpOYLA8b8VvR_9TkrrxfZXIg9S_UsHMYh_F5eABunplqLwAggfyWfch5YK5SqxazWa2WoQoz05H7IxIQyvxeUL8FrzZFAmdqRKrR6BoUknI6yaGcbMY6CyLuIyMRYmpdt4Y",
49
- "id": "40840d476baa531e0227a353b1bef70262f66e7e"
50
- }, {
51
- "name": "Star City",
52
- "vicinity": "Pyrmont Street, Pyrmont",
53
- "types": [ "lodging", "establishment" ],
54
- "geometry": {
55
- "location": {
56
- "lat": -33.8682000,
57
- "lng": 151.1945860
58
- }
59
- },
60
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png",
61
- "reference": "CnRhAAAAKjwqd8kGDNgdvMj2_VJjLqoizf80ohJLumWHxK6cY4E3MHZM92Y8lywFuFCPCo73dowC4U0vxqVTLP607XOw7ndmkexMRF22spdKNCgtfQcLVaC4tXKqUKjsjG9lALCHyIrTay4jbGNMZwcr4e2qRRIQtbUuBsA5rx65luq526M-VRoUGJUT7lIgHoSWDAk6tTG5Pv6zGTw",
62
- "id": "be880205d64059c306bbf198f908b81cabb9f066"
63
- }, {
64
- "name": "Ripples at Sydney Wharf",
65
- "vicinity": "Pirrama Road, Pyrmont",
66
- "types": [ "establishment" ],
67
- "geometry": {
68
- "location": {
69
- "lat": -33.8667010,
70
- "lng": 151.1973990
71
- }
72
- },
73
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
74
- "reference": "CnRuAAAAboUpEekYUmyLEpeyN5g6dPpHB9HjZpNUJ8wQ4DVmfV0-4vyPJpBjMLXtqlH35vrVB_8Mp8Lxnw0m3mSCpbpGWg5yawiR5CKpkKhV4FGWOkFaU10U9yuN35MBPcQPZht73_TF8l_RWA4fKY293fR90BIQO_6doKC1JbNu_FoeFlSRSRoU3vuANKslG6fG_owbbMxYQll58iQ",
75
- "id": "dd030d236b8ccdc525f7a40893eb492f8fc5d55d"
76
- }, {
77
- "name": "Google Sydney",
78
- "vicinity": "Pirrama Road, Pyrmont",
79
- "types": [ "establishment" ],
80
- "geometry": {
81
- "location": {
82
- "lat": -33.8669710,
83
- "lng": 151.1958750
84
- }
85
- },
86
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
87
- "reference": "CnRlAAAAvclMmIcKJtY2kLeOz_rqW3ikacM7LuFwnX1qD5PiDRrQCRO0v9cm6Mo7WYKGCIO_ngg5zoyfueoQVQxbdRPQoOHYouwI0kxI3EkzhfpI5t8lCRCu_wcx4RmG9-mQNesbfwRL7xdX9CTQKmlyzNJ3LBIQpoWWkt1UACMUMyf_u5J-wBoUF5QZuOBgOo2p_W67o10WnABV72k",
88
- "id": "4f89212bf76dde31f092cfc14d7506555d85b5c7"
89
- }, {
90
- "name": "Signorelli Gastronomia",
91
- "vicinity": "Trouton Place, Pyrmont",
92
- "types": [ "restaurant", "food", "establishment" ],
93
- "geometry": {
94
- "location": {
95
- "lat": -33.8665470,
96
- "lng": 151.1959410
97
- }
98
- },
99
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
100
- "reference": "CnRuAAAA-wkpRsz-a-oCbui2nF7oE1laTV_2CGAqj4OjkpT2oi49JDG2egl89MjT7qGr59H8epStVq-Y91ZNMVZJoQXOGDrwgzdr3cFv-Q6ZSu8VQedz2sUOcehgL6-bvwbzdymfplRMgGm1wd6FMkSnEorvNxIQJJSCO5xFerHFlrHgAinPAhoU1h3gw1_Wq_WA678SKzN9u9_7hK4",
101
- "id": "4d716a646c32978aa12d1057dcf9f503a20195c0"
102
- }, {
103
- "name": "Garden Buffet",
104
- "vicinity": "Pyrmont Street, Pyrmont",
105
- "types": [ "restaurant", "food", "establishment" ],
106
- "geometry": {
107
- "location": {
108
- "lat": -33.8681980,
109
- "lng": 151.1945840
110
- }
111
- },
112
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
113
- "reference": "CnRlAAAAUrboV7a3e4QO_4PUrx1SgoWrF5EBlsSYHWXea8yEY4Zj4kpHY4QrcPOYjiR6s900N-sfZk4_HjUPW9fq0TtVANyHVqnHoOZITHIYGJY9Lji640IGgRtiKod1C9hiKPxcjfdz4ENXC0dqGjiBU5lqCxIQB5r-0dXxGtLSYHga7z7sFBoUJF9uHMWgU_xDKYuLIoVqv3fh6fc",
114
- "id": "eaf5d4b14ebeae84df661e1f6d593259abac83d4"
115
- }, {
116
- "name": "Astral",
117
- "vicinity": "Pyrmont Street, Sydney",
118
- "types": [ "restaurant", "food", "establishment" ],
119
- "geometry": {
120
- "location": {
121
- "lat": -33.8681980,
122
- "lng": 151.1945840
123
- }
124
- },
125
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
126
- "reference": "CmReAAAAehMqsOqjki53jOYHTSzNb3JPzx6K-hPgg2ngZajWjGCAiE4VxRRTsDX9kqx7EaRJbYNNeJSNO8L4WW81brQdxQj_cRoQyA2rG1xufcgn4UNa6d8RE2M4d_JoWhFR-qahEhD0zHl0SlHzGKtXbaU-ORSyGhRZKXSaWjD3gfzsuVp8YZLcrdD2CQ",
127
- "id": "bceeb9b6d5ac2f9f2573bbed9e1b3240f1fd0e12"
128
- }, {
129
- "name": "Accenture",
130
- "vicinity": "Pirrama Road, Pyrmont",
131
- "types": [ "establishment" ],
132
- "geometry": {
133
- "location": {
134
- "lat": -33.8670840,
135
- "lng": 151.1959500
136
- }
137
- },
138
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
139
- "reference": "CoQBfgAAALEv8hs9sdLazHlXXwsxxZ2UOxL7cI5thGrPiEPzIWGzUO3kJ7AtOuFlZj1rrcohZ-IKd00HL75TI-zL-eeCjLLlQcwLJKDDEyhnxdfXpPXWKMSpctmNlFZzuc-q-5QT7zCiP_SkXD0_E8JhHiD4koirfgUaKrghycMPWF9Z4fNWEhCLxE4D2_vKwhxLy4v1qqElGhRtvU3-A-zgoHSs6um69bXj0ePdJg",
140
- "id": "27e84d1acda19c14b9c7f5271242796891bc9c9e"
141
- }, {
142
- "name": "Fairfax Media",
143
- "vicinity": "Darling Island Road, Pyrmont",
144
- "types": [ "establishment" ],
145
- "geometry": {
146
- "location": {
147
- "lat": -33.8654620,
148
- "lng": 151.1959830
149
- }
150
- },
151
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
152
- "reference": "CnRlAAAA3s8dTF4shgM5feBxw8cyuuzghSaW2FcdNlAeWLh6s5JMUxF7W-oCnDczD3Q_zAxXki049KMI8nNboUNcq0FiqkfkOesd_DTt5M3XqfGJy-SA8ooF9Jg1YGp4YxnEH8OiXOba39RgNMB3fply8-CIDBIQrMlWAE9hX0WQw8F_T7EnlRoU94zo4ZY_wapa8_S3CxVv-FUYkT4",
153
- "id": "3e2826e1b4b4e5cbee354260f687d14938e6068f"
154
- }, {
155
- "name": "Fairfax Media",
156
- "vicinity": "Darling Island Road, Pyrmont",
157
- "types": [ "establishment" ],
158
- "geometry": {
159
- "location": {
160
- "lat": -33.8652490,
161
- "lng": 151.1961010
162
- }
163
- },
164
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
165
- "reference": "CnRkAAAAkdvnxcBAPpeOMt3t-MmIJ0YMDqHgOrAq4RO8YcgNqcRtadnX_1Iej61nsIsgtMBeigVWBE4-Hrj7vR993RzpmmYkRqgIIXYxBqF911JkgZwMPVaQBJp6xb3MsWvBjYRKZa0LbSul89Rx14PVxdK_FhIQCWmL3fkjhn94Oz786uPF3xoUSwuum2vDZEa1EHT_cD8dNSAeHnA",
166
- "id": "1f2ddcefca08ffc687247c1ecf209054336aebb8"
167
- }, {
168
- "name": "John Holland",
169
- "vicinity": "Pirrama Rd, Pyrmont",
170
- "types": [ "establishment" ],
171
- "geometry": {
172
- "location": {
173
- "lat": -33.8687940,
174
- "lng": 151.1968300
175
- }
176
- },
177
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
178
- "reference": "CnRjAAAAtKWuPt-xPqEuys5kHwscxex99t4OWVpG8s-3IDLwDCJtT72Fq9JDSMqBTtNx0Tj-jdZ_QGy80KnYbBB0wWMs3pwXXFXoGub0pivpPpBi5JpJ_lnljyscthh6vIKECl9JQtF_798os9rL8D7iWKZx7BIQ4Bex-MXFyB1ytBcB9w5H_xoUqeAM8bsU5C3t_T6xe46j_tuPdis",
179
- "id": "61178ac5b42a4045c415fffdf6d474ba9b08d068"
180
- }, {
181
- "name": "Seans Kitchen",
182
- "vicinity": "Pyrmont Street, Pyrmont",
183
- "types": [ "restaurant", "food", "establishment" ],
184
- "geometry": {
185
- "location": {
186
- "lat": -33.8681980,
187
- "lng": 151.1945840
188
- }
189
- },
190
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
191
- "reference": "CnRkAAAAYCQHi4uqW9_FO82_aWfKGlJYshMRIgjhThKvGxNi0HRRn5WDMEweiz7SYjz6Bl0BlEloBDw6PJnxg88KtkoS1ItfiMOHVuJf049XPqfdoLk58CayJL8fzfzhg_F7bnD5aQLBXwJjpBrlRk63w_8W6BIQTB98PvbgYXRIP0qNBEW9VhoUbg4LBDKRUlSQncPJJaUN4V4d6RI",
192
- "id": "88751426b87d7072ea1acf98f35695d02985addb"
193
- }, {
194
- "name": "Channel Seven",
195
- "vicinity": "Pirrama Road, Pyrmont",
196
- "types": [ "establishment" ],
197
- "geometry": {
198
- "location": {
199
- "lat": -33.8660710,
200
- "lng": 151.1944390
201
- }
202
- },
203
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
204
- "reference": "CnRlAAAALz1LkbIHsaliP6WoAaNxU01M6zC3kZNewLqu2R6u2zOxkpTFv5R9B0tRbDD9mly1R7NgHZzZSI2BTLXfJj8YKTBNvPTNSF-JM8BmY1YTFrXryxWThrMg172gU40ypom4o2qhNidm_fkbgUHKv-bDhxIQuAzFJvp28JqqePT8CRFWHxoUQQffs7Qp7giQZaipftWiEBglHzs",
205
- "id": "19cdf89322aa1fc3523c583a74a27645b11430e8"
206
- }, {
207
- "name": "Avis",
208
- "vicinity": "Pyrmont Street, Pyrmont",
209
- "types": [ "car_rental", "establishment" ],
210
- "geometry": {
211
- "location": {
212
- "lat": -33.8681980,
213
- "lng": 151.1945840
214
- }
215
- },
216
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
217
- "reference": "CmRbAAAA1IUBZVA5jwmicTiW8zNbvLulmf2GJ-uEiDfLevJnoVy8VcczuKi3IXFEXtRtXoZuGYqq2nLa0XKQrH3dNSaV4xgwPxSVhSBRU4yevB_Z2hRifoFbVNgMTbtgPo1_A1X0EhABhJpeDfk5MbbWqC_bw9y5GhSHrreEdpex54mreNHTaIlZZc9Cgg",
218
- "id": "d559b2e8e491212130cf17c4d0ac595c72b3931f"
219
- }, {
220
- "name": "Lotus Pond",
221
- "vicinity": "Pyrmont Street, Pyrmont",
222
- "types": [ "restaurant", "food", "establishment" ],
223
- "geometry": {
224
- "location": {
225
- "lat": -33.8681980,
226
- "lng": 151.1945840
227
- }
228
- },
229
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
230
- "reference": "CnRiAAAAZ4ToVtI44jrLdD_HwTqrDis69gKZR3KpPz1U7t24gj0jF-hXgeLDij8CywRTX02Ed4ttYguSqCofCakRf1K0G6l15D7ODUma7_VLBs-77i3OPBpQBNe30IhUWpAsQRSAK3B_OZF7iWY95IyhSpnZ-hIQGjvxTeK7zKnY3h23cbMR0hoUPlwdkmCZ_GQ9l897p7jdZpqx22U",
231
- "id": "ca11a8721d7fa06d9ed6ce80c7e49af70f440fd8"
232
- }, {
233
- "name": "Bite Me Burger",
234
- "vicinity": "Pyrmont Street, Pyrmont",
235
- "types": [ "restaurant", "food", "establishment" ],
236
- "geometry": {
237
- "location": {
238
- "lat": -33.8681980,
239
- "lng": 151.1945840
240
- }
241
- },
242
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
243
- "reference": "CnRlAAAALDu5NYsmU6qyxiaqJt-jDB2TfH4LuKr65ETEl1MFu8BR3BzmHpOU1IhS6bLlk0IKNQCOhVxxuOlGj-NH3TLgvjxm7HMkcG3rtOKrs73VhBwOFxtcnrwKkGOaOXzfUdle0yRF8qkK_-BR1I95tfYj2BIQdyXkbNEJmJiH6uzlZtGbFhoUlde33-u74nwjYIhNNG2-fXy9N9I",
244
- "id": "c59ee010f131efcf1cd728c05ef73215319e52f0"
245
- }, {
246
- "name": "Fairfax Digital",
247
- "vicinity": "Pirrama Road, Pyrmont",
248
- "types": [ "establishment" ],
249
- "geometry": {
250
- "location": {
251
- "lat": -33.8660710,
252
- "lng": 151.1944390
253
- }
254
- },
255
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
256
- "reference": "CnRnAAAA2BjS9rAagMs7a4VIWYpIyiIwYFH7zXDILVNmldtwofuuPT7fEjXUP-Vq9_SqWvGsO3bTu7_ySbjyM71g5bW3kDu53O_5n_HjWm8JuEhuA5PAn5_NxGekLMhNPGKLKtZJmdQBlYisETGUqGQ7lbPDqxIQ05yEZ568oiOIi4FYzK9d_xoUXxS7lhyjgNg1nIqoJ0hKhu0S3Q0",
257
- "id": "6b3cb6af5b5bed3297d96b48aac81a96f95ead4c"
258
- }, {
259
- "name": "Doltone House - Darling Island Wharf",
260
- "vicinity": "Pirrama Road, Pyrmont",
261
- "types": [ "establishment" ],
262
- "geometry": {
263
- "location": {
264
- "lat": -33.8670520,
265
- "lng": 151.1957360
266
- }
267
- },
268
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
269
- "reference": "CoQBfAAAAIOvkBRskkkLdw2PoZpvoXJhDs9hNqdt5Emap9eDf1mNu86F92Abh8TGQrzHVGJIzQ8ZX5VAdFe6M8Gwon_Q69-19VRkkHQ0KK7WZhYYt3fH74ZYIapFr3JlYkgyxhj5yeQa4solpc2C3YA1fbYH4fJeof66_sj99S8oP-zYkBDgEhBRNNWZT8cri0UTvZPZa2K2GhRTKKbIbD4bs8S5cYhXkz7fVCYSKw",
270
- "id": "3ef986cd56bb3408bc1cf394f3dad9657c1d30f6"
271
- }, {
272
- "name": "Domain.Com.Au",
273
- "vicinity": "Pirrama Road, Pyrmont",
274
- "types": [ "real_estate_agency", "establishment" ],
275
- "geometry": {
276
- "location": {
277
- "lat": -33.8660710,
278
- "lng": 151.1944390
279
- }
280
- },
281
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
282
- "reference": "CnRkAAAA_C4kyy2pAof94NA2Z-qmYafl6n4QSk3l69DN37B049DUTEGAUkGj48Z_N2w7n1z2kuTzP-8CWaFga3RX7MUgt1oMmnqjrIKbqdKGwyJsMtI-XZdBw9ZRCwJuM5Jmk1MdjTHUxLljUG6Kh4dl4Jls5BIQUwrmN7ZD-tfPC7f-ZyfhoxoUYxYye9Llb3foY5Wpj5Eo-JnO9xQ",
283
- "id": "22069082ad380a2f09db4675e7474c87e8557f3d"
284
- }, {
285
- "name": "Fat Noodle",
286
- "vicinity": "Pyrmont Street, Pyrmont",
287
- "types": [ "restaurant", "food", "establishment" ],
288
- "geometry": {
289
- "location": {
290
- "lat": -33.8681980,
291
- "lng": 151.1945840
292
- }
293
- },
294
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
295
- "reference": "CnRhAAAA_QIS77PlT4aALc3BSQdII-L8WjsbqTdZXWkgQ_sbDB1eqEBqUy1MvTN3q52Yx7TJSZYpQHWahZ_31qUFt13fK0E00cwF6X6zvZpJXLGcmskfaN795mS1RZVpRzxQLihSpy066luwHDnZ5DtNeo0DJhIQO7RgNUxdMeJbA9V6LG4RQhoUX6dwl7glDhc3-VhN0LdXWM2gAto",
296
- "id": "ba9494fbebdb7e40f9a646aab93379212763195c"
297
- }, {
298
- "name": "Blue Eye Dragon",
299
- "vicinity": "Pyrmont Street, Pyrmont",
300
- "types": [ "restaurant", "food", "establishment" ],
301
- "geometry": {
302
- "location": {
303
- "lat": -33.8676090,
304
- "lng": 151.1936860
305
- }
306
- },
307
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
308
- "reference": "CnRmAAAAXkho1LLdtwMiNA1qppitMrj6zyw7KaTpvUuls_UHx_xunllNxp4mfiMwzm3uv_xDrVvKm4oc1baW1qzo0ZEEsOwc73dV4kPrjaLVek8nVD1tAFLRqpCi2wOI8TKs3Y4XxdJ2SUJ-RYZ__ZgY57YAGBIQU2FOTpI5dGTP2XmstdKseRoUl4KQPjQwbd78jnUQOKdI4mNhZ1k",
309
- "id": "00060cf64f16375913ec49d25cbb7829d3e08a88"
310
- }, {
311
- "name": "Port Jackson",
312
- "types": [ "locality", "political" ],
313
- "geometry": {
314
- "location": {
315
- "lat": -33.8517149,
316
- "lng": 151.1966444
317
- }
318
- },
319
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
320
- "reference": "CnRtAAAAqPzE3Of-4UH_8Jgo3_J7zCnDf5LfoQaTEezOcV1XH3P8WtlERBzwX5LMiEnc_gUz6FnOaBWSTNgcwdb1cfXJ0Ws6kJtqjS4Y9QtcpTmTuqUq4cwtzkwpSl0Cq6Staelh_4KncPMa6uma7R0oiDWhExIQVz3GTt8Uv9kaw8z6nQ-KXRoUIPaol1HIGplToOFrTiw7L5XxSP4",
321
- "id": "8dbf2c11a8cca5b1457b442e05d006a21969ce22"
322
- } ],
323
- "html_attributions": [ "Listings by \u003ca href=\"http://www.yellowpages.com.au/\"\u003eYellow Pages\u003c/a\u003e" ]
324
- }
325
-
326
- http_version: "1.1"
@@ -1,100 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: https://maps.googleapis.com:443/maps/api/place/details/json?reference=CoQBeAAAAO-prCRp9Atcj_rvavsLyv-DnxbGkw8QyRZb6Srm6QHOcww6lqFhIs2c7Ie6fMg3PZ4PhicfJL7ZWlaHaLDTqmRisoTQQUn61WTcSXAAiCOzcm0JDBnafqrskSpFtNUgzGAOx29WGnWSP44jmjtioIsJN9ik8yjK7UxP4buAmMPVEhBXPiCfHXk1CQ6XRuQhpztsGhQU4U6-tWjTHcLSVzjbNxoiuihbaA&sensor=false&key=AIzaSyATGBjcfrRXQtNEMMyt8Fw7tSGEY8PQwv0
6
- body:
7
- headers:
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- content-type:
14
- - application/json; charset=UTF-8
15
- date:
16
- - Mon, 16 May 2011 20:56:23 GMT
17
- server:
18
- - mafe
19
- x-xss-protection:
20
- - 1; mode=block
21
- vary:
22
- - Accept-Language
23
- cache-control:
24
- - private
25
- body: |
26
- {
27
- "status": "OK",
28
- "result": {
29
- "name": "Strike Bowling Bar Darling Harbour",
30
- "vicinity": "The Promenade, Sydney",
31
- "types": [ "bar", "establishment" ],
32
- "formatted_phone_number": "(02) 9276 7100",
33
- "formatted_address": "22 The Promenade, Sydney NSW, Australia",
34
- "address_components": [ {
35
- "long_name": "22",
36
- "short_name": "22",
37
- "types": [ "street_number" ]
38
- }, {
39
- "long_name": "The Promenade",
40
- "short_name": "The Promenade",
41
- "types": [ "route" ]
42
- }, {
43
- "long_name": "Sydney",
44
- "short_name": "Sydney",
45
- "types": [ "locality", "political" ]
46
- }, {
47
- "long_name": "NSW",
48
- "short_name": "NSW",
49
- "types": [ "administrative_area_level_1", "political" ]
50
- }, {
51
- "long_name": "2000",
52
- "short_name": "2000",
53
- "types": [ "postal_code" ]
54
- } ],
55
- "geometry": {
56
- "location": {
57
- "lat": -33.8662990,
58
- "lng": 151.2016580
59
- }
60
- },
61
- "url": "http://maps.google.com/maps/place?cid=8959672613212618319",
62
- "icon": "http://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png",
63
- "reference": "CoQBeAAAAAUMe04SUnm6RIGcuqMjKTx-Ic-IUjZvVWd7iAUix9aXSq5zc6HD1qz0eV7WpKw6OYRn8ROXtP30MbsuXA6hwDnqMZP4CCEbuM0wzYxRhQYA8w1u5PhPc68qPYpnJewYgdAn8ABQS4HsAlngvJCzoUvQ3FgvTRtE-AvWiPNfb3QiEhBQr_GLVUynpIk18yxa89eGGhSs16baRJ75DexGyna6FTtzOTS97Q",
64
- "id": "0a4e24c365f4bd70080f99bb80153c5ba3faced8"
65
- },
66
- "html_attributions": [ ]
67
- }
68
-
69
- http_version: "1.1"
70
- - !ruby/struct:VCR::HTTPInteraction
71
- request: !ruby/struct:VCR::Request
72
- method: :get
73
- uri: https://maps.googleapis.com:443/maps/api/place/search/json?reference=CoQBeAAAAO-prCRp9Atcj_rvavsLyv-DnxbGkw8QyRZb6Srm6QHOcww6lqFhIs2c7Ie6fMg3PZ4PhicfJL7ZWlaHaLDTqmRisoTQQUn61WTcSXAAiCOzcm0JDBnafqrskSpFtNUgzGAOx29WGnWSP44jmjtioIsJN9ik8yjK7UxP4buAmMPVEhBXPiCfHXk1CQ6XRuQhpztsGhQU4U6-tWjTHcLSVzjbNxoiuihbaA&sensor=false&key=AIzaSyATGBjcfrRXQtNEMMyt8Fw7tSGEY8PQwv0
74
- body:
75
- headers:
76
- response: !ruby/struct:VCR::Response
77
- status: !ruby/struct:VCR::ResponseStatus
78
- code: 200
79
- message: OK
80
- headers:
81
- content-type:
82
- - application/json; charset=UTF-8
83
- x-xss-protection:
84
- - 1; mode=block
85
- server:
86
- - mafe
87
- date:
88
- - Tue, 17 May 2011 06:05:29 GMT
89
- cache-control:
90
- - private
91
- vary:
92
- - Accept-Language
93
- body: |
94
- {
95
- "status": "INVALID_REQUEST",
96
- "results": [ ],
97
- "html_attributions": [ ]
98
- }
99
-
100
- http_version: "1.1"