Closed demeringo closed 1 year ago
+1 on your proposal.
If the country code is wrong the API will replace it with the default location (EU). I think that the warning/error is a project on its own ;).
For now, I suggest implementing :
what do you think ?
Everything is implemented in the pre-release https://github.com/Boavizta/boaviztapi/releases/tag/v0.2.0-alpha
Bug description
Not really a bug, but I did not notice the fact that API requires a 3 letter country code (like
FRA
and notFR
) when we want to pass usage data to refine impacts.To be fair, this is explicitly stated in the doc (and a swagger example) but I managed to still miss it 🤷♀️, and this is confusing because the API returns results anyway (it returns 'default' impacts).
https://doc.api.boavizta.org/Reference/usage/#usage-location
But this is not really visible in OpenAPI / Swagger.
To Reproduce
Expected behavior
Short term:
Long term:
Additional context
To make thing even more fun, ISO defines both 2 letters and 3 letters country codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes 🤗