Closed mbork closed 1 year ago
This is an interesting proposal. While I do agree that customizing the user agent is a good feature to support, I do not think a node package should be using any environment variables directly - especially a plug-and-use package like wikipedia
which is meant to just call the wikipedia
API. For more info on the same read why you should stop using env variables for npm modules.
My proposal for the same would be to have an extra argument on the wikipedia functions - we can introduce this in the base interface so that all the calls will support this.
@mbork your thoughts on this would be appreciated.
See https://meta.wikimedia.org/wiki/User-Agent_policy. Set the environment variable
WIKIPEDIA_USER_AGENT
to override the default.