Class: Echonest::Response::Status
- Inherits:
-
Object
- Object
- Echonest::Response::Status
- 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
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(xml) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(xml) ⇒ Status
Returns a new instance of Status.
34 35 36 37 |
# File 'lib/echonest/response.rb', line 34 def initialize(xml) @code = xml.find('/response/status/code').first.content.to_s.to_i = xml.find('/response/status/message').first.content.to_s end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
32 33 34 |
# File 'lib/echonest/response.rb', line 32 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
32 33 34 |
# File 'lib/echonest/response.rb', line 32 def end |