Class: PulpNpmClient::RepositoriesNpmApi
- Inherits:
-
Object
- Object
- PulpNpmClient::RepositoriesNpmApi
- Defined in:
- lib/pulp_npm_client/api/repositories_npm_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(npm_npm_repository, opts = {}) ⇒ NpmNpmRepositoryResponse
Create a npm repository A ViewSet for NpmRepository.
-
#create_with_http_info(npm_npm_repository, opts = {}) ⇒ Array<(NpmNpmRepositoryResponse, Integer, Hash)>
Create a npm repository A ViewSet for NpmRepository.
-
#delete(npm_npm_repository_href, opts = {}) ⇒ AsyncOperationResponse
Delete a npm repository Trigger an asynchronous delete task.
-
#delete_with_http_info(npm_npm_repository_href, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Delete a npm repository Trigger an asynchronous delete task.
-
#initialize(api_client = ApiClient.default) ⇒ RepositoriesNpmApi
constructor
A new instance of RepositoriesNpmApi.
-
#list(opts = {}) ⇒ PaginatednpmNpmRepositoryResponseList
List npm repositorys A ViewSet for NpmRepository.
-
#list_with_http_info(opts = {}) ⇒ Array<(PaginatednpmNpmRepositoryResponseList, Integer, Hash)>
List npm repositorys A ViewSet for NpmRepository.
-
#modify(npm_npm_repository_href, repository_add_remove_content, opts = {}) ⇒ AsyncOperationResponse
Modify Repository Content Trigger an asynchronous task to create a new repository version.
-
#modify_with_http_info(npm_npm_repository_href, repository_add_remove_content, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Modify Repository Content Trigger an asynchronous task to create a new repository version.
-
#partial_update(npm_npm_repository_href, patchednpm_npm_repository, opts = {}) ⇒ AsyncOperationResponse
Update a npm repository Trigger an asynchronous partial update task.
-
#partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Update a npm repository Trigger an asynchronous partial update task.
-
#read(npm_npm_repository_href, opts = {}) ⇒ NpmNpmRepositoryResponse
Inspect a npm repository A ViewSet for NpmRepository.
-
#read_with_http_info(npm_npm_repository_href, opts = {}) ⇒ Array<(NpmNpmRepositoryResponse, Integer, Hash)>
Inspect a npm repository A ViewSet for NpmRepository.
-
#set_label(npm_npm_repository_href, set_label, opts = {}) ⇒ SetLabelResponse
Set a label Set a single pulp_label on the object to a specific value or null.
-
#set_label_with_http_info(npm_npm_repository_href, set_label, opts = {}) ⇒ Array<(SetLabelResponse, Integer, Hash)>
Set a label Set a single pulp_label on the object to a specific value or null.
-
#sync(npm_npm_repository_href, repository_sync_url, opts = {}) ⇒ AsyncOperationResponse
Sync from remote Trigger an asynchronous task to sync content.
-
#sync_with_http_info(npm_npm_repository_href, repository_sync_url, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Sync from remote Trigger an asynchronous task to sync content.
-
#unset_label(npm_npm_repository_href, unset_label, opts = {}) ⇒ UnsetLabelResponse
Unset a label Unset a single pulp_label on the object.
-
#unset_label_with_http_info(npm_npm_repository_href, unset_label, opts = {}) ⇒ Array<(UnsetLabelResponse, Integer, Hash)>
Unset a label Unset a single pulp_label on the object.
-
#update(npm_npm_repository_href, npm_npm_repository, opts = {}) ⇒ AsyncOperationResponse
Update a npm repository Trigger an asynchronous update task.
-
#update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Update a npm repository Trigger an asynchronous update task.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RepositoriesNpmApi
Returns a new instance of RepositoriesNpmApi.
19 20 21 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create(npm_npm_repository, opts = {}) ⇒ NpmNpmRepositoryResponse
Create a npm repository A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
27 28 29 30 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 27 def create(npm_npm_repository, opts = {}) data, _status_code, _headers = create_with_http_info(npm_npm_repository, opts) data end |
#create_with_http_info(npm_npm_repository, opts = {}) ⇒ Array<(NpmNpmRepositoryResponse, Integer, Hash)>
Create a npm repository A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
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 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 37 def create_with_http_info(npm_npm_repository, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.create ...' end # verify the required parameter 'npm_npm_repository' is set if @api_client.config.client_side_validation && npm_npm_repository.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository' when calling RepositoriesNpmApi.create" end # resource path local_var_path = '/pulp/api/v3/repositories/npm/npm/' # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(npm_npm_repository) # return_type return_type = opts[:debug_return_type] || 'NpmNpmRepositoryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.create", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete(npm_npm_repository_href, opts = {}) ⇒ AsyncOperationResponse
Delete a npm repository Trigger an asynchronous delete task
95 96 97 98 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 95 def delete(npm_npm_repository_href, opts = {}) data, _status_code, _headers = delete_with_http_info(npm_npm_repository_href, opts) data end |
#delete_with_http_info(npm_npm_repository_href, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Delete a npm repository Trigger an asynchronous delete task
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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 105 def delete_with_http_info(npm_npm_repository_href, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.delete ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.delete" end # resource path local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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] || 'AsyncOperationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.delete", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list(opts = {}) ⇒ PaginatednpmNpmRepositoryResponseList
List npm repositorys A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
187 188 189 190 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 187 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end |
#list_with_http_info(opts = {}) ⇒ Array<(PaginatednpmNpmRepositoryResponseList, Integer, Hash)>
List npm repositorys A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
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 261 262 263 264 265 266 267 268 269 270 271 272 273 274 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 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 226 def list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.list ...' end allowable_values = ["-description", "-name", "-next_version", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-retain_repo_versions", "-user_hidden", "description", "name", "next_version", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "retain_repo_versions", "user_hidden"] if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}" end # resource path local_var_path = '/pulp/api/v3/repositories/npm/npm/' # query parameters query_params = opts[:query_params] || {} query_params[:'latest_with_content'] = opts[:'latest_with_content'] if !opts[:'latest_with_content'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil? query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil? query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil? query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil? query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil? query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil? query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil? query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil? query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil? query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil? query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil? query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'remote'] = opts[:'remote'] if !opts[:'remote'].nil? query_params[:'retain_repo_versions'] = opts[:'retain_repo_versions'] if !opts[:'retain_repo_versions'].nil? query_params[:'retain_repo_versions__gt'] = opts[:'retain_repo_versions__gt'] if !opts[:'retain_repo_versions__gt'].nil? query_params[:'retain_repo_versions__gte'] = opts[:'retain_repo_versions__gte'] if !opts[:'retain_repo_versions__gte'].nil? query_params[:'retain_repo_versions__isnull'] = opts[:'retain_repo_versions__isnull'] if !opts[:'retain_repo_versions__isnull'].nil? query_params[:'retain_repo_versions__lt'] = opts[:'retain_repo_versions__lt'] if !opts[:'retain_repo_versions__lt'].nil? query_params[:'retain_repo_versions__lte'] = opts[:'retain_repo_versions__lte'] if !opts[:'retain_repo_versions__lte'].nil? query_params[:'retain_repo_versions__ne'] = opts[:'retain_repo_versions__ne'] if !opts[:'retain_repo_versions__ne'].nil? query_params[:'retain_repo_versions__range'] = @api_client.build_collection_param(opts[:'retain_repo_versions__range'], :csv) if !opts[:'retain_repo_versions__range'].nil? query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil? 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] || 'PaginatednpmNpmRepositoryResponseList' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.list", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#modify(npm_npm_repository_href, repository_add_remove_content, opts = {}) ⇒ AsyncOperationResponse
Modify Repository Content Trigger an asynchronous task to create a new repository version.
310 311 312 313 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 310 def modify(npm_npm_repository_href, repository_add_remove_content, opts = {}) data, _status_code, _headers = modify_with_http_info(npm_npm_repository_href, repository_add_remove_content, opts) data end |
#modify_with_http_info(npm_npm_repository_href, repository_add_remove_content, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Modify Repository Content Trigger an asynchronous task to create a new repository version.
321 322 323 324 325 326 327 328 329 330 331 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 375 376 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 321 def modify_with_http_info(npm_npm_repository_href, repository_add_remove_content, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.modify ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.modify" end # verify the required parameter 'repository_add_remove_content' is set if @api_client.config.client_side_validation && repository_add_remove_content.nil? fail ArgumentError, "Missing the required parameter 'repository_add_remove_content' when calling RepositoriesNpmApi.modify" end # resource path local_var_path = '{npm_npm_repository_href}modify/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(repository_add_remove_content) # return_type return_type = opts[:debug_return_type] || 'AsyncOperationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.modify", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#partial_update(npm_npm_repository_href, patchednpm_npm_repository, opts = {}) ⇒ AsyncOperationResponse
Update a npm repository Trigger an asynchronous partial update task
384 385 386 387 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 384 def partial_update(npm_npm_repository_href, patchednpm_npm_repository, opts = {}) data, _status_code, _headers = partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts) data end |
#partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Update a npm repository Trigger an asynchronous partial update task
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 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 395 def partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.partial_update ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.partial_update" end # verify the required parameter 'patchednpm_npm_repository' is set if @api_client.config.client_side_validation && patchednpm_npm_repository.nil? fail ArgumentError, "Missing the required parameter 'patchednpm_npm_repository' when calling RepositoriesNpmApi.partial_update" end # resource path local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patchednpm_npm_repository) # return_type return_type = opts[:debug_return_type] || 'AsyncOperationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.partial_update", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read(npm_npm_repository_href, opts = {}) ⇒ NpmNpmRepositoryResponse
Inspect a npm repository A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
459 460 461 462 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 459 def read(npm_npm_repository_href, opts = {}) data, _status_code, _headers = read_with_http_info(npm_npm_repository_href, opts) data end |
#read_with_http_info(npm_npm_repository_href, opts = {}) ⇒ Array<(NpmNpmRepositoryResponse, Integer, Hash)>
Inspect a npm repository A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 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 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 471 def read_with_http_info(npm_npm_repository_href, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.read ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.read" end # resource path local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_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] || 'NpmNpmRepositoryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_label(npm_npm_repository_href, set_label, opts = {}) ⇒ SetLabelResponse
Set a label Set a single pulp_label on the object to a specific value or null.
527 528 529 530 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 527 def set_label(npm_npm_repository_href, set_label, opts = {}) data, _status_code, _headers = set_label_with_http_info(npm_npm_repository_href, set_label, opts) data end |
#set_label_with_http_info(npm_npm_repository_href, set_label, opts = {}) ⇒ Array<(SetLabelResponse, Integer, Hash)>
Set a label Set a single pulp_label on the object to a specific value or null.
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 538 def set_label_with_http_info(npm_npm_repository_href, set_label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.set_label ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.set_label" end # verify the required parameter 'set_label' is set if @api_client.config.client_side_validation && set_label.nil? fail ArgumentError, "Missing the required parameter 'set_label' when calling RepositoriesNpmApi.set_label" end # resource path local_var_path = '{npm_npm_repository_href}set_label/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label) # return_type return_type = opts[:debug_return_type] || 'SetLabelResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.set_label", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync(npm_npm_repository_href, repository_sync_url, opts = {}) ⇒ AsyncOperationResponse
Sync from remote Trigger an asynchronous task to sync content.
601 602 603 604 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 601 def sync(npm_npm_repository_href, repository_sync_url, opts = {}) data, _status_code, _headers = sync_with_http_info(npm_npm_repository_href, repository_sync_url, opts) data end |
#sync_with_http_info(npm_npm_repository_href, repository_sync_url, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Sync from remote Trigger an asynchronous task to sync content.
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 612 def sync_with_http_info(npm_npm_repository_href, repository_sync_url, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.sync ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.sync" end # verify the required parameter 'repository_sync_url' is set if @api_client.config.client_side_validation && repository_sync_url.nil? fail ArgumentError, "Missing the required parameter 'repository_sync_url' when calling RepositoriesNpmApi.sync" end # resource path local_var_path = '{npm_npm_repository_href}sync/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(repository_sync_url) # return_type return_type = opts[:debug_return_type] || 'AsyncOperationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.sync", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unset_label(npm_npm_repository_href, unset_label, opts = {}) ⇒ UnsetLabelResponse
Unset a label Unset a single pulp_label on the object.
675 676 677 678 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 675 def unset_label(npm_npm_repository_href, unset_label, opts = {}) data, _status_code, _headers = unset_label_with_http_info(npm_npm_repository_href, unset_label, opts) data end |
#unset_label_with_http_info(npm_npm_repository_href, unset_label, opts = {}) ⇒ Array<(UnsetLabelResponse, Integer, Hash)>
Unset a label Unset a single pulp_label on the object.
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 686 def unset_label_with_http_info(npm_npm_repository_href, unset_label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.unset_label ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.unset_label" end # verify the required parameter 'unset_label' is set if @api_client.config.client_side_validation && unset_label.nil? fail ArgumentError, "Missing the required parameter 'unset_label' when calling RepositoriesNpmApi.unset_label" end # resource path local_var_path = '{npm_npm_repository_href}unset_label/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label) # return_type return_type = opts[:debug_return_type] || 'UnsetLabelResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.unset_label", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update(npm_npm_repository_href, npm_npm_repository, opts = {}) ⇒ AsyncOperationResponse
Update a npm repository Trigger an asynchronous update task
749 750 751 752 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 749 def update(npm_npm_repository_href, npm_npm_repository, opts = {}) data, _status_code, _headers = update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts) data end |
#update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>
Update a npm repository Trigger an asynchronous update task
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 |
# File 'lib/pulp_npm_client/api/repositories_npm_api.rb', line 760 def update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.update ...' end # verify the required parameter 'npm_npm_repository_href' is set if @api_client.config.client_side_validation && npm_npm_repository_href.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.update" end # verify the required parameter 'npm_npm_repository' is set if @api_client.config.client_side_validation && npm_npm_repository.nil? fail ArgumentError, "Missing the required parameter 'npm_npm_repository' when calling RepositoriesNpmApi.update" end # resource path local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/')) # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(npm_npm_repository) # return_type return_type = opts[:debug_return_type] || 'AsyncOperationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"RepositoriesNpmApi.update", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RepositoriesNpmApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |