pulp_npm_client 0.1.0a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +157 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentPackagesApi.md +208 -0
  7. data/docs/ContentSummary.md +21 -0
  8. data/docs/ContentSummaryResponse.md +21 -0
  9. data/docs/DistributionsNpmApi.md +364 -0
  10. data/docs/NpmNpmDistribution.md +25 -0
  11. data/docs/NpmNpmDistributionResponse.md +31 -0
  12. data/docs/NpmNpmRemote.md +37 -0
  13. data/docs/NpmNpmRemoteResponse.md +43 -0
  14. data/docs/NpmNpmRepository.md +21 -0
  15. data/docs/NpmNpmRepositoryResponse.md +29 -0
  16. data/docs/NpmPackage.md +27 -0
  17. data/docs/NpmPackageResponse.md +27 -0
  18. data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
  19. data/docs/PaginatednpmNpmDistributionResponseList.md +23 -0
  20. data/docs/PaginatednpmNpmRemoteResponseList.md +23 -0
  21. data/docs/PaginatednpmNpmRepositoryResponseList.md +23 -0
  22. data/docs/PaginatednpmPackageResponseList.md +23 -0
  23. data/docs/PatchednpmNpmDistribution.md +25 -0
  24. data/docs/PatchednpmNpmRemote.md +37 -0
  25. data/docs/PatchednpmNpmRepository.md +21 -0
  26. data/docs/PolicyEnum.md +16 -0
  27. data/docs/PulpNpmPackagesApi.md +60 -0
  28. data/docs/RemotesNpmApi.md +368 -0
  29. data/docs/RepositoriesNpmApi.md +468 -0
  30. data/docs/RepositoriesNpmVersionsApi.md +271 -0
  31. data/docs/RepositoryAddRemoveContent.md +21 -0
  32. data/docs/RepositorySyncURL.md +19 -0
  33. data/docs/RepositoryVersion.md +17 -0
  34. data/docs/RepositoryVersionResponse.md +25 -0
  35. data/git_push.sh +58 -0
  36. data/lib/pulp_npm_client.rb +69 -0
  37. data/lib/pulp_npm_client/api/content_packages_api.rb +264 -0
  38. data/lib/pulp_npm_client/api/distributions_npm_api.rb +445 -0
  39. data/lib/pulp_npm_client/api/pulp_npm_packages_api.rb +86 -0
  40. data/lib/pulp_npm_client/api/remotes_npm_api.rb +451 -0
  41. data/lib/pulp_npm_client/api/repositories_npm_api.rb +573 -0
  42. data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +339 -0
  43. data/lib/pulp_npm_client/api_client.rb +402 -0
  44. data/lib/pulp_npm_client/api_error.rb +57 -0
  45. data/lib/pulp_npm_client/configuration.rb +243 -0
  46. data/lib/pulp_npm_client/models/async_operation_response.rb +213 -0
  47. data/lib/pulp_npm_client/models/content_summary.rb +240 -0
  48. data/lib/pulp_npm_client/models/content_summary_response.rb +240 -0
  49. data/lib/pulp_npm_client/models/npm_npm_distribution.rb +261 -0
  50. data/lib/pulp_npm_client/models/npm_npm_distribution_response.rb +290 -0
  51. data/lib/pulp_npm_client/models/npm_npm_remote.rb +339 -0
  52. data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +368 -0
  53. data/lib/pulp_npm_client/models/npm_npm_repository.rb +234 -0
  54. data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +271 -0
  55. data/lib/pulp_npm_client/models/npm_package.rb +270 -0
  56. data/lib/pulp_npm_client/models/npm_package_response.rb +269 -0
  57. data/lib/pulp_npm_client/models/paginated_repository_version_response_list.rb +237 -0
  58. data/lib/pulp_npm_client/models/paginatednpm_npm_distribution_response_list.rb +237 -0
  59. data/lib/pulp_npm_client/models/paginatednpm_npm_remote_response_list.rb +237 -0
  60. data/lib/pulp_npm_client/models/paginatednpm_npm_repository_response_list.rb +237 -0
  61. data/lib/pulp_npm_client/models/paginatednpm_package_response_list.rb +237 -0
  62. data/lib/pulp_npm_client/models/patchednpm_npm_distribution.rb +251 -0
  63. data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +329 -0
  64. data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +229 -0
  65. data/lib/pulp_npm_client/models/policy_enum.rb +37 -0
  66. data/lib/pulp_npm_client/models/repository_add_remove_content.rb +232 -0
  67. data/lib/pulp_npm_client/models/repository_sync_url.rb +220 -0
  68. data/lib/pulp_npm_client/models/repository_version.rb +208 -0
  69. data/lib/pulp_npm_client/models/repository_version_response.rb +246 -0
  70. data/lib/pulp_npm_client/version.rb +15 -0
  71. data/pulp_npm_client.gemspec +39 -0
  72. data/spec/api/content_packages_api_spec.rb +87 -0
  73. data/spec/api/distributions_npm_api_spec.rb +121 -0
  74. data/spec/api/pulp_npm_packages_api_spec.rb +48 -0
  75. data/spec/api/remotes_npm_api_spec.rb +123 -0
  76. data/spec/api/repositories_npm_api_spec.rb +143 -0
  77. data/spec/api/repositories_npm_versions_api_spec.rb +104 -0
  78. data/spec/api_client_spec.rb +188 -0
  79. data/spec/configuration_spec.rb +42 -0
  80. data/spec/models/async_operation_response_spec.rb +41 -0
  81. data/spec/models/content_summary_response_spec.rb +53 -0
  82. data/spec/models/content_summary_spec.rb +53 -0
  83. data/spec/models/npm_npm_distribution_response_spec.rb +83 -0
  84. data/spec/models/npm_npm_distribution_spec.rb +65 -0
  85. data/spec/models/npm_npm_remote_response_spec.rb +119 -0
  86. data/spec/models/npm_npm_remote_spec.rb +101 -0
  87. data/spec/models/npm_npm_repository_response_spec.rb +77 -0
  88. data/spec/models/npm_npm_repository_spec.rb +53 -0
  89. data/spec/models/npm_package_response_spec.rb +71 -0
  90. data/spec/models/npm_package_spec.rb +71 -0
  91. data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
  92. data/spec/models/paginatednpm_npm_distribution_response_list_spec.rb +59 -0
  93. data/spec/models/paginatednpm_npm_remote_response_list_spec.rb +59 -0
  94. data/spec/models/paginatednpm_npm_repository_response_list_spec.rb +59 -0
  95. data/spec/models/paginatednpm_package_response_list_spec.rb +59 -0
  96. data/spec/models/patchednpm_npm_distribution_spec.rb +65 -0
  97. data/spec/models/patchednpm_npm_remote_spec.rb +101 -0
  98. data/spec/models/patchednpm_npm_repository_spec.rb +53 -0
  99. data/spec/models/policy_enum_spec.rb +35 -0
  100. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  101. data/spec/models/repository_sync_url_spec.rb +47 -0
  102. data/spec/models/repository_version_response_spec.rb +65 -0
  103. data/spec/models/repository_version_spec.rb +41 -0
  104. data/spec/spec_helper.rb +111 -0
  105. metadata +233 -0
