module Milkbottle::Default

Constants

API_ENDPOINT
MEDIA_TYPE
MIDDLEWARE
USER_AGENT

Public Class Methods

anonymous_token() click to toggle source
# File lib/milkbottle/default.rb, line 35
def anonymous_token
  ENV['MILKBOTTLE_ANONYMOUS_TOKEN']
end
api_endpoint() click to toggle source

Default API endpoint from ENV or {API_ENDPOINT} @return [String]

# File lib/milkbottle/default.rb, line 31
def api_endpoint
  ENV['MILKBOTTLE_API_ENDPOINT'] || API_ENDPOINT
end
api_key() click to toggle source

Default access token from ENV @return [String]

# File lib/milkbottle/default.rb, line 25
def api_key
  ENV['MILKBOTTLE_API_KEY']
end
connection_options() click to toggle source
# File lib/milkbottle/default.rb, line 43
def connection_options
  {
    :headers => {
      :accept => default_media_type,
      :user_agent => user_agent
    }
  }
end
default_media_type() click to toggle source
# File lib/milkbottle/default.rb, line 52
def default_media_type
  ENV['MILKBOTTLE_MEDIA_TYPE'] || MEDIA_TYPE
end
external_auth_issuer() click to toggle source
# File lib/milkbottle/default.rb, line 60
def external_auth_issuer
  ENV['MILKBOTTLE_EXTERNAL_AUTH_ISSUER']
end
external_auth_key() click to toggle source
# File lib/milkbottle/default.rb, line 56
def external_auth_key
  ENV['MILKBOTTLE_EXTERNAL_AUTH_KEY']
end
jwt_token() click to toggle source
# File lib/milkbottle/default.rb, line 39
def jwt_token
  ENV['MILKBOTTLE_JWT_TOKEN']
end
middleware() click to toggle source
# File lib/milkbottle/default.rb, line 64
def middleware
  MIDDLEWARE
end
options() click to toggle source

Configuration options @return [Hash]

# File lib/milkbottle/default.rb, line 19
def options
  Hash[Milkbottle::Configurable.keys.map{|key| [key, send(key)]}]
end
user_agent() click to toggle source
# File lib/milkbottle/default.rb, line 68
def user_agent
  ENV['MILKBOTTLE_USER_AGENT'] || USER_AGENT
end