Skip to content

Instantly share code, notes, and snippets.

@eskim
Created May 10, 2014 09:10
Show Gist options
  • Save eskim/ce6b7df398b48f44cd75 to your computer and use it in GitHub Desktop.
Save eskim/ce6b7df398b48f44cd75 to your computer and use it in GitHub Desktop.
Agent.check = ->
url = "http://m.ticketmonster.co.kr/deal/option?id=63174021&depth=0&opt_key="
q.nfcall(request, url, json: true).then (r)=>
data = r[0].body
kitchen_set = data[14].remain_count
if kitchen_set > 0
@create_event title: "티몬", message: "인디 키친툴세트 입고"
bbq_set = data[20].remain_count
if bbq_set
@create_event title: "티몬", message: "인디BBQ스큐어[혼합/7Pset] 입고"
if kitchen_set == 0 and bbq_set == 0
@log "재고 없음"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment