Class: ScrapeBadger::WebApi

Inherits:
Object
  • Object
show all
Defined in:
lib/scrapebadger/api/web_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WebApi

Returns a new instance of WebApi.



19
20
21
# File 'lib/scrapebadger/api/web_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/scrapebadger/api/web_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#web_detect_anti_bot_and_captcha_systems(opts = {}) ⇒ Object

Detect anti-bot and CAPTCHA systems Detect which anti-bot and CAPTCHA systems are present on a URL. Uses rnet to fetch the page and identify DataDome, Cloudflare, Akamai, Kasada, Amazon WAF, reCAPTCHA, hCaptcha, GeeTest, and more. Cost: 1 credit.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


26
27
28
29
# File 'lib/scrapebadger/api/web_api.rb', line 26

def web_detect_anti_bot_and_captcha_systems(opts = {})
  data, _status_code, _headers = web_detect_anti_bot_and_captcha_systems_with_http_info(opts)
  data
end

#web_detect_anti_bot_and_captcha_systems_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Detect anti-bot and CAPTCHA systems Detect which anti-bot and CAPTCHA systems are present on a URL. Uses rnet to fetch the page and identify DataDome, Cloudflare, Akamai, Kasada, Amazon WAF, reCAPTCHA, hCaptcha, GeeTest, and more. Cost: 1 credit.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/scrapebadger/api/web_api.rb', line 35

def web_detect_anti_bot_and_captcha_systems_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_detect_anti_bot_and_captcha_systems ...'
  end
  # resource path
  local_var_path = '/v1/web/detect'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_detect_anti_bot_and_captcha_systems",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_detect_anti_bot_and_captcha_systems\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_extract_structured_data(opts = {}) ⇒ Object

Extract structured data Extract structured data from a URL using CSS or XPath selectors. (Phase 6)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


83
84
85
86
# File 'lib/scrapebadger/api/web_api.rb', line 83

def web_extract_structured_data(opts = {})
  data, _status_code, _headers = web_extract_structured_data_with_http_info(opts)
  data
end

#web_extract_structured_data_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Extract structured data Extract structured data from a URL using CSS or XPath selectors. (Phase 6)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



92
93
94
95
96
97
98
99
100
101
102
103
104
105
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
131
132
133
134
# File 'lib/scrapebadger/api/web_api.rb', line 92

def web_extract_structured_data_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_extract_structured_data ...'
  end
  # resource path
  local_var_path = '/v1/web/extract'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_extract_structured_data",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_extract_structured_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_get_batch_job_status(job_id, opts = {}) ⇒ Object

Get batch job status Get the status of a batch scraping job. (Phase 6)

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


141
142
143
144
# File 'lib/scrapebadger/api/web_api.rb', line 141

def web_get_batch_job_status(job_id, opts = {})
  data, _status_code, _headers = web_get_batch_job_status_with_http_info(job_id, opts)
  data
end

#web_get_batch_job_status_with_http_info(job_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get batch job status Get the status of a batch scraping job. (Phase 6)

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/scrapebadger/api/web_api.rb', line 151

def web_get_batch_job_status_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_get_batch_job_status ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling WebApi.web_get_batch_job_status"
  end
  # resource path
  local_var_path = '/v1/web/batch/{job_id}'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_get_batch_job_status",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_get_batch_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_poll_an_auto_unblock_discovery_job(job_id, opts = {}) ⇒ Object

