Class: Algolia::MonitoringClient

Inherits:
Object
  • Object
show all
Defined in:
lib/algolia/api/monitoring_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = nil) ⇒ MonitoringClient

Returns a new instance of MonitoringClient.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/algolia/api/monitoring_client.rb', line 9

def initialize(config = nil)
  raise "`config` is missing." if config.nil?
  raise "`app_id` is missing." if config.app_id.nil? || config.app_id == ""
  raise "`api_key` is missing." if config.api_key.nil? || config.api_key == ""

  if config.connect_timeout.nil?
    config.connect_timeout = 2000
  end

  if config.read_timeout.nil?
    config.read_timeout = 5000
  end

  if config.write_timeout.nil?
    config.write_timeout = 30000
  end

  @api_client = Algolia::ApiClient.new(config)
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



7
8
9
# File 'lib/algolia/api/monitoring_client.rb', line 7

def api_client
  @api_client
end

Class Method Details

.create(app_id, api_key, opts = {}) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/algolia/api/monitoring_client.rb', line 29

def self.create(app_id, api_key, opts = {})
  hosts = []
  hosts << Transport::StatefulHost.new("status.algolia.com", accept: CallType::READ | CallType::WRITE)

  config = Algolia::Configuration.new(app_id, api_key, hosts, "Monitoring", opts)
  new(config)
end

.create_with_config(config) ⇒ Object



37
38
39
# File 'lib/algolia/api/monitoring_client.rb', line 37

def self.create_with_config(config)
  new(config)
end

Instance Method Details

#add_user_agent_segment(segment, version = nil) ⇒ Object



51
52
53
54
55
# File 'lib/algolia/api/monitoring_client.rb', line 51

def add_user_agent_segment(segment, version = nil)
  @api_client.config.add_user_agent_segment(segment, version)

  self
end

#custom_delete(path, parameters = nil, request_options = {}) ⇒ Object

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



95
96
97
98
# File 'lib/algolia/api/monitoring_client.rb', line 95

