Closed danoand closed 3 years ago
I agree.
I like the system that you have set up for normalizing the city names.
Not sure what 3rd party APIs/DBs are doing for other special characters. I don't know if it'll be an issue for our case but cities can have other special characters. Not sure if we need to account for these.
(https://en.wikipedia.org/wiki/List_of_U.S._cities_with_diacritics)
Good point regarding other special characters. We may not need that complexity for our particular use case but worth checking out.
Another option is to share a master list/mapping of cities in both the web and ds backends and have city names map to a code (e.g. St. Louis
=> 087
) and pass the code when calling the route
Closed on normalizing city names. See the wiki for route documentation and examples: https://github.com/Lambda-School-Labs/cityspire-d-ds/wiki/Sample-Routes
Closing this issue
Making a change to this proposal that is consistent with how
walkscore.com
handles city namesBACKGROUND
GET /city_scr/<city>
)St. Louis
,Fort Wayne
)PROPOSAL
alpha
orunderscores
Examples
Chicago
staysChicago
->GET /city_scr/Chicago
St. Louis
becomesSt_Louis
->GET /city_scr/St_Louis
New York
becomesNew_York
->GET /city_scr/New_York