Module: Sense::Questions

Included in:
Client
Defined in:
lib/hello_sense/questions.rb

Instance Method Summary collapse

Instance Method Details

#questionsArray<Hash>

Examples:

[
  {
    "id" => 2,
    "account_question_id" => 100000,
    "text" => "How was your sleep last night?",
    "choices" => {
      "id" => 69,
      "text" => "Great",
      "question_id" => 2
    }, {
      "id" => 70,
      "text" => "Okay",
      "question_id" => 2
    }, {
      "id" => 71,
      "text" => "Poor",
      "question_id" => 2
    }],
    "ask_local_date" => 1483257600000,
    "type" => "CHOICE",
    "ask_time" => "MORNING"
  }
]

Returns:

  • (Array<Hash>)


32
33
34
# File 'lib/hello_sense/questions.rb', line 32

def questions
  get('/v1/questions')
end

#skip_question(data) ⇒ Object



36
37
38
# File 'lib/hello_sense/questions.rb', line 36

def skip_question(data)
  put('/v1/questions/skip', data)
end

#update_questions(data) ⇒ Object



40
41
42
# File 'lib/hello_sense/questions.rb', line 40

def update_questions(data)
  post('/v1/questions/save', data)
end