Class: Widgets
Overview
Dashboard Widget 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
27
28
29
|
# File 'lib/onvo/widgets.rb', line 27
def create(dashboard_id, query)
base_put('/widgets', query: { query: query }, body: { dashboard: dashboard_id })
end
|
#delete(widget_id) ⇒ Object
19
20
21
|
# File 'lib/onvo/widgets.rb', line 19
def delete(widget_id)
base_delete("/widgets/#{widget_id}")
end
|
#get(widget_id) ⇒ Object
11
12
13
|
# File 'lib/onvo/widgets.rb', line 11
def get(widget_id)
base_get("/widgets/#{widget_id}")
end
|
#get_image(widget_id) ⇒ Object
15
16
17
|
# File 'lib/onvo/widgets.rb', line 15
def get_image(widget_id)
base_get("/widgets/#{widget_id}/image")
end
|
#list(dashboard_id) ⇒ Object
7
8
9
|
# File 'lib/onvo/widgets.rb', line 7
def list(dashboard_id)
base_get('/widgets', query: { dashboard: dashboard_id })
end
|
#update(widget_id, body) ⇒ Object
23
24
25
|
# File 'lib/onvo/widgets.rb', line 23
def update(widget_id, body)
base_post("/widgets/#{widget_id}", body: body)
end
|