Class: Yelp::V1::Review::Request::BoundingBox

Inherits:
Base show all
Defined in:
lib/yelped/v1/review/request/bounding_box.rb

Overview

Describes a request to search for business reviews for businesses within a geo-point-specific bounding box and radius around that box.

Instance Attribute Summary collapse

Attributes inherited from Base

#business_count, #category, #term

Attributes inherited from Yelp::V1::Request

#compress_response, #response_format, #yws_id

Instance Method Summary collapse

Methods inherited from Base

#base_url

Methods inherited from Yelp::V1::Request

#initialize, #pull_results

Methods inherited from Record

#initialize

Constructor Details

This class inherits a constructor from Yelp::V1::Request

Instance Attribute Details

#bottom_right_latitudeObject (readonly)

bottom right latitude of bounding box



13
14
15
# File 'lib/yelped/v1/review/request/bounding_box.rb', line 13

def bottom_right_latitude
  @bottom_right_latitude
end

#bottom_right_longitudeObject (readonly)

bottom right longitude of bounding box



16
17
18
# File 'lib/yelped/v1/review/request/bounding_box.rb', line 16

def bottom_right_longitude
  @bottom_right_longitude
end

#radiusObject (readonly)

radius to use while searching around specified geo-point. default value is 1, maximum value is 25.



20
21
22
# File 'lib/yelped/v1/review/request/bounding_box.rb', line 20

def radius
  @radius
end

#top_left_latitudeObject (readonly)

top left latitude of bounding box



23
24
25
# File 'lib/yelped/v1/review/request/bounding_box.rb', line 23

def top_left_latitude
  @top_left_latitude
end

#top_left_longitudeObject (readonly)

top left longitude of bounding box



26
27
28
# File 'lib/yelped/v1/review/request/bounding_box.rb', line 26

def top_left_longitude
  @top_left_longitude
end

Instance Method Details

#to_yelp_paramsObject



28
29
30
31
32
33
34
# File 'lib/yelped/v1/review/request/bounding_box.rb', line 28

def to_yelp_params
  super.merge(:tl_lat => top_left_latitude,
			  :tl_long => top_left_longitude,
			  :br_lat => bottom_right_latitude,
			  :br_long => bottom_right_longitude,
			  :radius => radius)
end