Class: Grafana::Api::SnapshotsDelete

Inherits:
Object
  • Object
show all
Defined in:
lib/grafana-api/api/snapshots_delete.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ SnapshotsDelete

Returns a new instance of SnapshotsDelete.



5
6
7
# File 'lib/grafana-api/api/snapshots_delete.rb', line 5

def initialize(connection)
  @connection = connection
end

Instance Method Details

#get(delete_key:) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
12
13
14
15
16
17
18
19
# File 'lib/grafana-api/api/snapshots_delete.rb', line 9

def get(delete_key:)
  raise ArgumentError, 'delete_key is required' if delete_key.nil?

  @connection.call(
    :GET,
    '/snapshots-delete/{deleteKey}'
      .gsub('{deleteKey}', ERB::Util.url_encode(delete_key.to_s)),
    type: Grafana::Api::Models::SuccessResponseBody,
    auth: ['api_key', 'basic']
  )
end