Class: GooglePlaces::Client
- Inherits:
-
Object
- Object
- GooglePlaces::Client
- Defined in:
- lib/google_places/client.rb
Instance Attribute Summary (collapse)
-
- (Object) api_key
readonly
Returns the value of attribute api_key.
-
- (Object) options
readonly
Returns the value of attribute options.
Instance Method Summary (collapse)
-
- (Client) initialize(api_key, options = {})
constructor
A new instance of Client.
- - (Object) spot(reference, options = {})
- - (Object) spots(lat, lng, options = {})
Constructor Details
- (Client) initialize(api_key, options = {})
A new instance of Client
6 7 8 9 |
# File 'lib/google_places/client.rb', line 6 def initialize(api_key, = {}) @api_key = api_key @options = end |
Instance Attribute Details
- (Object) api_key (readonly)
Returns the value of attribute api_key
3 4 5 |
# File 'lib/google_places/client.rb', line 3 def api_key @api_key end |
- (Object) options (readonly)
Returns the value of attribute options
4 5 6 |
# File 'lib/google_places/client.rb', line 4 def @options end |
Instance Method Details
- (Object) spot(reference, options = {})
15 16 17 |
# File 'lib/google_places/client.rb', line 15 def spot(reference, = {}) Spot.find(reference, @api_key, @options.merge()) end |
- (Object) spots(lat, lng, options = {})
11 12 13 |
# File 'lib/google_places/client.rb', line 11 def spots(lat, lng, = {}) Spot.list(lat, lng, @api_key, @options.merge()) end |