Conversation
|
This doesn't work with UniFFI because the Not sure what to do. Either use an array of objects like AccuWeather does -- |
|
I'm going to submit a UniFFI patch ASAP. This PR aside, using a plain JS object for a map is a straight up bug. So let's go forward with this PR assuming that will be fixed, but let me know if you think using a map for the admin divisions is a bad idea aside from that. |
There was a bug already on file: Bug 1809459 - Use Map instances for UniFFI maps to allow non-string keys. |
1a30271 to
117819f
Compare
02e9517 to
d59df18
Compare
…ies with one `admin_division_codes` map
This replaces the individual `Geoname::admin{level}_code` properties with a
single `admin_division_codes` map. A few reasons:
* I'm working on another patch that adds a way for consumers to fetch
localized/alternate names for geonames, including alternates for a geoname's
admin divisions. I'm introducing another struct for that, and I don't want to
repeat `admin{level}_name` for each level in that struct.
* I like the idea of not baking the max number of levels into the public API.
* Not a big deal, but a map is similar to how AccuWeather's location API handles
admin divisions, although it uses an array of objects instead of one object.
d59df18 to
08e4994
Compare
This builds on #6745 and replaces the individual
Geoname::admin{level}_codeproperties with a singleadmin_division_codesmap. A few reasons:admin{level}_namefor each level in that struct.Pull Request checklist
[ci full]to the PR title.