Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

debug

  • Loading branch information...
commit d7969ddc243665d0fdc0bf6db47a76232018160e 1 parent 90c5820
@mthomas authored
Showing with 1 addition and 37 deletions.
  1. +1 −37 scripts/foursquare.coffee
View
38 scripts/foursquare.coffee
@@ -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}"
Please sign in to comment.
Something went wrong with that request. Please try again.