Method: PulpcoreClient::DistributionsArtifactsApi#read_with_http_info

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

#read_with_http_info(artifact_distribution_href, opts = {}) ⇒ Array<(ArtifactDistributionResponse, Integer, Hash)>

Inspect an artifact distribution ViewSet for ArtifactDistribution.

Parameters:

  • artifact_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:



183
184
185
186
187
188
189
190
191
192
193
194
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
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/pulpcore_client/api/distributions_artifacts_api.rb', line 183

def read_with_http_info(artifact_distribution_href, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DistributionsArtifactsApi.read ...'
  end
  # verify the required parameter 'artifact_distribution_href' is set
  if @api_client.config.client_side_validation && artifact_distribution_href.nil?
    fail ArgumentError, "Missing the required parameter 'artifact_distribution_href' when calling DistributionsArtifactsApi.read"
  end
  # resource path
  local_var_path = '{artifact_distribution_href}'.sub('{' + 'artifact_distribution_href' + '}', CGI.escape(artifact_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] || 'ArtifactDistributionResponse'

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

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