<commit_before>require 'lita'
require 'net/http'
require 'uri'
require 'json'

module Lita
  module Handlers
    class Recipe < Handler
      config :api_key, required: true
      route(/^recipe/, :recipe, command: true, help: { "recipe" => "random recipe" })

      def recipe(response)
        res = Net::HTTP.get_response(URI('http://food2fork.com/api/search?key=#{api_key}&sort=t'))
      top_list = JSON.load(res.body)
      response.reply(top_list["recipes"].shuffle.first["f2f_url"])
      end
      private

      def api_key
        Lita.config.handers.recipe.api_key
      end
 
      Lita.register_handler(Recipe)
    end
  end
end
<commit_msg>Updated search URL<commit_after>require 'lita'
require 'net/http'
require 'uri'
require 'json'

module Lita
  module Handlers
    class Recipe < Handler
      config :api_key, required: true
      route(/^recipe/, :recipe, command: true, help: { "recipe" => "random recipe" })

      def recipe(response)
        res = Net::HTTP.get_response(URI("http://food2fork.com/api/search?key=#{api_key}&sort=t"))
      top_list = JSON.load(res.body)
      response.reply(top_list["recipes"].shuffle.first["f2f_url"])
      end
      private

      def api_key
        Lita.config.handers.recipe.api_key
      end
 
      Lita.register_handler(Recipe)
    end
  end
end

{'fraction_non_alphanumeric': 0.12927756653992395, 'fraction_numerical': 0.003041825095057034, 'mean_word_length': 3.0244648318042815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1976256', 'n_tokens_mistral': 457, 'n_tokens_neox': 444, 'n_words': 90}