Method: PulpcoreClient::DistributionsOpenpgpApi#read_with_http_info

Defined in:
lib/pulpcore_client/api/distributions_openpgp_api.rb

#read_with_http_info(open_p_g_p_distribution_href, opts = {}) ⇒ Array<(OpenPGPDistributionResponse, Integer, Hash)>

Inspect an open pgp distribution Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks with reservation that lock all Distributions preventing race conditions during base_path checking.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of fields to include in the response.

  • :exclude_fields (Array<String>)

    A list of fields to exclude from the response.

Returns:

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

    OpenPGPDistributionResponse data, response status code and response headers



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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/pulpcore_client/api/distributions_openpgp_api.rb', line 343

def read_with_http_info(open_p_g_p_distribution_href, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DistributionsOpenpgpApi.read ...'
  end
  # verify the required parameter 'open_p_g_p_distribution_href' is set
  if @api_client.config.client_side_validation && open_p_g_p_distribution_href.nil?
    fail ArgumentError, "Missing the required parameter 'open_p_g_p_distribution_href' when calling DistributionsOpenpgpApi.read"
  end
  # resource path
  local_var_path = '{open_p_g_p_distribution_href}'.sub('{' + 'open_p_g_p_distribution_href' + '}', CGI.escape(open_p_g_p_distribution_href.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?

  # 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] || 'OpenPGPDistributionResponse'

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

  new_options = opts.merge(
    :operation => :"DistributionsOpenpgpApi.read",
    :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: DistributionsOpenpgpApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end