muhkuh0815 / siriproxy-Eyelp

Siriproxy Europe Yelp Search plugin - enables yelp searches and usage of the map within Siri - Siriproxy and yelp-api key required
10 stars 4 forks source link

Special Chars or translate ? #3

Closed Treenity closed 12 years ago

Treenity commented 12 years ago

hi, i've modifier you script, working well, but if i say "trouve un cinéma" he just search for cinéma in the database, so 0 results, i need to convert all special chars or translate the word, any solution?

muhkuh0815 commented 12 years ago

strange, cause if i search on yelp.com for cinéma and paris it finds all the cinémas and i included special chars in the searchURL cause of the german öäü and ß

try listen_for /trouve (.*)/i do |phrase| phrase = phrase.sub( " un ", " " )

muhkuh0815 commented 12 years ago

not sure if its an error but i found /trouve(.*)/ in your script - without space

Treenity commented 12 years ago

not an error, because in french we can use "Trouve-moi un cinema" (Find me a cinema) i've tried with listenfor /trouve (.)|trouve-moi (._)/ but it don't work

so i just remove the space(to take care of the "-moi" and add moi/-moi in phrase.sub

when i try : find a cinéma(in french), i got 0 results

Treenity commented 12 years ago

i've tried by direct access(api URL) and it's work, but the plugin like to got 0 results

Treenity commented 12 years ago

here is the url for the request from the plugin : http://api.yelp.com/business_review_search?term=cinéma&lat=45.43926505661842&long=4.395675352306767&radius=5&limit=15&ywsid=my.hidden.key&lang=french result : {"message":{"text":"OK","code":0,"version":"1.1.1"},"businesses":[]}

muhkuh0815 commented 12 years ago

very strange, because it works when you use &location=saint-étienne instead of lat&long in the URL

Treenity commented 12 years ago

after asking to the support of yelp :

API's queries doesn't include location without reviews. so if nobody rate it, no result

i've just tried to review my cinemas, i will look if they are listed(i think 24/48H delay)