module DianPing::Common
Public Instance Methods
has_coupon()
click to toggle source
根据是否有优惠券来筛选返回的商户 1:有,0:没有
# File lib/dianping/common.rb, line 7 def has_coupon add :has_coupon, 1 end
has_deal()
click to toggle source
根据是否有团购来筛选返回的商户,1:有,0:没有
# File lib/dianping/common.rb, line 16 def has_deal add :has_deal, 1 end
has_not_coupon()
click to toggle source
# File lib/dianping/common.rb, line 11 def has_not_coupon add :has_coupon, 0 end
has_not_deal()
click to toggle source
# File lib/dianping/common.rb, line 20 def has_not_deal add :has_deal, 0 end
limit(number)
click to toggle source
每页返回的商户结果条目数上限,最小值1,最大值40,如不传入默认为20
# File lib/dianping/common.rb, line 25 def limit(number) warn 'limit 最大值40' if number > 40 add :limit, number end
radius(number)
click to toggle source
搜索半径,单位为米,最小值1,最大值5000,如不传入默认为1000
# File lib/dianping/common.rb, line 31 def radius(number) warn 'radius 最大值5000' if number > 5000 add :radius, number end