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,468 @@
|
|
1
|
+
# PulpNpmClient::RepositoriesNpmApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://pulp*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create**](RepositoriesNpmApi.md#create) | **POST** /pulp/api/v3/repositories/npm/npm/ | Create a npm repository
|
8
|
+
[**delete**](RepositoriesNpmApi.md#delete) | **DELETE** {npm_npm_repository_href} | Delete a npm repository
|
9
|
+
[**list**](RepositoriesNpmApi.md#list) | **GET** /pulp/api/v3/repositories/npm/npm/ | List npm repositorys
|
10
|
+
[**modify**](RepositoriesNpmApi.md#modify) | **POST** {npm_npm_repository_href}modify/ | Modify Repository Content
|
11
|
+
[**partial_update**](RepositoriesNpmApi.md#partial_update) | **PATCH** {npm_npm_repository_href} | Update a npm repository
|
12
|
+
[**read**](RepositoriesNpmApi.md#read) | **GET** {npm_npm_repository_href} | Inspect a npm repository
|
13
|
+
[**sync**](RepositoriesNpmApi.md#sync) | **POST** {npm_npm_repository_href}sync/ | Sync from remote
|
14
|
+
[**update**](RepositoriesNpmApi.md#update) | **PUT** {npm_npm_repository_href} | Update a npm repository
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
## create
|
19
|
+
|
20
|
+
> NpmNpmRepositoryResponse create(npm_npm_repository)
|
21
|
+
|
22
|
+
Create a npm repository
|
23
|
+
|
24
|
+
A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
25
|
+
|
26
|
+
### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
# load the gem
|
30
|
+
require 'pulp_npm_client'
|
31
|
+
# setup authorization
|
32
|
+
PulpNpmClient.configure do |config|
|
33
|
+
# Configure HTTP basic authorization: basicAuth
|
34
|
+
config.username = 'YOUR USERNAME'
|
35
|
+
config.password = 'YOUR PASSWORD'
|
36
|
+
end
|
37
|
+
|
38
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
39
|
+
npm_npm_repository = PulpNpmClient::NpmNpmRepository.new # NpmNpmRepository |
|
40
|
+
|
41
|
+
begin
|
42
|
+
#Create a npm repository
|
43
|
+
result = api_instance.create(npm_npm_repository)
|
44
|
+
p result
|
45
|
+
rescue PulpNpmClient::ApiError => e
|
46
|
+
puts "Exception when calling RepositoriesNpmApi->create: #{e}"
|
47
|
+
end
|
48
|
+
```
|
49
|
+
|
50
|
+
### Parameters
|
51
|
+
|
52
|
+
|
53
|
+
Name | Type | Description | Notes
|
54
|
+
------------- | ------------- | ------------- | -------------
|
55
|
+
**npm_npm_repository** | [**NpmNpmRepository**](NpmNpmRepository.md)| |
|
56
|
+
|
57
|
+
### Return type
|
58
|
+
|
59
|
+
[**NpmNpmRepositoryResponse**](NpmNpmRepositoryResponse.md)
|
60
|
+
|
61
|
+
### Authorization
|
62
|
+
|
63
|
+
[basicAuth](../README.md#basicAuth)
|
64
|
+
|
65
|
+
### HTTP request headers
|
66
|
+
|
67
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
68
|
+
- **Accept**: application/json
|
69
|
+
|
70
|
+
|
71
|
+
## delete
|
72
|
+
|
73
|
+
> AsyncOperationResponse delete(npm_npm_repository_href)
|
74
|
+
|
75
|
+
Delete a npm repository
|
76
|
+
|
77
|
+
Trigger an asynchronous delete task
|
78
|
+
|
79
|
+
### Example
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
# load the gem
|
83
|
+
require 'pulp_npm_client'
|
84
|
+
# setup authorization
|
85
|
+
PulpNpmClient.configure do |config|
|
86
|
+
# Configure HTTP basic authorization: basicAuth
|
87
|
+
config.username = 'YOUR USERNAME'
|
88
|
+
config.password = 'YOUR PASSWORD'
|
89
|
+
end
|
90
|
+
|
91
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
92
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
93
|
+
|
94
|
+
begin
|
95
|
+
#Delete a npm repository
|
96
|
+
result = api_instance.delete(npm_npm_repository_href)
|
97
|
+
p result
|
98
|
+
rescue PulpNpmClient::ApiError => e
|
99
|
+
puts "Exception when calling RepositoriesNpmApi->delete: #{e}"
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
### Parameters
|
104
|
+
|
105
|
+
|
106
|
+
Name | Type | Description | Notes
|
107
|
+
------------- | ------------- | ------------- | -------------
|
108
|
+
**npm_npm_repository_href** | **String**| |
|
109
|
+
|
110
|
+
### Return type
|
111
|
+
|
112
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
113
|
+
|
114
|
+
### Authorization
|
115
|
+
|
116
|
+
[basicAuth](../README.md#basicAuth)
|
117
|
+
|
118
|
+
### HTTP request headers
|
119
|
+
|
120
|
+
- **Content-Type**: Not defined
|
121
|
+
- **Accept**: application/json
|
122
|
+
|
123
|
+
|
124
|
+
## list
|
125
|
+
|
126
|
+
> PaginatednpmNpmRepositoryResponseList list(opts)
|
127
|
+
|
128
|
+
List npm repositorys
|
129
|
+
|
130
|
+
A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
131
|
+
|
132
|
+
### Example
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
# load the gem
|
136
|
+
require 'pulp_npm_client'
|
137
|
+
# setup authorization
|
138
|
+
PulpNpmClient.configure do |config|
|
139
|
+
# Configure HTTP basic authorization: basicAuth
|
140
|
+
config.username = 'YOUR USERNAME'
|
141
|
+
config.password = 'YOUR PASSWORD'
|
142
|
+
end
|
143
|
+
|
144
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
145
|
+
opts = {
|
146
|
+
limit: 56, # Integer | Number of results to return per page.
|
147
|
+
name: 'name_example', # String | name
|
148
|
+
name__in: 'name__in_example', # String | name__in
|
149
|
+
offset: 56, # Integer | The initial index from which to return the results.
|
150
|
+
ordering: 'ordering_example', # String | Which field to use when ordering the results.
|
151
|
+
fields: 'fields_example', # String | A list of fields to include in the response.
|
152
|
+
exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
|
153
|
+
}
|
154
|
+
|
155
|
+
begin
|
156
|
+
#List npm repositorys
|
157
|
+
result = api_instance.list(opts)
|
158
|
+
p result
|
159
|
+
rescue PulpNpmClient::ApiError => e
|
160
|
+
puts "Exception when calling RepositoriesNpmApi->list: #{e}"
|
161
|
+
end
|
162
|
+
```
|
163
|
+
|
164
|
+
### Parameters
|
165
|
+
|
166
|
+
|
167
|
+
Name | Type | Description | Notes
|
168
|
+
------------- | ------------- | ------------- | -------------
|
169
|
+
**limit** | **Integer**| Number of results to return per page. | [optional]
|
170
|
+
**name** | **String**| name | [optional]
|
171
|
+
**name__in** | **String**| name__in | [optional]
|
172
|
+
**offset** | **Integer**| The initial index from which to return the results. | [optional]
|
173
|
+
**ordering** | **String**| Which field to use when ordering the results. | [optional]
|
174
|
+
**fields** | **String**| A list of fields to include in the response. | [optional]
|
175
|
+
**exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
|
176
|
+
|
177
|
+
### Return type
|
178
|
+
|
179
|
+
[**PaginatednpmNpmRepositoryResponseList**](PaginatednpmNpmRepositoryResponseList.md)
|
180
|
+
|
181
|
+
### Authorization
|
182
|
+
|
183
|
+
[basicAuth](../README.md#basicAuth)
|
184
|
+
|
185
|
+
### HTTP request headers
|
186
|
+
|
187
|
+
- **Content-Type**: Not defined
|
188
|
+
- **Accept**: application/json
|
189
|
+
|
190
|
+
|
191
|
+
## modify
|
192
|
+
|
193
|
+
> AsyncOperationResponse modify(npm_npm_repository_href, repository_add_remove_content)
|
194
|
+
|
195
|
+
Modify Repository Content
|
196
|
+
|
197
|
+
Trigger an asynchronous task to create a new repository version.
|
198
|
+
|
199
|
+
### Example
|
200
|
+
|
201
|
+
```ruby
|
202
|
+
# load the gem
|
203
|
+
require 'pulp_npm_client'
|
204
|
+
# setup authorization
|
205
|
+
PulpNpmClient.configure do |config|
|
206
|
+
# Configure HTTP basic authorization: basicAuth
|
207
|
+
config.username = 'YOUR USERNAME'
|
208
|
+
config.password = 'YOUR PASSWORD'
|
209
|
+
end
|
210
|
+
|
211
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
212
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
213
|
+
repository_add_remove_content = PulpNpmClient::RepositoryAddRemoveContent.new # RepositoryAddRemoveContent |
|
214
|
+
|
215
|
+
begin
|
216
|
+
#Modify Repository Content
|
217
|
+
result = api_instance.modify(npm_npm_repository_href, repository_add_remove_content)
|
218
|
+
p result
|
219
|
+
rescue PulpNpmClient::ApiError => e
|
220
|
+
puts "Exception when calling RepositoriesNpmApi->modify: #{e}"
|
221
|
+
end
|
222
|
+
```
|
223
|
+
|
224
|
+
### Parameters
|
225
|
+
|
226
|
+
|
227
|
+
Name | Type | Description | Notes
|
228
|
+
------------- | ------------- | ------------- | -------------
|
229
|
+
**npm_npm_repository_href** | **String**| |
|
230
|
+
**repository_add_remove_content** | [**RepositoryAddRemoveContent**](RepositoryAddRemoveContent.md)| |
|
231
|
+
|
232
|
+
### Return type
|
233
|
+
|
234
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
235
|
+
|
236
|
+
### Authorization
|
237
|
+
|
238
|
+
[basicAuth](../README.md#basicAuth)
|
239
|
+
|
240
|
+
### HTTP request headers
|
241
|
+
|
242
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
243
|
+
- **Accept**: application/json
|
244
|
+
|
245
|
+
|
246
|
+
## partial_update
|
247
|
+
|
248
|
+
> AsyncOperationResponse partial_update(npm_npm_repository_href, patchednpm_npm_repository)
|
249
|
+
|
250
|
+
Update a npm repository
|
251
|
+
|
252
|
+
Trigger an asynchronous partial update task
|
253
|
+
|
254
|
+
### Example
|
255
|
+
|
256
|
+
```ruby
|
257
|
+
# load the gem
|
258
|
+
require 'pulp_npm_client'
|
259
|
+
# setup authorization
|
260
|
+
PulpNpmClient.configure do |config|
|
261
|
+
# Configure HTTP basic authorization: basicAuth
|
262
|
+
config.username = 'YOUR USERNAME'
|
263
|
+
config.password = 'YOUR PASSWORD'
|
264
|
+
end
|
265
|
+
|
266
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
267
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
268
|
+
patchednpm_npm_repository = PulpNpmClient::PatchednpmNpmRepository.new # PatchednpmNpmRepository |
|
269
|
+
|
270
|
+
begin
|
271
|
+
#Update a npm repository
|
272
|
+
result = api_instance.partial_update(npm_npm_repository_href, patchednpm_npm_repository)
|
273
|
+
p result
|
274
|
+
rescue PulpNpmClient::ApiError => e
|
275
|
+
puts "Exception when calling RepositoriesNpmApi->partial_update: #{e}"
|
276
|
+
end
|
277
|
+
```
|
278
|
+
|
279
|
+
### Parameters
|
280
|
+
|
281
|
+
|
282
|
+
Name | Type | Description | Notes
|
283
|
+
------------- | ------------- | ------------- | -------------
|
284
|
+
**npm_npm_repository_href** | **String**| |
|
285
|
+
**patchednpm_npm_repository** | [**PatchednpmNpmRepository**](PatchednpmNpmRepository.md)| |
|
286
|
+
|
287
|
+
### Return type
|
288
|
+
|
289
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
290
|
+
|
291
|
+
### Authorization
|
292
|
+
|
293
|
+
[basicAuth](../README.md#basicAuth)
|
294
|
+
|
295
|
+
### HTTP request headers
|
296
|
+
|
297
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
298
|
+
- **Accept**: application/json
|
299
|
+
|
300
|
+
|
301
|
+
## read
|
302
|
+
|
303
|
+
> NpmNpmRepositoryResponse read(npm_npm_repository_href, opts)
|
304
|
+
|
305
|
+
Inspect a npm repository
|
306
|
+
|
307
|
+
A ViewSet for NpmRepository. Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
308
|
+
|
309
|
+
### Example
|
310
|
+
|
311
|
+
```ruby
|
312
|
+
# load the gem
|
313
|
+
require 'pulp_npm_client'
|
314
|
+
# setup authorization
|
315
|
+
PulpNpmClient.configure do |config|
|
316
|
+
# Configure HTTP basic authorization: basicAuth
|
317
|
+
config.username = 'YOUR USERNAME'
|
318
|
+
config.password = 'YOUR PASSWORD'
|
319
|
+
end
|
320
|
+
|
321
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
322
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
323
|
+
opts = {
|
324
|
+
fields: 'fields_example', # String | A list of fields to include in the response.
|
325
|
+
exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
|
326
|
+
}
|
327
|
+
|
328
|
+
begin
|
329
|
+
#Inspect a npm repository
|
330
|
+
result = api_instance.read(npm_npm_repository_href, opts)
|
331
|
+
p result
|
332
|
+
rescue PulpNpmClient::ApiError => e
|
333
|
+
puts "Exception when calling RepositoriesNpmApi->read: #{e}"
|
334
|
+
end
|
335
|
+
```
|
336
|
+
|
337
|
+
### Parameters
|
338
|
+
|
339
|
+
|
340
|
+
Name | Type | Description | Notes
|
341
|
+
------------- | ------------- | ------------- | -------------
|
342
|
+
**npm_npm_repository_href** | **String**| |
|
343
|
+
**fields** | **String**| A list of fields to include in the response. | [optional]
|
344
|
+
**exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
|
345
|
+
|
346
|
+
### Return type
|
347
|
+
|
348
|
+
[**NpmNpmRepositoryResponse**](NpmNpmRepositoryResponse.md)
|
349
|
+
|
350
|
+
### Authorization
|
351
|
+
|
352
|
+
[basicAuth](../README.md#basicAuth)
|
353
|
+
|
354
|
+
### HTTP request headers
|
355
|
+
|
356
|
+
- **Content-Type**: Not defined
|
357
|
+
- **Accept**: application/json
|
358
|
+
|
359
|
+
|
360
|
+
## sync
|
361
|
+
|
362
|
+
> AsyncOperationResponse sync(npm_npm_repository_href, repository_sync_url)
|
363
|
+
|
364
|
+
Sync from remote
|
365
|
+
|
366
|
+
Trigger an asynchronous task to sync content.
|
367
|
+
|
368
|
+
### Example
|
369
|
+
|
370
|
+
```ruby
|
371
|
+
# load the gem
|
372
|
+
require 'pulp_npm_client'
|
373
|
+
# setup authorization
|
374
|
+
PulpNpmClient.configure do |config|
|
375
|
+
# Configure HTTP basic authorization: basicAuth
|
376
|
+
config.username = 'YOUR USERNAME'
|
377
|
+
config.password = 'YOUR PASSWORD'
|
378
|
+
end
|
379
|
+
|
380
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
381
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
382
|
+
repository_sync_url = PulpNpmClient::RepositorySyncURL.new # RepositorySyncURL |
|
383
|
+
|
384
|
+
begin
|
385
|
+
#Sync from remote
|
386
|
+
result = api_instance.sync(npm_npm_repository_href, repository_sync_url)
|
387
|
+
p result
|
388
|
+
rescue PulpNpmClient::ApiError => e
|
389
|
+
puts "Exception when calling RepositoriesNpmApi->sync: #{e}"
|
390
|
+
end
|
391
|
+
```
|
392
|
+
|
393
|
+
### Parameters
|
394
|
+
|
395
|
+
|
396
|
+
Name | Type | Description | Notes
|
397
|
+
------------- | ------------- | ------------- | -------------
|
398
|
+
**npm_npm_repository_href** | **String**| |
|
399
|
+
**repository_sync_url** | [**RepositorySyncURL**](RepositorySyncURL.md)| |
|
400
|
+
|
401
|
+
### Return type
|
402
|
+
|
403
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
404
|
+
|
405
|
+
### Authorization
|
406
|
+
|
407
|
+
[basicAuth](../README.md#basicAuth)
|
408
|
+
|
409
|
+
### HTTP request headers
|
410
|
+
|
411
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
412
|
+
- **Accept**: application/json
|
413
|
+
|
414
|
+
|
415
|
+
## update
|
416
|
+
|
417
|
+
> AsyncOperationResponse update(npm_npm_repository_href, npm_npm_repository)
|
418
|
+
|
419
|
+
Update a npm repository
|
420
|
+
|
421
|
+
Trigger an asynchronous update task
|
422
|
+
|
423
|
+
### Example
|
424
|
+
|
425
|
+
```ruby
|
426
|
+
# load the gem
|
427
|
+
require 'pulp_npm_client'
|
428
|
+
# setup authorization
|
429
|
+
PulpNpmClient.configure do |config|
|
430
|
+
# Configure HTTP basic authorization: basicAuth
|
431
|
+
config.username = 'YOUR USERNAME'
|
432
|
+
config.password = 'YOUR PASSWORD'
|
433
|
+
end
|
434
|
+
|
435
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
436
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
437
|
+
npm_npm_repository = PulpNpmClient::NpmNpmRepository.new # NpmNpmRepository |
|
438
|
+
|
439
|
+
begin
|
440
|
+
#Update a npm repository
|
441
|
+
result = api_instance.update(npm_npm_repository_href, npm_npm_repository)
|
442
|
+
p result
|
443
|
+
rescue PulpNpmClient::ApiError => e
|
444
|
+
puts "Exception when calling RepositoriesNpmApi->update: #{e}"
|
445
|
+
end
|
446
|
+
```
|
447
|
+
|
448
|
+
### Parameters
|
449
|
+
|
450
|
+
|
451
|
+
Name | Type | Description | Notes
|
452
|
+
------------- | ------------- | ------------- | -------------
|
453
|
+
**npm_npm_repository_href** | **String**| |
|
454
|
+
**npm_npm_repository** | [**NpmNpmRepository**](NpmNpmRepository.md)| |
|
455
|
+
|
456
|
+
### Return type
|
457
|
+
|
458
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
459
|
+
|
460
|
+
### Authorization
|
461
|
+
|
462
|
+
[basicAuth](../README.md#basicAuth)
|
463
|
+
|
464
|
+
### HTTP request headers
|
465
|
+
|
466
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
467
|
+
- **Accept**: application/json
|
468
|
+
|