Module: RDStation::ApiResponse

Defined in:
lib/rdstation/api_response.rb

Class Method Summary collapse

Class Method Details

.build(response) ⇒ Object



3
4
5
6
7
# File 'lib/rdstation/api_response.rb', line 3

def self.build(response)
  response_body = JSON.parse(response.body)
  return response_body unless response_body['errors']
  RDStation::ErrorHandler.new(response).raise_errors
end