Open eebbesen opened 4 years ago
Looks like we may be able to use some simple logic and attempt retries. But there's also probably another API call we can make to have Google do that work for us.
irb(main):007:0> Mappy.link '1031 Fourth Street East,'
Exception in Mappy#link for 1031 Fourth Street East,: Google did not return any results: ZERO_RESULTS
=> ""
irb(main):008:0> Mappy.link '1031 4th Street East,'
=> "https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJHzHwBIDV94cRrXe7OKrPZCY"
irb(main):009:0> Mappy.link '680 Minnehaha Ave W, ,'
Exception in Mappy#link for 680 Minnehaha Ave W, ,: Google did not return any results: ZERO_RESULTS
=> ""
irb(main):010:0> Mappy.link '680 W Minnehaha Ave , ,'
=> "https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJwbIs79Eqs1IRbTtcNNBUYqw"
https://minutes-maid.herokuapp.com/items?meeting_id=445 has several addresses that don't seem to get links, but when I enter them manually in https://www.google.com/maps they resolve as expected.
Many of these seem like they should work -- see what's up