Exception: Sportradar::Api::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sportradar/api/error.rb

Defined Under Namespace

Classes: AuthenticationError, InvalidAccessLevel, InvalidLeague, InvalidResponseFormat, InvalidSeason, InvalidSport, InvalidType, NoApiKey, NoData, Timeout

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, response) ⇒ Error

Returns a new instance of Error.



17
18
19
20
21
# File 'lib/sportradar/api/error.rb', line 17

def initialize( code, message, response)
  @code = code
  @message = message
  @response = response
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



15
16
17
# File 'lib/sportradar/api/error.rb', line 15

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



15
16
17
# File 'lib/sportradar/api/error.rb', line 15

def message
  @message
end

#responseObject (readonly)

Returns the value of attribute response.



15
16
17
# File 'lib/sportradar/api/error.rb', line 15

def response
  @response
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/sportradar/api/error.rb', line 23

def success?
  false
end