Class: Authlete::Response::BaseResponse
- Inherits:
-
Object
- Object
- Authlete::Response::BaseResponse
- Includes:
- Utility
- Defined in:
- lib/authlete/response/base-response.rb
Overview
Authlete::Response::Base
The base class of responses from Authlete Web APIs.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#result_code ⇒ Object
The code assigned to the result of the API call.
-
#result_message ⇒ Object
The message about the result of the API call.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ BaseResponse
constructor
The constructor which takes a hash that represents a JSON response from an Authlete API.
Methods included from Utility
#extract_access_token, #extract_boolean_value, #extract_integer_value, #extract_value, #to_rack_response_json, #to_rack_response_www_authenticate
Constructor Details
#initialize(hash = {}) ⇒ BaseResponse
The constructor which takes a hash that represents a JSON response from an Authlete API.
35 36 37 38 |
# File 'lib/authlete/response/base-response.rb', line 35 def initialize(hash = {}) @result_code = extract_value(hash, :resultCode) = extract_value(hash, :resultMessage) end |
Instance Attribute Details
#result_code ⇒ Object
The code assigned to the result of the API call.
28 29 30 |
# File 'lib/authlete/response/base-response.rb', line 28 def result_code @result_code end |
#result_message ⇒ Object
The message about the result of the API call.
31 32 33 |
# File 'lib/authlete/response/base-response.rb', line 31 def end |