vinnicc / dota

Ruby client for the Dota 2 WebAPI
MIT License
45 stars 29 forks source link

Set API Key as ENV variable #1

Closed mbesto closed 9 years ago

mbesto commented 9 years ago

I noticed in the unit tests that an API key is hardcoded. It's probably best to set the API key has an environment variable so people don't store it anywhere in the code.

For example:

Dota.configure do |config|
  config.api_key = ENV['DOTA_API_KEY']
end
vinnicc commented 9 years ago

I also added dotenv as a development dependency. Thanks!