<commit_before>require 'jumpstart_auth'
require 'unirest'
require 'json'

class BigBen
	attr_reader :client

	def initialize
		
		@client = JumpstartAuth.twitter
	end

	def tweet(message)

		if message.length < 141
			@client.update(message)
		else
			puts "Too long, must be 140 characters or less"
		end

	end

	def generate_quote 
	category = ""

		while category != "Famous"
			response = Unirest.post "https://andruxnet-random-famous-quotes.p.mashape.com/cat=movies",
			  headers:{
			    "X-Mashape-Key" => "<KEY>",
			    "Content-Type" => "application/x-www-form-urlencoded",
			    "Accept" => "application/json"
	  		}


			quote = response.body["quote"]
			category = response.body["category"]
			quote = quote + " -<NAME>"
		end 

	return quote

	end


end

ben = BigBen.new
ben.tweet(ben.generate_quote)
<commit_msg>swapped the api, made sure it tweeted properly<commit_after>require 'jumpstart_auth'
require 'unirest'
require 'json'

class BigBen
	attr_reader :client

	def initialize
		
		@client = JumpstartAuth.twitter
	end

	def tweet(message)

		if message.length < 141
			@client.update(message)
		else
			puts "Too long, must be 140 characters or less"
		end

	end

	def generate_quote 
	#category = ""

		#while category != "Famous"
		#	response = Unirest.post "https://andruxnet-random-famous-quotes.p.mashape.com/cat=movies",
		#	  headers:{
		#	    "X-Mashape-Key" => "<KEY>",
		#	    "Content-Type" => "application/x-www-form-urlencoded",
		#	    "Accept" => "application/json"
	  	#	}

	  	response = Unirest.get "https://theysaidso.p.mashape.com/quote?maxlength=120",
  			headers:{
    			"X-Mashape-Key" => "<KEY>",
    			"Accept" => "application/json"
  			}

			quote = response.body["contents"]["quote"]
			quote = quote + " -<NAME>"

			#category = response.body["category"]
		#end

	return quote

	end


end

ben = BigBen.new
ben.tweet(ben.generate_quote)

{'fraction_non_alphanumeric': 0.13734812466983623, 'fraction_numerical': 0.00792393026941363, 'mean_word_length': 3.2088888888888887, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 16, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, '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': '281247', 'n_tokens_mistral': 780, 'n_tokens_neox': 671, 'n_words': 143}