 #
 # Commands:
 #   hubot harahe - Reply with restaurant info
+#   hubot osake  - Reply with restaurant info
+#   hubot sake   - Reply with restaurant info
+#   hubot lunch  - Reply with restaurant info
+#   hubot oyatsu - Reply with restaurant info
+#   hubot oyatu  - Reply with restaurant info
 
 Client = require("node-rest-client").Client
 client = new Client()

keyid       = process.env.HUBOT_HARAHE_TOKEN
apiHost     = 'http://api.gnavi.co.jp/RestSearchAPI/20150630/?'

sendRestaurant = (msg, query, budgetKey = "budget") ->
  formatBudget = (budget) -> if typeof budget == 'string' then "#{budget}円" else "不明"
  request = apiHost + stringify(query)


    page = Math.floor Math.random() * Math.min(response['total_hit_count'], response['hit_per_page'])
    restaurant = if response['total_hit_count'] == '1' then response['rest'] else response['rest'][page]
    msg.send """
    #{prefix}#{restaurant['name']}

    カテゴリ: #{restaurant['category']}
    平均予算: #{formatBudget(restaurant[budgetKey])}
