Module: Mackerel::Client::Dashboard

Included in:
Mackerel::Client
Defined in:
lib/mackerel/client/dashboard.rb

Instance Method Summary collapse

Instance Method Details

#create_dashboard(params) ⇒ Object



14
15
16
17
# File 'lib/mackerel/client/dashboard.rb', line 14

def create_dashboard(params)
  response = post 'dashboards', params
  response.body
end

#dashboard(id) ⇒ Object



9
10
11
12
# File 'lib/mackerel/client/dashboard.rb', line 9

def dashboard(id)
  response = get "dashboards/#{id}"
  response.body
end

#dashboards(options = {}) ⇒ Object



4
5
6
7
# File 'lib/mackerel/client/dashboard.rb', line 4

def dashboards(options = {})
  response = get 'dashboards', options
  response.body.dashboards
end

#delete_dashboard(id) ⇒ Object



24
25
26
27
# File 'lib/mackerel/client/dashboard.rb', line 24

def delete_dashboard(id)
  response = delete "dashboards/#{id}"
  response.body
end

#update_dashboard(id, params) ⇒ Object



19
20
21
22
# File 'lib/mackerel/client/dashboard.rb', line 19

def update_dashboard(id, params)
  response = put "dashboards/#{id}", params
  response.body
end