pulp_npm_client 0.1.0a1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +157 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentPackagesApi.md +208 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DistributionsNpmApi.md +364 -0
- data/docs/NpmNpmDistribution.md +25 -0
- data/docs/NpmNpmDistributionResponse.md +31 -0
- data/docs/NpmNpmRemote.md +37 -0
- data/docs/NpmNpmRemoteResponse.md +43 -0
- data/docs/NpmNpmRepository.md +21 -0
- data/docs/NpmNpmRepositoryResponse.md +29 -0
- data/docs/NpmPackage.md +27 -0
- data/docs/NpmPackageResponse.md +27 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
- data/docs/PaginatednpmNpmDistributionResponseList.md +23 -0
- data/docs/PaginatednpmNpmRemoteResponseList.md +23 -0
- data/docs/PaginatednpmNpmRepositoryResponseList.md +23 -0
- data/docs/PaginatednpmPackageResponseList.md +23 -0
- data/docs/PatchednpmNpmDistribution.md +25 -0
- data/docs/PatchednpmNpmRemote.md +37 -0
- data/docs/PatchednpmNpmRepository.md +21 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PulpNpmPackagesApi.md +60 -0
- data/docs/RemotesNpmApi.md +368 -0
- data/docs/RepositoriesNpmApi.md +468 -0
- data/docs/RepositoriesNpmVersionsApi.md +271 -0
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RepositoryVersion.md +17 -0
- data/docs/RepositoryVersionResponse.md +25 -0
- data/git_push.sh +58 -0
- data/lib/pulp_npm_client.rb +69 -0
- data/lib/pulp_npm_client/api/content_packages_api.rb +264 -0
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +445 -0
- data/lib/pulp_npm_client/api/pulp_npm_packages_api.rb +86 -0
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +451 -0
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +573 -0
- data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +339 -0
- data/lib/pulp_npm_client/api_client.rb +402 -0
- data/lib/pulp_npm_client/api_error.rb +57 -0
- data/lib/pulp_npm_client/configuration.rb +243 -0
- data/lib/pulp_npm_client/models/async_operation_response.rb +213 -0
- data/lib/pulp_npm_client/models/content_summary.rb +240 -0
- data/lib/pulp_npm_client/models/content_summary_response.rb +240 -0
- data/lib/pulp_npm_client/models/npm_npm_distribution.rb +261 -0
- data/lib/pulp_npm_client/models/npm_npm_distribution_response.rb +290 -0
- data/lib/pulp_npm_client/models/npm_npm_remote.rb +339 -0
- data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +368 -0
- data/lib/pulp_npm_client/models/npm_npm_repository.rb +234 -0
- data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +271 -0
- data/lib/pulp_npm_client/models/npm_package.rb +270 -0
- data/lib/pulp_npm_client/models/npm_package_response.rb +269 -0
- data/lib/pulp_npm_client/models/paginated_repository_version_response_list.rb +237 -0
- data/lib/pulp_npm_client/models/paginatednpm_npm_distribution_response_list.rb +237 -0
- data/lib/pulp_npm_client/models/paginatednpm_npm_remote_response_list.rb +237 -0
- data/lib/pulp_npm_client/models/paginatednpm_npm_repository_response_list.rb +237 -0
- data/lib/pulp_npm_client/models/paginatednpm_package_response_list.rb +237 -0
- data/lib/pulp_npm_client/models/patchednpm_npm_distribution.rb +251 -0
- data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +329 -0
- data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +229 -0
- data/lib/pulp_npm_client/models/policy_enum.rb +37 -0
- data/lib/pulp_npm_client/models/repository_add_remove_content.rb +232 -0
- data/lib/pulp_npm_client/models/repository_sync_url.rb +220 -0
- data/lib/pulp_npm_client/models/repository_version.rb +208 -0
- data/lib/pulp_npm_client/models/repository_version_response.rb +246 -0
- data/lib/pulp_npm_client/version.rb +15 -0
- data/pulp_npm_client.gemspec +39 -0
- data/spec/api/content_packages_api_spec.rb +87 -0
- data/spec/api/distributions_npm_api_spec.rb +121 -0
- data/spec/api/pulp_npm_packages_api_spec.rb +48 -0
- data/spec/api/remotes_npm_api_spec.rb +123 -0
- data/spec/api/repositories_npm_api_spec.rb +143 -0
- data/spec/api/repositories_npm_versions_api_spec.rb +104 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/content_summary_spec.rb +53 -0
- data/spec/models/npm_npm_distribution_response_spec.rb +83 -0
- data/spec/models/npm_npm_distribution_spec.rb +65 -0
- data/spec/models/npm_npm_remote_response_spec.rb +119 -0
- data/spec/models/npm_npm_remote_spec.rb +101 -0
- data/spec/models/npm_npm_repository_response_spec.rb +77 -0
- data/spec/models/npm_npm_repository_spec.rb +53 -0
- data/spec/models/npm_package_response_spec.rb +71 -0
- data/spec/models/npm_package_spec.rb +71 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
- data/spec/models/paginatednpm_npm_distribution_response_list_spec.rb +59 -0
- data/spec/models/paginatednpm_npm_remote_response_list_spec.rb +59 -0
- data/spec/models/paginatednpm_npm_repository_response_list_spec.rb +59 -0
- data/spec/models/paginatednpm_package_response_list_spec.rb +59 -0
- data/spec/models/patchednpm_npm_distribution_spec.rb +65 -0
- data/spec/models/patchednpm_npm_remote_spec.rb +101 -0
- data/spec/models/patchednpm_npm_repository_spec.rb +53 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/repository_add_remove_content_spec.rb +53 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/repository_version_response_spec.rb +65 -0
- data/spec/models/repository_version_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +233 -0
@@ -0,0 +1,573 @@
|
|
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 RepositoriesNpmApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a npm repository
|
23
|
+
# A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
24
|
+
# @param npm_npm_repository [NpmNpmRepository]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NpmNpmRepositoryResponse]
|
27
|
+
def create(npm_npm_repository, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(npm_npm_repository, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a npm repository
|
33
|
+
# A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
34
|
+
# @param npm_npm_repository [NpmNpmRepository]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(NpmNpmRepositoryResponse, Integer, Hash)>] NpmNpmRepositoryResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(npm_npm_repository, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'npm_npm_repository' is set
|
42
|
+
if @api_client.config.client_side_validation && npm_npm_repository.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository' when calling RepositoriesNpmApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/repositories/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_repository)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'NpmNpmRepositoryResponse'
|
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: RepositoriesNpmApi#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 repository
|
87
|
+
# Trigger an asynchronous delete task
|
88
|
+
# @param npm_npm_repository_href [String]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [AsyncOperationResponse]
|
91
|
+
def delete(npm_npm_repository_href, opts = {})
|
92
|
+
data, _status_code, _headers = delete_with_http_info(npm_npm_repository_href, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a npm repository
|
97
|
+
# Trigger an asynchronous delete task
|
98
|
+
# @param npm_npm_repository_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_repository_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'npm_npm_repository_href' is set
|
106
|
+
if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_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: RepositoriesNpmApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List npm repositorys
|
149
|
+
# A ViewSet for NpmRepository. 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] :fields A list of fields to include in the response.
|
157
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
158
|
+
# @return [PaginatednpmNpmRepositoryResponseList]
|
159
|
+
def list(opts = {})
|
160
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
161
|
+
data
|
162
|
+
end
|
163
|
+
|
164
|
+
# List npm repositorys
|
165
|
+
# A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
168
|
+
# @option opts [String] :name name
|
169
|
+
# @option opts [String] :name__in name__in
|
170
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
171
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
172
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
173
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
174
|
+
# @return [Array<(PaginatednpmNpmRepositoryResponseList, Integer, Hash)>] PaginatednpmNpmRepositoryResponseList data, response status code and response headers
|
175
|
+
def list_with_http_info(opts = {})
|
176
|
+
if @api_client.config.debugging
|
177
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.list ...'
|
178
|
+
end
|
179
|
+
# resource path
|
180
|
+
local_var_path = '/pulp/api/v3/repositories/npm/npm/'
|
181
|
+
|
182
|
+
# query parameters
|
183
|
+
query_params = opts[:query_params] || {}
|
184
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
185
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
186
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
187
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
188
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
189
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
190
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
196
|
+
|
197
|
+
# form parameters
|
198
|
+
form_params = opts[:form_params] || {}
|
199
|
+
|
200
|
+
# http body (model)
|
201
|
+
post_body = opts[:body]
|
202
|
+
|
203
|
+
# return_type
|
204
|
+
return_type = opts[:return_type] || 'PaginatednpmNpmRepositoryResponseList'
|
205
|
+
|
206
|
+
# auth_names
|
207
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
208
|
+
|
209
|
+
new_options = opts.merge(
|
210
|
+
:header_params => header_params,
|
211
|
+
:query_params => query_params,
|
212
|
+
:form_params => form_params,
|
213
|
+
:body => post_body,
|
214
|
+
:auth_names => auth_names,
|
215
|
+
:return_type => return_type
|
216
|
+
)
|
217
|
+
|
218
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug "API called: RepositoriesNpmApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
|
225
|
+
# Modify Repository Content
|
226
|
+
# Trigger an asynchronous task to create a new repository version.
|
227
|
+
# @param npm_npm_repository_href [String]
|
228
|
+
# @param repository_add_remove_content [RepositoryAddRemoveContent]
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @return [AsyncOperationResponse]
|
231
|
+
def modify(npm_npm_repository_href, repository_add_remove_content, opts = {})
|
232
|
+
data, _status_code, _headers = modify_with_http_info(npm_npm_repository_href, repository_add_remove_content, opts)
|
233
|
+
data
|
234
|
+
end
|
235
|
+
|
236
|
+
# Modify Repository Content
|
237
|
+
# Trigger an asynchronous task to create a new repository version.
|
238
|
+
# @param npm_npm_repository_href [String]
|
239
|
+
# @param repository_add_remove_content [RepositoryAddRemoveContent]
|
240
|
+
# @param [Hash] opts the optional parameters
|
241
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
242
|
+
def modify_with_http_info(npm_npm_repository_href, repository_add_remove_content, opts = {})
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.modify ...'
|
245
|
+
end
|
246
|
+
# verify the required parameter 'npm_npm_repository_href' is set
|
247
|
+
if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
|
248
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.modify"
|
249
|
+
end
|
250
|
+
# verify the required parameter 'repository_add_remove_content' is set
|
251
|
+
if @api_client.config.client_side_validation && repository_add_remove_content.nil?
|
252
|
+
fail ArgumentError, "Missing the required parameter 'repository_add_remove_content' when calling RepositoriesNpmApi.modify"
|
253
|
+
end
|
254
|
+
# resource path
|
255
|
+
local_var_path = '{npm_npm_repository_href}modify/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
|
256
|
+
|
257
|
+
# query parameters
|
258
|
+
query_params = opts[:query_params] || {}
|
259
|
+
|
260
|
+
# header parameters
|
261
|
+
header_params = opts[:header_params] || {}
|
262
|
+
# HTTP header 'Accept' (if needed)
|
263
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
264
|
+
# HTTP header 'Content-Type'
|
265
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
266
|
+
|
267
|
+
# form parameters
|
268
|
+
form_params = opts[:form_params] || {}
|
269
|
+
|
270
|
+
# http body (model)
|
271
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_add_remove_content)
|
272
|
+
|
273
|
+
# return_type
|
274
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
275
|
+
|
276
|
+
# auth_names
|
277
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
278
|
+
|
279
|
+
new_options = opts.merge(
|
280
|
+
:header_params => header_params,
|
281
|
+
:query_params => query_params,
|
282
|
+
:form_params => form_params,
|
283
|
+
:body => post_body,
|
284
|
+
:auth_names => auth_names,
|
285
|
+
:return_type => return_type
|
286
|
+
)
|
287
|
+
|
288
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
289
|
+
if @api_client.config.debugging
|
290
|
+
@api_client.config.logger.debug "API called: RepositoriesNpmApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
291
|
+
end
|
292
|
+
return data, status_code, headers
|
293
|
+
end
|
294
|
+
|
295
|
+
# Update a npm repository
|
296
|
+
# Trigger an asynchronous partial update task
|
297
|
+
# @param npm_npm_repository_href [String]
|
298
|
+
# @param patchednpm_npm_repository [PatchednpmNpmRepository]
|
299
|
+
# @param [Hash] opts the optional parameters
|
300
|
+
# @return [AsyncOperationResponse]
|
301
|
+
def partial_update(npm_npm_repository_href, patchednpm_npm_repository, opts = {})
|
302
|
+
data, _status_code, _headers = partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts)
|
303
|
+
data
|
304
|
+
end
|
305
|
+
|
306
|
+
# Update a npm repository
|
307
|
+
# Trigger an asynchronous partial update task
|
308
|
+
# @param npm_npm_repository_href [String]
|
309
|
+
# @param patchednpm_npm_repository [PatchednpmNpmRepository]
|
310
|
+
# @param [Hash] opts the optional parameters
|
311
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
312
|
+
def partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts = {})
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.partial_update ...'
|
315
|
+
end
|
316
|
+
# verify the required parameter 'npm_npm_repository_href' is set
|
317
|
+
if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
|
318
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.partial_update"
|
319
|
+
end
|
320
|
+
# verify the required parameter 'patchednpm_npm_repository' is set
|
321
|
+
if @api_client.config.client_side_validation && patchednpm_npm_repository.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'patchednpm_npm_repository' when calling RepositoriesNpmApi.partial_update"
|
323
|
+
end
|
324
|
+
# resource path
|
325
|
+
local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
|
326
|
+
|
327
|
+
# query parameters
|
328
|
+
query_params = opts[:query_params] || {}
|
329
|
+
|
330
|
+
# header parameters
|
331
|
+
header_params = opts[:header_params] || {}
|
332
|
+
# HTTP header 'Accept' (if needed)
|
333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
334
|
+
# HTTP header 'Content-Type'
|
335
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
336
|
+
|
337
|
+
# form parameters
|
338
|
+
form_params = opts[:form_params] || {}
|
339
|
+
|
340
|
+
# http body (model)
|
341
|
+
post_body = opts[:body] || @api_client.object_to_http_body(patchednpm_npm_repository)
|
342
|
+
|
343
|
+
# return_type
|
344
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
345
|
+
|
346
|
+
# auth_names
|
347
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
348
|
+
|
349
|
+
new_options = opts.merge(
|
350
|
+
:header_params => header_params,
|
351
|
+
:query_params => query_params,
|
352
|
+
:form_params => form_params,
|
353
|
+
:body => post_body,
|
354
|
+
:auth_names => auth_names,
|
355
|
+
:return_type => return_type
|
356
|
+
)
|
357
|
+
|
358
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
359
|
+
if @api_client.config.debugging
|
360
|
+
@api_client.config.logger.debug "API called: RepositoriesNpmApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
361
|
+
end
|
362
|
+
return data, status_code, headers
|
363
|
+
end
|
364
|
+
|
365
|
+
# Inspect a npm repository
|
366
|
+
# A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
367
|
+
# @param npm_npm_repository_href [String]
|
368
|
+
# @param [Hash] opts the optional parameters
|
369
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
370
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
371
|
+
# @return [NpmNpmRepositoryResponse]
|
372
|
+
def read(npm_npm_repository_href, opts = {})
|
373
|
+
data, _status_code, _headers = read_with_http_info(npm_npm_repository_href, opts)
|
374
|
+
data
|
375
|
+
end
|
376
|
+
|
377
|
+
# Inspect a npm repository
|
378
|
+
# A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
379
|
+
# @param npm_npm_repository_href [String]
|
380
|
+
# @param [Hash] opts the optional parameters
|
381
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
382
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
383
|
+
# @return [Array<(NpmNpmRepositoryResponse, Integer, Hash)>] NpmNpmRepositoryResponse data, response status code and response headers
|
384
|
+
def read_with_http_info(npm_npm_repository_href, opts = {})
|
385
|
+
if @api_client.config.debugging
|
386
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.read ...'
|
387
|
+
end
|
388
|
+
# verify the required parameter 'npm_npm_repository_href' is set
|
389
|
+
if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
|
390
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.read"
|
391
|
+
end
|
392
|
+
# resource path
|
393
|
+
local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
|
394
|
+
|
395
|
+
# query parameters
|
396
|
+
query_params = opts[:query_params] || {}
|
397
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
398
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
399
|
+
|
400
|
+
# header parameters
|
401
|
+
header_params = opts[:header_params] || {}
|
402
|
+
# HTTP header 'Accept' (if needed)
|
403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
404
|
+
|
405
|
+
# form parameters
|
406
|
+
form_params = opts[:form_params] || {}
|
407
|
+
|
408
|
+
# http body (model)
|
409
|
+
post_body = opts[:body]
|
410
|
+
|
411
|
+
# return_type
|
412
|
+
return_type = opts[:return_type] || 'NpmNpmRepositoryResponse'
|
413
|
+
|
414
|
+
# auth_names
|
415
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
416
|
+
|
417
|
+
new_options = opts.merge(
|
418
|
+
:header_params => header_params,
|
419
|
+
:query_params => query_params,
|
420
|
+
:form_params => form_params,
|
421
|
+
:body => post_body,
|
422
|
+
:auth_names => auth_names,
|
423
|
+
:return_type => return_type
|
424
|
+
)
|
425
|
+
|
426
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
427
|
+
if @api_client.config.debugging
|
428
|
+
@api_client.config.logger.debug "API called: RepositoriesNpmApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
429
|
+
end
|
430
|
+
return data, status_code, headers
|
431
|
+
end
|
432
|
+
|
433
|
+
# Sync from remote
|
434
|
+
# Trigger an asynchronous task to sync content.
|
435
|
+
# @param npm_npm_repository_href [String]
|
436
|
+
# @param repository_sync_url [RepositorySyncURL]
|
437
|
+
# @param [Hash] opts the optional parameters
|
438
|
+
# @return [AsyncOperationResponse]
|
439
|
+
def sync(npm_npm_repository_href, repository_sync_url, opts = {})
|
440
|
+
data, _status_code, _headers = sync_with_http_info(npm_npm_repository_href, repository_sync_url, opts)
|
441
|
+
data
|
442
|
+
end
|
443
|
+
|
444
|
+
# Sync from remote
|
445
|
+
# Trigger an asynchronous task to sync content.
|
446
|
+
# @param npm_npm_repository_href [String]
|
447
|
+
# @param repository_sync_url [RepositorySyncURL]
|
448
|
+
# @param [Hash] opts the optional parameters
|
449
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
450
|
+
def sync_with_http_info(npm_npm_repository_href, repository_sync_url, opts = {})
|
451
|
+
if @api_client.config.debugging
|
452
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.sync ...'
|
453
|
+
end
|
454
|
+
# verify the required parameter 'npm_npm_repository_href' is set
|
455
|
+
if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
|
456
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.sync"
|
457
|
+
end
|
458
|
+
# verify the required parameter 'repository_sync_url' is set
|
459
|
+
if @api_client.config.client_side_validation && repository_sync_url.nil?
|
460
|
+
fail ArgumentError, "Missing the required parameter 'repository_sync_url' when calling RepositoriesNpmApi.sync"
|
461
|
+
end
|
462
|
+
# resource path
|
463
|
+
local_var_path = '{npm_npm_repository_href}sync/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
|
464
|
+
|
465
|
+
# query parameters
|
466
|
+
query_params = opts[:query_params] || {}
|
467
|
+
|
468
|
+
# header parameters
|
469
|
+
header_params = opts[:header_params] || {}
|
470
|
+
# HTTP header 'Accept' (if needed)
|
471
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
472
|
+
# HTTP header 'Content-Type'
|
473
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
474
|
+
|
475
|
+
# form parameters
|
476
|
+
form_params = opts[:form_params] || {}
|
477
|
+
|
478
|
+
# http body (model)
|
479
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_sync_url)
|
480
|
+
|
481
|
+
# return_type
|
482
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
483
|
+
|
484
|
+
# auth_names
|
485
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
486
|
+
|
487
|
+
new_options = opts.merge(
|
488
|
+
:header_params => header_params,
|
489
|
+
:query_params => query_params,
|
490
|
+
:form_params => form_params,
|
491
|
+
:body => post_body,
|
492
|
+
:auth_names => auth_names,
|
493
|
+
:return_type => return_type
|
494
|
+
)
|
495
|
+
|
496
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
497
|
+
if @api_client.config.debugging
|
498
|
+
@api_client.config.logger.debug "API called: RepositoriesNpmApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
499
|
+
end
|
500
|
+
return data, status_code, headers
|
501
|
+
end
|
502
|
+
|
503
|
+
# Update a npm repository
|
504
|
+
# Trigger an asynchronous update task
|
505
|
+
# @param npm_npm_repository_href [String]
|
506
|
+
# @param npm_npm_repository [NpmNpmRepository]
|
507
|
+
# @param [Hash] opts the optional parameters
|
508
|
+
# @return [AsyncOperationResponse]
|
509
|
+
def update(npm_npm_repository_href, npm_npm_repository, opts = {})
|
510
|
+
data, _status_code, _headers = update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts)
|
511
|
+
data
|
512
|
+
end
|
513
|
+
|
514
|
+
# Update a npm repository
|
515
|
+
# Trigger an asynchronous update task
|
516
|
+
# @param npm_npm_repository_href [String]
|
517
|
+
# @param npm_npm_repository [NpmNpmRepository]
|
518
|
+
# @param [Hash] opts the optional parameters
|
519
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
520
|
+
def update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts = {})
|
521
|
+
if @api_client.config.debugging
|
522
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.update ...'
|
523
|
+
end
|
524
|
+
# verify the required parameter 'npm_npm_repository_href' is set
|
525
|
+
if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
|
526
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.update"
|
527
|
+
end
|
528
|
+
# verify the required parameter 'npm_npm_repository' is set
|
529
|
+
if @api_client.config.client_side_validation && npm_npm_repository.nil?
|
530
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_repository' when calling RepositoriesNpmApi.update"
|
531
|
+
end
|
532
|
+
# resource path
|
533
|
+
local_var_path = '{npm_npm_repository_href}'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
|
534
|
+
|
535
|
+
# query parameters
|
536
|
+
query_params = opts[:query_params] || {}
|
537
|
+
|
538
|
+
# header parameters
|
539
|
+
header_params = opts[:header_params] || {}
|
540
|
+
# HTTP header 'Accept' (if needed)
|
541
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
542
|
+
# HTTP header 'Content-Type'
|
543
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
544
|
+
|
545
|
+
# form parameters
|
546
|
+
form_params = opts[:form_params] || {}
|
547
|
+
|
548
|
+
# http body (model)
|
549
|
+
post_body = opts[:body] || @api_client.object_to_http_body(npm_npm_repository)
|
550
|
+
|
551
|
+
# return_type
|
552
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
553
|
+
|
554
|
+
# auth_names
|
555
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
556
|
+
|
557
|
+
new_options = opts.merge(
|
558
|
+
:header_params => header_params,
|
559
|
+
:query_params => query_params,
|
560
|
+
:form_params => form_params,
|
561
|
+
:body => post_body,
|
562
|
+
:auth_names => auth_names,
|
563
|
+
:return_type => return_type
|
564
|
+
)
|
565
|
+
|
566
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
567
|
+
if @api_client.config.debugging
|
568
|
+
@api_client.config.logger.debug "API called: RepositoriesNpmApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
569
|
+
end
|
570
|
+
return data, status_code, headers
|
571
|
+
end
|
572
|
+
end
|
573
|
+
end
|