Allows api key to be configured in an initializer + class level helper method

I needed this functionality for the project I'm working on. I hope it helps someone else.