Poll an auto-unblock discovery job Return the status + progress narration for an auto-unblock job. Polled by the playground loader. job_id is an unguessable UUID handed out in the 202 unblocking envelope and acts as a capability token, so any authenticated caller holding it can read the job (this is what lets several users share one discovery run's loader).

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


204
205
206
207
# File 'lib/scrapebadger/api/web_api.rb', line 204

def web_poll_an_auto_unblock_discovery_job(job_id, opts = {})
  data, _status_code, _headers = web_poll_an_auto_unblock_discovery_job_with_http_info(job_id, opts)
  data
end

#web_poll_an_auto_unblock_discovery_job_with_http_info(job_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Poll an auto-unblock discovery job Return the status + progress narration for an auto-unblock job. Polled by the playground loader. ``job_id`` is an unguessable UUID handed out in the ``202 unblocking`` envelope and acts as a capability token, so any authenticated caller holding it can read the job (this is what lets several users share one discovery run's loader).

Parameters:

  • job_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/scrapebadger/api/web_api.rb', line 214

def web_poll_an_auto_unblock_discovery_job_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_poll_an_auto_unblock_discovery_job ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling WebApi.web_poll_an_auto_unblock_discovery_job"
  end
  # resource path
  local_var_path = '/v1/web/unblock/{job_id}'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_poll_an_auto_unblock_discovery_job",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_poll_an_auto_unblock_discovery_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_scrape_a_url(opts = {}) ⇒ Object

Scrape a URL Scrape a URL and return its content. The Generic Web Scraping API is fully user-driven: callers pick their own request parameters (engine, proxy tier, country, JS rendering, …). A blocked target surfaces the raw 422 blocking_page_detected so the caller can tune parameters themselves — we do NOT auto-trigger host discovery. Curated per-origin overrides (which the dedicated scraper APIs depend on) still apply.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


266
267
268
269
# File 'lib/scrapebadger/api/web_api.rb', line 266

def web_scrape_a_url(opts = {})
  data, _status_code, _headers = web_scrape_a_url_with_http_info(opts)
  data
end

#web_scrape_a_url_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Scrape a URL Scrape a URL and return its content. The Generic Web Scraping API is fully user-driven: callers pick their own request parameters (engine, proxy tier, country, JS rendering, …). A blocked target surfaces the raw 422 ``blocking_page_detected`` so the caller can tune parameters themselves — we do NOT auto-trigger host discovery. Curated per-origin overrides (which the dedicated scraper APIs depend on) still apply.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/scrapebadger/api/web_api.rb', line 275

def web_scrape_a_url_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_scrape_a_url ...'
  end
  # resource path
  local_var_path = '/v1/web/scrape'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_scrape_a_url",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_scrape_a_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_submit_batch_scraping_job(opts = {}) ⇒ Object

Submit batch scraping job Submit a batch of URLs for scraping. (Phase 6)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


323
324
325
326
# File 'lib/scrapebadger/api/web_api.rb', line 323

def web_submit_batch_scraping_job(opts = {})
  data, _status_code, _headers = web_submit_batch_scraping_job_with_http_info(opts)
  data
end

#web_submit_batch_scraping_job_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Submit batch scraping job Submit a batch of URLs for scraping. (Phase 6)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
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/scrapebadger/api/web_api.rb', line 332

def web_submit_batch_scraping_job_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_submit_batch_scraping_job ...'
  end
  # resource path
  local_var_path = '/v1/web/batch'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_submit_batch_scraping_job",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_submit_batch_scraping_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_take_a_screenshot(opts = {}) ⇒ Object

Take a screenshot Take a screenshot of a URL. (Phase 2 — patchright engine)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


380
381
382
383
# File 'lib/scrapebadger/api/web_api.rb', line 380

def web_take_a_screenshot(opts = {})
  data, _status_code, _headers = web_take_a_screenshot_with_http_info(opts)
  data
end

#web_take_a_screenshot_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Take a screenshot Take a screenshot of a URL. (Phase 2 — patchright engine)

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/scrapebadger/api/web_api.rb', line 389

def web_take_a_screenshot_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_take_a_screenshot ...'
  end
  # resource path
  local_var_path = '/v1/web/screenshot'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_take_a_screenshot",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_take_a_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_web_scraper_health_check(opts = {}) ⇒ Object

Web scraper health check Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes /health at the root (no /api/v1 prefix, unlike the other scraper services). Accepts HEAD so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


437
438
439
440
# File 'lib/scrapebadger/api/web_api.rb', line 437

def web_web_scraper_health_check(opts = {})
  data, _status_code, _headers = web_web_scraper_health_check_with_http_info(opts)
  data
end

#web_web_scraper_health_check_head(opts = {}) ⇒ Object

Web scraper health check Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes /health at the root (no /api/v1 prefix, unlike the other scraper services). Accepts HEAD so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


494
495
496
497
# File 'lib/scrapebadger/api/web_api.rb', line 494

def web_web_scraper_health_check_head(opts = {})
  data, _status_code, _headers = web_web_scraper_health_check_head_with_http_info(opts)
  data
end

#web_web_scraper_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Web scraper health check Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes ``/health`` at the root (no ``/api/v1`` prefix, unlike the other scraper services). Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# File 'lib/scrapebadger/api/web_api.rb', line 503

def web_web_scraper_health_check_head_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_web_scraper_health_check_head ...'
  end
  # resource path
  local_var_path = '/v1/web/health'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_web_scraper_health_check_head",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_web_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#web_web_scraper_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

Web scraper health check Check health of the web scraper service. Bypasses the proxy abstraction because web-scraper exposes ``/health`` at the root (no ``/api/v1`` prefix, unlike the other scraper services). Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/scrapebadger/api/web_api.rb', line 446

def web_web_scraper_health_check_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WebApi.web_web_scraper_health_check ...'
  end
  # resource path
  local_var_path = '/v1/web/health'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"WebApi.web_web_scraper_health_check",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebApi#web_web_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end