Class: Xfyun::Spark::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/xfyun/spark.rb

Constant Summary collapse

DEFAULT_MODEL =
"V1.5".freeze
DEFAULT_HOST =
"spark-api.xf-yun.com".freeze
DEFAULT_REQUEST_TIMEOUT =
120

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
20
21
22
23
24
25
# File 'lib/xfyun/spark.rb', line 17

def initialize
  @appid = nil
  @api_key = nil
  @api_secret = nil
  @model = DEFAULT_MODEL
  @host = DEFAULT_HOST
  @request_timeout = DEFAULT_REQUEST_TIMEOUT
  @logger = nil # Logger.new($stdout)
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def api_key
  @api_key
end

#api_secretObject

Returns the value of attribute api_secret.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def api_secret
  @api_secret
end

#appidObject

Returns the value of attribute appid.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def appid
  @appid
end

#hostObject

Returns the value of attribute host.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def logger
  @logger
end

#modelObject

Returns the value of attribute model.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def model
  @model
end

#request_timeoutObject

Returns the value of attribute request_timeout.



11
12
13
# File 'lib/xfyun/spark.rb', line 11

def request_timeout
  @request_timeout
end