Class: Echonest::Response::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/echonest/response.rb

Constant Summary collapse

UNKNOWN_ERROR =
-1
SUCCESS =
0
INVALID_API_KEY =
1
PERMISSION_DENIED =
2
RATE_LIMIT_EXCEEDED =
3
MISSING_PARAMETER =
4
INVALID_PARAMETER =
5

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_body) ⇒ Status

Returns a new instance of Status.



35
36
37
38
# File 'lib/echonest/response.rb', line 35

def initialize(response_body)
  @code = response_body.status.code
  @message = response_body.status.message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



33
34
35
# File 'lib/echonest/response.rb', line 33

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



33
34
35
# File 'lib/echonest/response.rb', line 33

def message
  @message
end