Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mthomas committed Mar 9, 2012
1 parent 90c5820 commit d7969dd
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions scripts/foursquare.coffee
Expand Up @@ -22,40 +22,4 @@ module.exports = (robot) ->
return

for r in results
msg.send "#{r.name}: #{r.url}"

# url = "http://maps.googleapis.com/maps/api/geocode/json?address=#{address}&sensor=false"

# msg
# .http(url)
# .get() (err, res, body) ->
# console.log "Google URL: " + url
# console.log "RESPONSE FROM GOOGLE: " + body
# geocodeData = JSON.parse(body)

# location = geocodeData?.results?[0]?.geometry?.location

# if not location?
# msg.send "Sorry, I can't find #{msg.match[2]}"
# return

# lat = location.lat
# lng = location.lng

# url = "https://api.foursquare.com/v2/venues/search?ll=#{lat},#{lng}&radius=1000&query=#{query}&client_id=#{process.env.HUBOT_FSQ_CLIENT_ID}&client_secret=#{process.env.HUBOT_FSQ_CLIENT_SECRET}&v=20120308"

# msg
# .http(url)
# .get() (err, res, body) ->
# fsqData = JSON.parse(body)

# venues = fsqData?.response?.venues

# if not venues?
# msg.send "Sorry, I can't find any #{msg.match[1]} near #{msg.match[2]}"
# return

# for venue in venues
# msg.send "#{venue.name}: #{venue.url or 'http://www.foursquare.com/v/' + venue.id}"


msg.send "#{r.name} (#{r.avg_rating} stars with #{r.review_count} reviews): #{r.url}"

0 comments on commit d7969dd

Please sign in to comment.