Class: Eol::OauthResponse

Inherits:
Response show all
Defined in:
lib/eol/oauth.rb

Constant Summary

Constants inherited from Response

Response::ERROR_CODES, Response::SUCCESS_CODES, Response::UNAUTHORIZED_CODES

Instance Attribute Summary

Attributes inherited from Response

#response, #status_code

Instance Method Summary collapse

Methods inherited from Response

#error_message, #fail?, #initialize, #log_error, #parsed, #result, #results, #status, #success?

Constructor Details

This class inherits a constructor from Eol::Response

Instance Method Details

#access_tokenObject



105
106
107
# File 'lib/eol/oauth.rb', line 105

def access_token
  body["access_token"]
end

#bodyObject



101
102
103
# File 'lib/eol/oauth.rb', line 101

def body
  JSON.parse(@response.body)
end

#divisionObject



109
110
111
# File 'lib/eol/oauth.rb', line 109

def division
  body["division"]
end

#refresh_tokenObject



113
114
115
# File 'lib/eol/oauth.rb', line 113

def refresh_token
  body["refresh_token"]
end