Commit 1362582
committed
Bug 1967617 - Replace individual
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.Geoname::admin{level}_code properties with one admin_division_codes map1 parent c798658 commit 1362582
2 files changed
+85
-134
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 74 | + | |
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
| |||
0 commit comments