<commit_before># Description:
#   Uses Foursquare to find the BBC's <NAME>
#
# Dependencies:
#   None
#
# Commands:
#   locate lintott
#
# Author:
#   ttfnrob

module.exports = (robot) ->
  robot.respond /locate lintott/i, (msg) ->
    msg.http("https://api.foursquare.com/v2/users/self/checkins?oauth_token=MBED45EKO3PRI550U4BYVURBUEFRQTVVYQJMVVKSHRPKQ13W&v=20141210")
      .get() (err, res, body) ->
        try
          json = JSON.parse(body)
          place = json.response.checkins.items[0].venue.name
          type = json.response.checkins.items[0].venue.categories[0].name
          text = "Lintott last spotted at #{place}, which is a #{type}"
        catch error
          text = "No info found"
        msg.send text<commit_msg>Mention Chris in Lintott tracker<commit_after># Description:
#   Uses Foursquare to find the BBC's <NAME>
#
# Dependencies:
#   None
#
# Commands:
#   locate lintott
#
# Author:
#   ttfnrob

module.exports = (robot) ->
  robot.respond /locate lintott/i, (msg) ->
    msg.http("https://api.foursquare.com/v2/users/self/checkins?oauth_token=MBED45EKO3PRI550U4BYVURBUEFRQTVVYQJMVVKSHRPKQ13W&v=20141210")
      .get() (err, res, body) ->
        try
          json = JSON.parse(body)
          place = json.response.checkins.items[0].venue.name
          type = json.response.checkins.items[0].venue.categories[0].name
          text = ".@chrislintott last spotted at #{place}, which is a #{type}"
        catch error
          text = "No info found"
        msg.send text
{'fraction_non_alphanumeric': 0.13245033112582782, 'fraction_numerical': 0.02781456953642384, 'mean_word_length': 2.8156565656565657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4786534', 'n_tokens_mistral': 571, 'n_tokens_neox': 547, 'n_words': 107}