Method: PureCloud::ScriptsApi#get_script_id_pages_page_id_with_http_info

Defined in:
lib/purecloud/api/scripts_api.rb

#get_script_id_pages_page_id_with_http_info(script_id, page_id, opts = {}) ⇒ Array<(Page, Fixnum, Hash)>

Get a page

Parameters:

  • script_id

    Script ID

  • page_id

    Page ID

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

    the optional parameters

Returns:

  • (Array<(Page, Fixnum, Hash)>)

    Page data, response status code and response headers



491
492
493
494
495
496
497
498
499
500
501
502
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
# File 'lib/purecloud/api/scripts_api.rb', line 491

def get_script_id_pages_page_id_with_http_info(script_id, page_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ScriptsApi#get_script_id_pages_page_id ..."
  end
  
  # verify the required parameter 'script_id' is set
  fail "Missing the required parameter 'script_id' when calling get_script_id_pages_page_id" if script_id.nil?
  
  # verify the required parameter 'page_id' is set
  fail "Missing the required parameter 'page_id' when calling get_script_id_pages_page_id" if page_id.nil?
  
  # resource path
  local_var_path = "/api/v2/scripts/{scriptId}/pages/{pageId}".sub('{format}','json').sub('{' + 'scriptId' + '}', script_id.to_s).sub('{' + 'pageId' + '}', page_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Page')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScriptsApi#get_script_id_pages_page_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end