[wp-meta] [Making WordPress.org] #3367: Events API: Improve city disambiguation

Making WordPress.org noreply at wordpress.org
Mon Jan 8 23:39:58 UTC 2018


#3367: Events API: Improve city disambiguation
---------------------+------------------------------------------
 Reporter:  iandunn  |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:
Component:  API      |   Keywords:  needs-patch needs-unit-tests
---------------------+------------------------------------------
 Moved from #wp42787, reported by @shedonist:


 > The Events & News widget in the admin dashboard only accepts a city name
 and ignores when you add a state. This means it picks a state for you and
 it may not be the state you want. This makes it extremely difficult to
 locate meetups in cities where different cities with the same name both
 have meetups.
 >
 > For example, I run a meetup in Portsmouth, NH. When I search for
 "Portsmouth, NH" or "Portsmouth" the widget is showing results near
 Portsmouth, VA. When I search for "Boston", the Portsmouth, NH does show
 (so it is in there!). Similarly, if you search for "Portland, OR" or
 "Portland" you only see the meetups near Portland, ME (Portsmouth, NH and
 Westbrook, ME).

 > When I search for "Portsmouth, NH", I get this:
 > [06-Dec-2017 23:00:12 UTC] debug_community_events_response: Valid
 response received. Details:
 {"request_url":"https:\/\/api.wordpress.org\/events\/1.0\/","request_args":{"number":5,"ip":"127.0.0.0","locale":"en_US","timezone":"America\/New_York","location":"Portsmouth,
 NH"},"response_code":200,"response_body":{"location":{"description":"Portsmouth","latitude":"36.8354300","longitude":"-76.2982700","country":"US"},"events":"4
 events trimmed."}}
 >
 > If I search for "Portsmouth", what I get seems to be identical except
 for the location field:
 > [06-Dec-2017 23:00:25 UTC] debug_community_events_response: Valid
 response received. Details:
 {"request_url":"https:\/\/api.wordpress.org\/events\/1.0\/","request_args":{"number":5,"ip":"127.0.0.0","locale":"en_US","timezone":"America\/New_York","location":"Portsmouth"},"response_code":200,"response_body":{"location":{"description":"Portsmouth","latitude":"36.8354300","longitude":"-76.2982700","country":"US"},"events":"4
 events trimmed."}}
 >
 > If I search for "Portland, OR", I get this:
 > [06-Dec-2017 23:01:35 UTC] debug_community_events_response: Valid
 response received. Details:
 {"request_url":"https:\/\/api.wordpress.org\/events\/1.0\/","request_args":{"number":5,"ip":"127.0.0.0","locale":"en_US","timezone":"America\/New_York","location":"Portland,
 OR"},"response_code":200,"response_body":{"location":{"description":"Portland","latitude":"43.6614700","longitude":"-70.2553300","country":"US"},"events":"5
 events trimmed."}}

 This is related to  #2823, it may be one of the things that's just too
 complex to accomplish in a homegrown API, and we should instead just focus
 on the move to Google's. But it's worth some investigating first to find
 out.

 This will need lots of unit tests to cover different variations in
 formats, etc.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3367>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list