Class: Yelp::V2::Search::Request::BoundingBox

Inherits:
Base show all
Defined in:
lib/yelped/v2/search/request/bounding_box.rb

Overview

Describes a request to search for businesses within a geo-point-specific bounding box

Instance Attribute Summary collapse

Attributes inherited from Base

#category_filter, #cc, #claimed_filter, #lang, #limit, #offset, #radius_filter, #sort, #term

Attributes inherited from Request

#compress_response, #consumer_key, #consumer_secret, #response_format, #token, #token_secret

Instance Method Summary collapse

Methods inherited from Base

#base_url

Methods inherited from Request

#initialize, #pull_results

Methods inherited from Record

#initialize

Constructor Details

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

Instance Attribute Details

#ne_latitudeObject (readonly)

REQUIRED - double, top left latitude of bounding box (NORTH-EAST LAT)



18
19
20
# File 'lib/yelped/v2/search/request/bounding_box.rb', line 18

def ne_latitude
  @ne_latitude
end

#ne_longitudeObject (readonly)

REQUIRED - double, top left longitude of bounding box (NORTH-EAST LONG)



21
22
23
# File 'lib/yelped/v2/search/request/bounding_box.rb', line 21

def ne_longitude
  @ne_longitude
end

#sw_latitudeObject (readonly)

REQUIRED - double, bottom right latitude of bounding box (SOUTH-WEST LAT)



12
13
14
# File 'lib/yelped/v2/search/request/bounding_box.rb', line 12

def sw_latitude
  @sw_latitude
end

#sw_longitudeObject (readonly)

REQUIRED - double, bottom right longitude of bounding box (SOUTH-WEST LONG)



15
16
17
# File 'lib/yelped/v2/search/request/bounding_box.rb', line 15

def sw_longitude
  @sw_longitude
end

Instance Method Details

#to_yelp_paramsObject



23
24
25
# File 'lib/yelped/v2/search/request/bounding_box.rb', line 23

def to_yelp_params
  super.merge(:bounds => "#{sw_latitude},#{sw_longitude}|#{ne_latitude},#{ne_longitude}")
end