Setting the used location provider is currently done in a controller action, which is called from the admin page.
Moving that method to the API has the advantage that the provider could be set without using the UI. And it will be possible to hook into the API call using the default API events like
API.UserCountry.setLocationProvider.end to handle something that should be done after the location provider has changed. Might be useful for some plugins.
Good idea, just need to restore the
dieIfGeolocationAdminIsDisabled feature and maybe few tests
Added the check for configuration and some more tests. Is it good to merge then?