<commit_before>class Api::V1::IndexController < ApplicationController
	# authorize_resource class: false

	def index
		@w_api = Wunderground.new(Figaro.env.wunderground_api_key)
		puts @w_api.forecast_for("WA", "Spokane")
	end

	def location
		# make an call to wunderground api
		# render json: something from wunderground
	end
end<commit_msg>Move wunderground api call to location method, request forecast for zip, parse out everything but three day forecast, render json for three-day<commit_after>class Api::V1::IndexController < ApplicationController
	# authorize_resource class: false

	def index
	end

	def location
		w_api = Wunderground.new(Figaro.env.wunderground_api_key)
		forecast = w_api.forecast_for(params[:zip])

		three_day_forecast = forecast["forecast"]["txt_forecast"]["forecastday"][0..5]

		respond_to do |format|
			format.html
			format.json {render :json => three_day_forecast}
		end
	end
end
{'fraction_non_alphanumeric': 0.08932461873638345, 'fraction_numerical': 0.004357298474945534, 'mean_word_length': 5.5177304964539005, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '1202954', 'n_tokens_mistral': 312, 'n_tokens_neox': 296, 'n_words': 77}