Class: Questions

Inherits:
Resource show all
Defined in:
lib/onvo/questions.rb

Overview

Dashboard Question endpoints

Instance Attribute Summary

Attributes inherited from Resource

#options

Instance Method Summary collapse

Methods inherited from Resource

#base_delete, #base_get, #base_post, #base_put, #base_request, #initialize, #merge_options

Constructor Details

This class inherits a constructor from Resource

Instance Method Details

#create(dashboard_id, query) ⇒ Object



12
13
14
# File 'lib/onvo/questions.rb', line 12

def create(dashboard_id, query)
  base_put('/questions', query: { query: query }, body: { dashboard: dashboard_id })
end

#delete(id) ⇒ Object



16
17
18
# File 'lib/onvo/questions.rb', line 16

def delete(id)
  base_delete("/questions/#{id}")
end

#list(dashboard_id) ⇒ Object



8
9
10
# File 'lib/onvo/questions.rb', line 8

def list(dashboard_id)
  base_get('/questions', query: { dashboard: dashboard_id })
end