@@ -0,0 +1,86 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpNpmClient
16
+ class PulpNpmPackagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Return a published package.
23
+ # @param name [String]
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :fields A list of fields to include in the response.
26
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
27
+ # @return [nil]
28
+ def get(name, opts = {})
29
+ get_with_http_info(name, opts)
30
+ nil
31
+ end
32
+
33
+ # Return a published package.
34
+ # @param name [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [String] :fields A list of fields to include in the response.
37
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def get_with_http_info(name, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PulpNpmPackagesApi.get ...'
42
+ end
43
+ # verify the required parameter 'name' is set
44
+ if @api_client.config.client_side_validation && name.nil?
45
+ fail ArgumentError, "Missing the required parameter 'name' when calling PulpNpmPackagesApi.get"
46
+ end
47
+ # resource path
48
+ local_var_path = '/pulp_npm/packages/{name}/'.sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/'))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
53
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body]
63
+
64
+ # return_type
65
+ return_type = opts[:return_type]
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || []
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: PulpNpmPackagesApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,451 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpNpmClient
16
+ class RemotesNpmApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a npm remote
23
+ # A ViewSet for NpmRemote. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
24
+ # @param npm_npm_remote [NpmNpmRemote]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [NpmNpmRemoteResponse]
27
+ def create(npm_npm_remote, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(npm_npm_remote, opts)
29
+ data
30
+ end
31
+
32
+ # Create a npm remote
33
+ # A ViewSet for NpmRemote. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
34
+ # @param npm_npm_remote [NpmNpmRemote]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(NpmNpmRemoteResponse, Integer, Hash)>] NpmNpmRemoteResponse data, response status code and response headers
37
+ def create_with_http_info(npm_npm_remote, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.create ...'
40
+ end
41
+ # verify the required parameter 'npm_npm_remote' is set
42
+ if @api_client.config.client_side_validation && npm_npm_remote.nil?
43
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote' when calling RemotesNpmApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/remotes/npm/npm/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(npm_npm_remote)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'NpmNpmRemoteResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['basicAuth']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: RemotesNpmApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a npm remote
87
+ # Trigger an asynchronous delete task
88
+ # @param npm_npm_remote_href [String]
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(npm_npm_remote_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(npm_npm_remote_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a npm remote
97
+ # Trigger an asynchronous delete task
98
+ # @param npm_npm_remote_href [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(npm_npm_remote_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.delete ...'
104
+ end
105
+ # verify the required parameter 'npm_npm_remote_href' is set
106
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{npm_npm_remote_href}'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['basicAuth']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RemotesNpmApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List npm remotes
149
+ # A ViewSet for NpmRemote. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [Integer] :limit Number of results to return per page.
152
+ # @option opts [String] :name name
153
+ # @option opts [String] :name__in name__in
154
+ # @option opts [Integer] :offset The initial index from which to return the results.
155
+ # @option opts [String] :ordering Which field to use when ordering the results.
156
+ # @option opts [String] :pulp_last_updated pulp_last_updated
157
+ # @option opts [String] :pulp_last_updated__gt pulp_last_updated__gt
158
+ # @option opts [String] :pulp_last_updated__gte pulp_last_updated__gte
159
+ # @option opts [String] :pulp_last_updated__lt pulp_last_updated__lt
160
+ # @option opts [String] :pulp_last_updated__lte pulp_last_updated__lte
161
+ # @option opts [String] :pulp_last_updated__range pulp_last_updated__range
162
+ # @option opts [String] :fields A list of fields to include in the response.
163
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
164
+ # @return [PaginatednpmNpmRemoteResponseList]
165
+ def list(opts = {})
166
+ data, _status_code, _headers = list_with_http_info(opts)
167
+ data
168
+ end
169
+
170
+ # List npm remotes
171
+ # A ViewSet for NpmRemote. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [Integer] :limit Number of results to return per page.
174
+ # @option opts [String] :name name
175
+ # @option opts [String] :name__in name__in
176
+ # @option opts [Integer] :offset The initial index from which to return the results.
177
+ # @option opts [String] :ordering Which field to use when ordering the results.
178
+ # @option opts [String] :pulp_last_updated pulp_last_updated
179
+ # @option opts [String] :pulp_last_updated__gt pulp_last_updated__gt
180
+ # @option opts [String] :pulp_last_updated__gte pulp_last_updated__gte
181
+ # @option opts [String] :pulp_last_updated__lt pulp_last_updated__lt
182
+ # @option opts [String] :pulp_last_updated__lte pulp_last_updated__lte
183
+ # @option opts [String] :pulp_last_updated__range pulp_last_updated__range
184
+ # @option opts [String] :fields A list of fields to include in the response.
185
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
186
+ # @return [Array<(PaginatednpmNpmRemoteResponseList, Integer, Hash)>] PaginatednpmNpmRemoteResponseList data, response status code and response headers
187
+ def list_with_http_info(opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.list ...'
190
+ end
191
+ # resource path
192
+ local_var_path = '/pulp/api/v3/remotes/npm/npm/'
193
+
194
+ # query parameters
195
+ query_params = opts[:query_params] || {}
196
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
197
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
198
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
199
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
200
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
201
+ query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
202
+ query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
203
+ query_params[:'pulp_last_updated__gte'] = opts[:'pulp_last_updated__gte'] if !opts[:'pulp_last_updated__gte'].nil?
204
+ query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
205
+ query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
206
+ query_params[:'pulp_last_updated__range'] = opts[:'pulp_last_updated__range'] if !opts[:'pulp_last_updated__range'].nil?
207
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
208
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+ # HTTP header 'Accept' (if needed)
213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
+
215
+ # form parameters
216
+ form_params = opts[:form_params] || {}
217
+
218
+ # http body (model)
219
+ post_body = opts[:body]
220
+
221
+ # return_type
222
+ return_type = opts[:return_type] || 'PaginatednpmNpmRemoteResponseList'
223
+
224
+ # auth_names
225
+ auth_names = opts[:auth_names] || ['basicAuth']
226
+
227
+ new_options = opts.merge(
228
+ :header_params => header_params,
229
+ :query_params => query_params,
230
+ :form_params => form_params,
231
+ :body => post_body,
232
+ :auth_names => auth_names,
233
+ :return_type => return_type
234
+ )
235
+
236
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: RemotesNpmApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+
243
+ # Update a npm remote
244
+ # Trigger an asynchronous partial update task
245
+ # @param npm_npm_remote_href [String]
246
+ # @param patchednpm_npm_remote [PatchednpmNpmRemote]
247
+ # @param [Hash] opts the optional parameters
248
+ # @return [AsyncOperationResponse]
249
+ def partial_update(npm_npm_remote_href, patchednpm_npm_remote, opts = {})
250
+ data, _status_code, _headers = partial_update_with_http_info(npm_npm_remote_href, patchednpm_npm_remote, opts)
251
+ data
252
+ end
253
+
254
+ # Update a npm remote
255
+ # Trigger an asynchronous partial update task
256
+ # @param npm_npm_remote_href [String]
257
+ # @param patchednpm_npm_remote [PatchednpmNpmRemote]
258
+ # @param [Hash] opts the optional parameters
259
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
260
+ def partial_update_with_http_info(npm_npm_remote_href, patchednpm_npm_remote, opts = {})
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.partial_update ...'
263
+ end
264
+ # verify the required parameter 'npm_npm_remote_href' is set
265
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
266
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.partial_update"
267
+ end
268
+ # verify the required parameter 'patchednpm_npm_remote' is set
269
+ if @api_client.config.client_side_validation && patchednpm_npm_remote.nil?
270
+ fail ArgumentError, "Missing the required parameter 'patchednpm_npm_remote' when calling RemotesNpmApi.partial_update"
271
+ end
272
+ # resource path
273
+ local_var_path = '{npm_npm_remote_href}'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
274
+
275
+ # query parameters
276
+ query_params = opts[:query_params] || {}
277
+
278
+ # header parameters
279
+ header_params = opts[:header_params] || {}
280
+ # HTTP header 'Accept' (if needed)
281
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
282
+ # HTTP header 'Content-Type'
283
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
284
+
285
+ # form parameters
286
+ form_params = opts[:form_params] || {}
287
+
288
+ # http body (model)
289
+ post_body = opts[:body] || @api_client.object_to_http_body(patchednpm_npm_remote)
290
+
291
+ # return_type
292
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
293
+
294
+ # auth_names
295
+ auth_names = opts[:auth_names] || ['basicAuth']
296
+
297
+ new_options = opts.merge(
298
+ :header_params => header_params,
299
+ :query_params => query_params,
300
+ :form_params => form_params,
301
+ :body => post_body,
302
+ :auth_names => auth_names,
303
+ :return_type => return_type
304
+ )
305
+
306
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug "API called: RemotesNpmApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
+ end
310
+ return data, status_code, headers
311
+ end
312
+
313
+ # Inspect a npm remote
314
+ # A ViewSet for NpmRemote. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
315
+ # @param npm_npm_remote_href [String]
316
+ # @param [Hash] opts the optional parameters
317
+ # @option opts [String] :fields A list of fields to include in the response.
318
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
319
+ # @return [NpmNpmRemoteResponse]
320
+ def read(npm_npm_remote_href, opts = {})
321
+ data, _status_code, _headers = read_with_http_info(npm_npm_remote_href, opts)
322
+ data
323
+ end
324
+
325
+ # Inspect a npm remote
326
+ # A ViewSet for NpmRemote. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
327
+ # @param npm_npm_remote_href [String]
328
+ # @param [Hash] opts the optional parameters
329
+ # @option opts [String] :fields A list of fields to include in the response.
330
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
331
+ # @return [Array<(NpmNpmRemoteResponse, Integer, Hash)>] NpmNpmRemoteResponse data, response status code and response headers
332
+ def read_with_http_info(npm_npm_remote_href, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.read ...'
335
+ end
336
+ # verify the required parameter 'npm_npm_remote_href' is set
337
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
338
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.read"
339
+ end
340
+ # resource path
341
+ local_var_path = '{npm_npm_remote_href}'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
342
+
343
+ # query parameters
344
+ query_params = opts[:query_params] || {}
345
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
346
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
347
+
348
+ # header parameters
349
+ header_params = opts[:header_params] || {}
350
+ # HTTP header 'Accept' (if needed)
351
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
352
+
353
+ # form parameters
354
+ form_params = opts[:form_params] || {}
355
+
356
+ # http body (model)
357
+ post_body = opts[:body]
358
+
359
+ # return_type
360
+ return_type = opts[:return_type] || 'NpmNpmRemoteResponse'
361
+
362
+ # auth_names
363
+ auth_names = opts[:auth_names] || ['basicAuth']
364
+
365
+ new_options = opts.merge(
366
+ :header_params => header_params,
367
+ :query_params => query_params,
368
+ :form_params => form_params,
369
+ :body => post_body,
370
+ :auth_names => auth_names,
371
+ :return_type => return_type
372
+ )
373
+
374
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug "API called: RemotesNpmApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
377
+ end
378
+ return data, status_code, headers
379
+ end
380
+
381
+ # Update a npm remote
382
+ # Trigger an asynchronous update task
383
+ # @param npm_npm_remote_href [String]
384
+ # @param npm_npm_remote [NpmNpmRemote]
385
+ # @param [Hash] opts the optional parameters
386
+ # @return [AsyncOperationResponse]
387
+ def update(npm_npm_remote_href, npm_npm_remote, opts = {})
388
+ data, _status_code, _headers = update_with_http_info(npm_npm_remote_href, npm_npm_remote, opts)
389
+ data
390
+ end
391
+
392
+ # Update a npm remote
393
+ # Trigger an asynchronous update task
394
+ # @param npm_npm_remote_href [String]
395
+ # @param npm_npm_remote [NpmNpmRemote]
396
+ # @param [Hash] opts the optional parameters
397
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
398
+ def update_with_http_info(npm_npm_remote_href, npm_npm_remote, opts = {})
399
+ if @api_client.config.debugging
400
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.update ...'
401
+ end
402
+ # verify the required parameter 'npm_npm_remote_href' is set
403
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
404
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.update"
405
+ end
406
+ # verify the required parameter 'npm_npm_remote' is set
407
+ if @api_client.config.client_side_validation && npm_npm_remote.nil?
408
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote' when calling RemotesNpmApi.update"
409
+ end
410
+ # resource path
411
+ local_var_path = '{npm_npm_remote_href}'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
412
+
413
+ # query parameters
414
+ query_params = opts[:query_params] || {}
415
+
416
+ # header parameters
417
+ header_params = opts[:header_params] || {}
418
+ # HTTP header 'Accept' (if needed)
419
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
420
+ # HTTP header 'Content-Type'
421
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
422
+
423
+ # form parameters
424
+ form_params = opts[:form_params] || {}
425
+
426
+ # http body (model)
427
+ post_body = opts[:body] || @api_client.object_to_http_body(npm_npm_remote)
428
+
429
+ # return_type
430
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
431
+
432
+ # auth_names
433
+ auth_names = opts[:auth_names] || ['basicAuth']
434
+
435
+ new_options = opts.merge(
436
+ :header_params => header_params,
437
+ :query_params => query_params,
438
+ :form_params => form_params,
439
+ :body => post_body,
440
+ :auth_names => auth_names,
441
+ :return_type => return_type
442
+ )
443
+
444
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
445
+ if @api_client.config.debugging
446
+ @api_client.config.logger.debug "API called: RemotesNpmApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
+ end
448
+ return data, status_code, headers
449
+ end
450
+ end
451
+ end