Class: DashboardWidgets
Overview
Dashboard Widget endpoints
Instance Attribute Summary
#dashboard_id
Attributes inherited from Resource
#options
Instance Method Summary
collapse
#initialize
Methods inherited from Resource
#base_delete, #base_get, #base_post, #base_put, #base_request, #initialize
Instance Method Details
#create(query) ⇒ Object
24
25
26
27
|
# File 'lib/onvo/dashboard/widgets.rb', line 24
def create(query)
processed_query = URI.encode_www_form_component(query)
base_put("/dashboards/#{@dashboard_id}/widgets?query=#{processed_query}")
end
|
#delete(widget_id) ⇒ Object
16
17
18
|
# File 'lib/onvo/dashboard/widgets.rb', line 16
def delete(widget_id)
base_delete("/dashboards/#{@dashboard_id}/widgets/#{widget_id}")
end
|
#get(widget_id) ⇒ Object
12
13
14
|
# File 'lib/onvo/dashboard/widgets.rb', line 12
def get(widget_id)
base_get("/dashboards/#{@dashboard_id}/widgets/#{widget_id}")
end
|
#list ⇒ Object
8
9
10
|
# File 'lib/onvo/dashboard/widgets.rb', line 8
def list
base_get("/dashboards/#{@dashboard_id}/widgets")
end
|
#update(widget_id, body) ⇒ Object
20
21
22
|
# File 'lib/onvo/dashboard/widgets.rb', line 20
def update(widget_id, body)
base_post("/dashboards/#{@dashboard_id}/widgets/#{widget_id}", body)
end
|