def custom_delete(path, parameters = nil, request_options = {})
  response = custom_delete_with_http_info(path, parameters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
end

#custom_delete_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/algolia/api/monitoring_client.rb', line 63

def custom_delete_with_http_info(path, parameters = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
  end

  path = "/{path}".sub("{" + "path" + "}", path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.custom_delete",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:DELETE, path, new_options)
end

#custom_get(path, parameters = nil, request_options = {}) ⇒ Object

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



138
139
140
141
# File 'lib/algolia/api/monitoring_client.rb', line 138

def custom_get(path, parameters = nil, request_options = {})
  response = custom_get_with_http_info(path, parameters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
end

#custom_get_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/algolia/api/monitoring_client.rb', line 106

def custom_get_with_http_info(path, parameters = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
  end

  path = "/{path}".sub("{" + "path" + "}", path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.custom_get",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#custom_post(path, parameters = nil, body = nil, request_options = {}) ⇒ Object

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • (defaults to: nil)

    Parameters to send with the custom request.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



183
184
185
186
# File 'lib/algolia/api/monitoring_client.rb', line 183

def custom_post(path, parameters = nil, body = nil, request_options = {})
  response = custom_post_with_http_info(path, parameters, body, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
end

#custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • (defaults to: nil)

    Parameters to send with the custom request.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/algolia/api/monitoring_client.rb', line 150

def custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
  end

  path = "/{path}".sub("{" + "path" + "}", path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)

  new_options = request_options.merge(
    :operation => :"MonitoringClient.custom_post",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#custom_put(path, parameters = nil, body = nil, request_options = {}) ⇒ Object

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • (defaults to: nil)

    Parameters to send with the custom request.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



228
229
230
231
# File 'lib/algolia/api/monitoring_client.rb', line 228

def custom_put(path, parameters = nil, body = nil, request_options = {})
  response = custom_put_with_http_info(path, parameters, body, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
end

#custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Path of the endpoint, for example 1/newFeature. (required)

  • (defaults to: nil)

    Query parameters to apply to the current query.

  • (defaults to: nil)

    Parameters to send with the custom request.

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/algolia/api/monitoring_client.rb', line 195

def custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
  end

  path = "/{path}".sub("{" + "path" + "}", path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)

  new_options = request_options.merge(
    :operation => :"MonitoringClient.custom_put",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PUT, path, new_options)
end

#get_cluster_incidents(clusters, request_options = {}) ⇒ IncidentsResponse

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



268
269
270
271
# File 'lib/algolia/api/monitoring_client.rb', line 268

def get_cluster_incidents(clusters, request_options = {})
  response = get_cluster_incidents_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::IncidentsResponse")
end

#get_cluster_incidents_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/algolia/api/monitoring_client.rb', line 238

def get_cluster_incidents_with_http_info(clusters, request_options = {})
  # verify the required parameter 'clusters' is set
  if @api_client.config.client_side_validation && clusters.nil?
    raise ArgumentError, "Parameter `clusters` is required when calling `get_cluster_incidents`."
  end

  path = "/1/incidents/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_cluster_incidents",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_cluster_status(clusters, request_options = {}) ⇒ StatusResponse

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



308
309
310
311
# File 'lib/algolia/api/monitoring_client.rb', line 308

def get_cluster_status(clusters, request_options = {})
  response = get_cluster_status_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::StatusResponse")
end

#get_cluster_status_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/algolia/api/monitoring_client.rb', line 278

def get_cluster_status_with_http_info(clusters, request_options = {})
  # verify the required parameter 'clusters' is set
  if @api_client.config.client_side_validation && clusters.nil?
    raise ArgumentError, "Parameter `clusters` is required when calling `get_cluster_status`."
  end

  path = "/1/status/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_cluster_status",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_incidents(request_options = {}) ⇒ IncidentsResponse

Parameters:

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



341
342
343
344
# File 'lib/algolia/api/monitoring_client.rb', line 341

def get_incidents(request_options = {})
  response = get_incidents_with_http_info(request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::IncidentsResponse")
end

#get_incidents_with_http_info(request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/algolia/api/monitoring_client.rb', line 317

def get_incidents_with_http_info(request_options = {})
  path = "/1/incidents"
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_incidents",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_indexing_time(clusters, request_options = {}) ⇒ IndexingTimeResponse

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



381
382
383
384
# File 'lib/algolia/api/monitoring_client.rb', line 381

def get_indexing_time(clusters, request_options = {})
  response = get_indexing_time_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::IndexingTimeResponse")
end

#get_indexing_time_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/algolia/api/monitoring_client.rb', line 351

def get_indexing_time_with_http_info(clusters, request_options = {})
  # verify the required parameter 'clusters' is set
  if @api_client.config.client_side_validation && clusters.nil?
    raise ArgumentError, "Parameter `clusters` is required when calling `get_indexing_time`."
  end

  path = "/1/indexing/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_indexing_time",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_latency(clusters, request_options = {}) ⇒ LatencyResponse

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



421
422
423
424
# File 'lib/algolia/api/monitoring_client.rb', line 421

def get_latency(clusters, request_options = {})
  response = get_latency_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::LatencyResponse")
end

#get_latency_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/algolia/api/monitoring_client.rb', line 391

def get_latency_with_http_info(clusters, request_options = {})
  # verify the required parameter 'clusters' is set
  if @api_client.config.client_side_validation && clusters.nil?
    raise ArgumentError, "Parameter `clusters` is required when calling `get_latency`."
  end

  path = "/1/latency/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_latency",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_metrics(metric, period, request_options = {}) ⇒ InfrastructureResponse

Parameters:

  • Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use ‘*`. (required)

  • Period over which to aggregate the metrics: - minute. Aggregate the last minute. 1 data point per 10 seconds. - hour. Aggregate the last hour. 1 data point per minute. - day. Aggregate the last day. 1 data point per 10 minutes. - week. Aggregate the last week. 1 data point per hour. - month. Aggregate the last month. 1 data point per day. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



469
470
471
472
473
474
475
# File 'lib/algolia/api/monitoring_client.rb', line 469

def get_metrics(metric, period, request_options = {})
  response = get_metrics_with_http_info(metric, period, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Monitoring::InfrastructureResponse"
  )
end

#get_metrics_with_http_info(metric, period, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use ‘*`. (required)

  • Period over which to aggregate the metrics: - minute. Aggregate the last minute. 1 data point per 10 seconds. - hour. Aggregate the last hour. 1 data point per minute. - day. Aggregate the last day. 1 data point per 10 minutes. - week. Aggregate the last week. 1 data point per hour. - month. Aggregate the last month. 1 data point per day. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/algolia/api/monitoring_client.rb', line 432

def get_metrics_with_http_info(metric, period, request_options = {})
  # verify the required parameter 'metric' is set
  if @api_client.config.client_side_validation && metric.nil?
    raise ArgumentError, "Parameter `metric` is required when calling `get_metrics`."
  end
  # verify the required parameter 'period' is set
  if @api_client.config.client_side_validation && period.nil?
    raise ArgumentError, "Parameter `period` is required when calling `get_metrics`."
  end

  path = "/1/infrastructure/{metric}/period/{period}"
    .sub("{" + "metric" + "}", Transport.encode_uri(metric.to_s))
    .sub("{" + "period" + "}", Transport.encode_uri(period.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_metrics",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_reachability(clusters, request_options = {}) ⇒ Hash<String, Hash>

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



512
513
514
515
# File 'lib/algolia/api/monitoring_client.rb', line 512

def get_reachability(clusters, request_options = {})
  response = get_reachability_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Hash>")
end

#get_reachability_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • Subset of clusters, separated by commas. (required)

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/algolia/api/monitoring_client.rb', line 482

def get_reachability_with_http_info(clusters, request_options = {})
  # verify the required parameter 'clusters' is set
  if @api_client.config.client_side_validation && clusters.nil?
    raise ArgumentError, "Parameter `clusters` is required when calling `get_reachability`."
  end

  path = "/1/reachability/{clusters}/probes".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_reachability",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_servers(request_options = {}) ⇒ InventoryResponse

Parameters:

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



545
546
547
548
# File 'lib/algolia/api/monitoring_client.rb', line 545

def get_servers(request_options = {})
  response = get_servers_with_http_info(request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::InventoryResponse")
end

#get_servers_with_http_info(request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/algolia/api/monitoring_client.rb', line 521

def get_servers_with_http_info(request_options = {})
  path = "/1/inventory/servers"
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_servers",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_status(request_options = {}) ⇒ StatusResponse

Parameters:

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



578
579
580
581
# File 'lib/algolia/api/monitoring_client.rb', line 578

def get_status(request_options = {})
  response = get_status_with_http_info(request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::StatusResponse")
end

#get_status_with_http_info(request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • the response



554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/algolia/api/monitoring_client.rb', line 554

def get_status_with_http_info(request_options = {})
  path = "/1/status"
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :"MonitoringClient.get_status",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#set_client_api_key(api_key) ⇒ void

This method returns an undefined value.

Helper method to switch the API key used to authenticate the requests.

Parameters:

  • the new API key to use.



45
46
47
48
49
# File 'lib/algolia/api/monitoring_client.rb', line 45

def set_client_api_key(api_key)
  @api_client.set_client_api_key(api_key)

  self
end