Class: Quandl::Client::TokenAuthentication

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/quandl/client/her.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



49
50
51
52
# File 'lib/quandl/client/her.rb', line 49

def call(env)
  env[:request_headers]["X-API-Token"] = Quandl::Client.token if Quandl::Client.token.present?
  @app.call(env)
end