Class: HhApiData::Restaurant

Inherits:
Base
  • Object
show all
Defined in:
app/my_lib/hh_api_data/restaurant.rb

Overview

HhApiData::Restaurant

Instance Method Summary collapse

Instance Method Details

#collections_by_rankObject



3
4
5
6
7
8
9
# File 'app/my_lib/hh_api_data/restaurant.rb', line 3

def collections_by_rank
  json = api_call('restaurant_ranking')

  ids = json.blank? ? [0] : map_ids(json)

  collections(ids).page(page_size).per(per_page)
end

#nearest_promotionObject



15
16
17
# File 'app/my_lib/hh_api_data/restaurant.rb', line 15

def nearest_promotion
  api_call('restaurant_nearest_user')
end

#suggest_by_keywordObject



11
12
13
# File 'app/my_lib/hh_api_data/restaurant.rb', line 11

def suggest_by_keyword
  api_call('search_suggestion')
end