(index ("set-ywsid!" 0) ("valid?" 203) ("by-phone" 578) ("hood-for-address" 927) ("hood-for-geocode" 1099) ("near-address" 1281) ("near-geocode" 2356) ("near-geobox" 2941) ("display-info" 3518) ("decode" 3899) ("find" 4109))
(def (sig (procedure "(set-ywsid! YWSID)" (id set-ywsid!))) (p "Sets the Yelp web service ID to the value of " (tt "YWSID") ".  " (b "This must be done before calling any other function in this egg.")))
(def (sig (procedure "(valid? OBJECT)" (id valid?))) (p "Is the " (tt "OBJECT") " a valid Yelp response?  There's no need to check " (tt "valid?") " if you check for " (tt "'yelp-success") ".") (p "All Yelp responses include this structure:") (pre "message:\n  text: OK\n  code: 0\n  version: 1.1.1") (p (tt "valid?") " checks for both " (tt "\"OK\"") " and " (tt "0") "."))
(def (sig (procedure "(by-phone NUMBER)" (id by-phone))) (p "Look up a business by its phone number, " (tt "NUMBER") ".") (p "The following phone syntax is understood:") (ul (li "aaaxxxnnnn") (li "(aaa)xxx-nnnn") (li "aaa.xxx.nnnn")) (p "This egg currently understands only the North American Numbering Plan syntax (US and Canada).  Sorry mates."))
(def (sig (procedure "(hood-for-address LOCATION #:CC)" (id hood-for-address))) (p "Returns the neighborhood name associated with a street address, " (tt "LOCATION") "."))
(def (sig (procedure "(hood-for-geocode LAT LON)" (id hood-for-geocode))) (p "Returns the neighborhood name associated with a geocode location, " (tt "LAT") " and " (tt "LON") "."))
(def (sig (procedure "(near-address TERM LOCATION #:NUMBER #:CC #:CATEGORY)" (id near-address))) (p "Returns a list of " (tt "NUMBER") " reviews for businesses containing " (tt "TERM") " and located near the address " (tt "LOCATION") ".  The " (tt "CATEGORY") " keyword may be used to limit the search to a particular Yelp " (link "http://www.yelp.com/developers/documentation/category_list" "category") " name, e.g., " (tt "\"vietnamese\"") ".") (p "Yelp's search algorithm is quite liberal in what it accepts for " (tt "LOCATION") "; neighborhood names are valid terms as are common abbreviations for major cities.  For example:") (pre "#;1> (display-info (near-address \"tokyo a go-go\" \"mission sf\"))\nCategories: Sushi Bars, Japanese\nNeighborhood: Mission\nTokyo Go Go\n3174 16th Street\nSuite 250I\nSan Francisco, CA 94103\n(415)864-2288\n37.764900 -122.424003\n#;2> (display-info (near-address \"john's pizzeria\" \"nyc\"))\nCategories: Pizza\nNeighborhood: West Village\nJohn's Pizzeria\n278 Bleecker St\nNew York, NY 10014\n(212)243-1680\n40.731712 -74.003274"))
(def (sig (procedure "(near-geocode TERM LAT LON #:NUMBER #:RADIUS #:CATEGORY)" (id near-geocode))) (p "Returns a list of " (tt "NUMBER") " reviews for businesses containing " (tt "TERM") " and located in a circle around the geocode location " (tt "LAT") " and " (tt "LON") " for a radius of " (tt "RADIUS") ".  The Yelp API fails to specify the units (assume US statute miles).  The " (tt "CATEGORY") " keyword may be used to limit the search to a particular Yelp " (link "http://www.yelp.com/developers/documentation/category_list" "category") " name, e.g., " (tt "\"pizza\"") "."))
(def (sig (procedure "(near-geobox TERM TL-LAT TL-LON BR-LAT BR-LON #:NUMBER #:CATEGORY)" (id near-geobox))) (p "Returns a list of " (tt "NUMBER") " reviews for businesses containing " (tt "TERM") " and located in a box with the top-left geocode of " (tt "TL-LAT") " and " (tt "TL-LON") " and a bottom-right geocode of " (tt "BR-LAT") " and " (tt "BR-LON") ".  The " (tt "CATEGORY") " keyword may be used to limit the search to a particular Yelp " (link "http://www.yelp.com/developers/documentation/category_list" "category") " name, e.g., " (tt "\"divebars+lounges\"") "."))
(def (sig (procedure "(display-info RESPONSE [PORT])" (id display-info))) (p "Display basic information for a Yelp " (tt "RESPONSE") " on " (tt "PORT") ".  For example:") (pre "#;1> (display-info (by-phone \"415.673.3163\"))\nCategories: Vietnamese\nNeighborhood: Civic Center/Tenderloin\nPho Tan Hoa\n431 Jones St\nSan Francisco, CA 94102\n(415)673-3163\n37.785377 -122.412916"))
(def (sig (procedure "(decode RESPONSE [PORT])" (id decode))) (p "Walks the JSON tree and decodes the response to " (tt "PORT") ".  Primarily useful during development to determine the pathname of interest."))
(def (sig (procedure "(find RESPONSE PATH)" (id find))) (p "Walks the JSON tree and searches for the JSON key specified by " (tt "PATH") ".  They syntax of " (tt "find") " uses simple dotted notation to describe the pathname, for example: " (tt "businesses.phone") " or " (tt "message.code") "."))
