<commit_before>yelp4rails
==========

A gem that provides and activerecord like object for interacting with the yelp V2 api<commit_msg>Add documentation to readme<commit_after>yelp4rails
==========

A gem that provides and ActiveRecord like object for interacting with the yelp V2 api

Usage
---
	require 'yelp4rails'
	
	keys = {:consumer_key=>"key", :consumer_secret=>"secret", :token=>"token", :token_secret=>"tsecret"}
	yelp = YelpApi.new(keys)
	
	## Search like its an active record model ##
	
	#search by term
	yelp.search_by_term("restaurant")
	
	#search with term and location
	yelp.search_by_term_and_location("bar", "San Francisco, CA")
	
	#search with term, location, and sort
	yelp.search_by_term_and_location_and_sort("restaurant", "San Francisco, CA", "2")
	
	#search by business id
	yelp.search_by_business_id(123)
	
	... you get the idea ;)
	

supported search_by queries
---
# key, value, required?
# term, string, optional
# limit, number, optional
# offset, number, optional
# sort, string, optional
## Sort mode: 0=Best matched (default), 1=Distance, 2=Highest Rated.
# category_filter, string, optional
# radius_filter, number, optional
# deals_filter, bool, optional  

{'fraction_non_alphanumeric': 0.12100840336134454, 'fraction_numerical': 0.010084033613445379, 'mean_word_length': 5.301587301587301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6356631', 'n_tokens_mistral': 414, 'n_tokens_neox': 365, 'n_words': 119}