Module: Calculated::AnswerApiCalls

Included in:
Session
Defined in:
lib/calculated/answer_api_calls.rb

Instance Method Summary (collapse)

Instance Method Details

- (Array<Calculated::Models::Answer>) answer_for_calculator(calculator_id, params = {})



7
8
9
10
11
# File 'lib/calculated/answer_api_calls.rb', line 7

def answer_for_calculator(calculator_id, params = {})
  api_call(:get, "/calculators/#{calculator_id}/answer", params) do |response|
    Calculated::Models::Answer.new(response)
  end
end

- (Array<Calculated::Models::Answer>) answer_for_computation(compuation_id, params = {})



17
18
19
20
21
# File 'lib/calculated/answer_api_calls.rb', line 17

def answer_for_computation(compuation_id, params = {})
  api_call(:get, "/computations/#{compuation_id}/answer", params) do |response|
    Calculated::Models::Answer.new(response)
  end
end