pulp_npm_client 0.7.2 → 0.8.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ab99f06c97c7117c22d111dd88452cbe762547a858d3b15b019e302e7b3e801
4
- data.tar.gz: 2ac12ad64399a8f379b76eb680b4eef7fb82369bda19207068fa5ddadf31c499
3
+ metadata.gz: a3ffa04ef0af653222b741e825a2060973aedd6832b3bcc86ff747337b4c49a6
4
+ data.tar.gz: 7f6c7b3642a66ce030d3788f0df62f250f294ea425f0144e2f7c6964db397c7c
5
5
  SHA512:
6
- metadata.gz: '09b561b5e26e0070f352a97103e59dc8a257e1084760c2cc15f8131f142de43898aa9ed24aa1a948191a9fbc68989d6f79ab90ef8c18b1d642fffa2748f172e9'
7
- data.tar.gz: 947b31e53ef978bcf5a9838bf15f4e8922315d22390459fadcb20b756a9d4a02e938f3ba7994d4dd0e56a74da9e739072abe15d8e8f398153d0713303ad46074
6
+ metadata.gz: f90b8196258b84fb447b65e7ea171dabe71fadca85827f27a1b0aae8d688253ad76cfbb09634157db92d3b292e50179b9d1fd3c55f3db203b9759158758845e3
7
+ data.tar.gz: 18adecbe1e765238209bc09234f966c6f920dbf4a4cb7caccaef989675e88fda42664849a5789d3f8014b6eacf3fe5c2908b1aa9acd369e4541d2fa75f0d0e5a
data/README.md CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: v3
10
- - Package version: 0.7.2
10
+ - Package version: 0.8.0
11
11
  - Generator version: 7.10.0
12
12
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
13
  For more information, please visit [https://pulpproject.org](https://pulpproject.org)
@@ -25,16 +25,16 @@ gem build pulp_npm_client.gemspec
25
25
  Then either install the gem locally:
26
26
 
27
27
  ```shell
28
- gem install ./pulp_npm_client-0.7.2.gem
28
+ gem install ./pulp_npm_client-0.8.0.gem
29
29
  ```
30
30
 
31
- (for development, run `gem install --dev ./pulp_npm_client-0.7.2.gem` to install the development dependencies)
31
+ (for development, run `gem install --dev ./pulp_npm_client-0.8.0.gem` to install the development dependencies)
32
32
 
33
33
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
34
34
 
35
35
  Finally add this to the Gemfile:
36
36
 
37
- gem 'pulp_npm_client', '~> 0.7.2'
37
+ gem 'pulp_npm_client', '~> 0.8.0'
38
38
 
39
39
  ### Install from Git
40
40
 
@@ -112,6 +112,9 @@ Class | Method | HTTP request | Description
112
112
  *PulpNpmClient::DistributionsNpmApi* | [**set_label**](docs/DistributionsNpmApi.md#set_label) | **POST** {npm_npm_distribution_href}set_label/ | Set a label
113
113
  *PulpNpmClient::DistributionsNpmApi* | [**unset_label**](docs/DistributionsNpmApi.md#unset_label) | **POST** {npm_npm_distribution_href}unset_label/ | Unset a label
114
114
  *PulpNpmClient::DistributionsNpmApi* | [**update**](docs/DistributionsNpmApi.md#update) | **PUT** {npm_npm_distribution_href} | Update a npm distribution
115
+ *PulpNpmClient::NpmApi* | [**put**](docs/NpmApi.md#put) | **PUT** /npm/{path}/{package_name} |
116
+ *PulpNpmClient::NpmPingApi* | [**get**](docs/NpmPingApi.md#get) | **GET** /npm/{path}/-/ping |
117
+ *PulpNpmClient::NpmWhoamiApi* | [**get**](docs/NpmWhoamiApi.md#get) | **GET** /npm/{path}/-/whoami |
115
118
  *PulpNpmClient::RemotesNpmApi* | [**create**](docs/RemotesNpmApi.md#create) | **POST** /pulp/api/v3/remotes/npm/npm/ | Create a npm remote
116
119
  *PulpNpmClient::RemotesNpmApi* | [**delete**](docs/RemotesNpmApi.md#delete) | **DELETE** {npm_npm_remote_href} | Delete a npm remote
117
120
  *PulpNpmClient::RemotesNpmApi* | [**list**](docs/RemotesNpmApi.md#list) | **GET** /pulp/api/v3/remotes/npm/npm/ | List npm remotes
data/docs/NpmApi.md ADDED
@@ -0,0 +1,83 @@
1
+ # PulpNpmClient::NpmApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**put**](NpmApi.md#put) | **PUT** /npm/{path}/{package_name} | |
8
+
9
+
10
+ ## put
11
+
12
+ > put(package_name, path, opts)
13
+
14
+
15
+
16
+ Handle npm/yarn publish requests (``PUT /``).
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'pulp_npm_client'
23
+ # setup authorization
24
+ PulpNpmClient.configure do |config|
25
+ # Configure HTTP basic authorization: basicAuth
26
+ config.username = 'YOUR USERNAME'
27
+ config.password = 'YOUR PASSWORD'
28
+ end
29
+
30
+ api_instance = PulpNpmClient::NpmApi.new
31
+ package_name = 'package_name_example' # String |
32
+ path = 'path_example' # String |
33
+ opts = {
34
+ x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
35
+ }
36
+
37
+ begin
38
+
39
+ api_instance.put(package_name, path, opts)
40
+ rescue PulpNpmClient::ApiError => e
41
+ puts "Error when calling NpmApi->put: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the put_with_http_info variant
46
+
47
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
48
+
49
+ > <Array(nil, Integer, Hash)> put_with_http_info(package_name, path, opts)
50
+
51
+ ```ruby
52
+ begin
53
+
54
+ data, status_code, headers = api_instance.put_with_http_info(package_name, path, opts)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => nil
58
+ rescue PulpNpmClient::ApiError => e
59
+ puts "Error when calling NpmApi->put_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **package_name** | **String** | | |
68
+ | **path** | **String** | | |
69
+ | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
70
+
71
+ ### Return type
72
+
73
+ nil (empty response body)
74
+
75
+ ### Authorization
76
+
77
+ [basicAuth](../README.md#basicAuth)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: Not defined
82
+ - **Accept**: Not defined
83
+
@@ -0,0 +1,85 @@
1
+ # PulpNpmClient::NpmPingApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get**](NpmPingApi.md#get) | **GET** /npm/{path}/-/ping | |
8
+
9
+
10
+ ## get
11
+
12
+ > get(path, opts)
13
+
14
+
15
+
16
+ Handle ``GET /-/ping`` -- registry health check.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'pulp_npm_client'
23
+ # setup authorization
24
+ PulpNpmClient.configure do |config|
25
+ # Configure HTTP basic authorization: basicAuth
26
+ config.username = 'YOUR USERNAME'
27
+ config.password = 'YOUR PASSWORD'
28
+ end
29
+
30
+ api_instance = PulpNpmClient::NpmPingApi.new
31
+ path = 'path_example' # String |
32
+ opts = {
33
+ x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
34
+ fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
35
+ exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
36
+ }
37
+
38
+ begin
39
+
40
+ api_instance.get(path, opts)
41
+ rescue PulpNpmClient::ApiError => e
42
+ puts "Error when calling NpmPingApi->get: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the get_with_http_info variant
47
+
48
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
49
+
50
+ > <Array(nil, Integer, Hash)> get_with_http_info(path, opts)
51
+
52
+ ```ruby
53
+ begin
54
+
55
+ data, status_code, headers = api_instance.get_with_http_info(path, opts)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => nil
59
+ rescue PulpNpmClient::ApiError => e
60
+ puts "Error when calling NpmPingApi->get_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **path** | **String** | | |
69
+ | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
70
+ | **fields** | [**Array&lt;String&gt;**](String.md) | A list of fields to include in the response. | [optional] |
71
+ | **exclude_fields** | [**Array&lt;String&gt;**](String.md) | A list of fields to exclude from the response. | [optional] |
72
+
73
+ ### Return type
74
+
75
+ nil (empty response body)
76
+
77
+ ### Authorization
78
+
79
+ [basicAuth](../README.md#basicAuth)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: Not defined
84
+ - **Accept**: Not defined
85
+
@@ -0,0 +1,85 @@
1
+ # PulpNpmClient::NpmWhoamiApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get**](NpmWhoamiApi.md#get) | **GET** /npm/{path}/-/whoami | |
8
+
9
+
10
+ ## get
11
+
12
+ > get(path, opts)
13
+
14
+
15
+
16
+ Handle ``GET /-/whoami`` -- return the authenticated user.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'pulp_npm_client'
23
+ # setup authorization
24
+ PulpNpmClient.configure do |config|
25
+ # Configure HTTP basic authorization: basicAuth
26
+ config.username = 'YOUR USERNAME'
27
+ config.password = 'YOUR PASSWORD'
28
+ end
29
+
30
+ api_instance = PulpNpmClient::NpmWhoamiApi.new
31
+ path = 'path_example' # String |
32
+ opts = {
33
+ x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
34
+ fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
35
+ exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
36
+ }
37
+
38
+ begin
39
+
40
+ api_instance.get(path, opts)
41
+ rescue PulpNpmClient::ApiError => e
42
+ puts "Error when calling NpmWhoamiApi->get: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the get_with_http_info variant
47
+
48
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
49
+
50
+ > <Array(nil, Integer, Hash)> get_with_http_info(path, opts)
51
+
52
+ ```ruby
53
+ begin
54
+
55
+ data, status_code, headers = api_instance.get_with_http_info(path, opts)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => nil
59
+ rescue PulpNpmClient::ApiError => e
60
+ puts "Error when calling NpmWhoamiApi->get_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **path** | **String** | | |
69
+ | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
70
+ | **fields** | [**Array&lt;String&gt;**](String.md) | A list of fields to include in the response. | [optional] |
71
+ | **exclude_fields** | [**Array&lt;String&gt;**](String.md) | A list of fields to exclude from the response. | [optional] |
72
+
73
+ ### Return type
74
+
75
+ nil (empty response body)
76
+
77
+ ### Authorization
78
+
79
+ [basicAuth](../README.md#basicAuth)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: Not defined
84
+ - **Accept**: Not defined
85
+
@@ -0,0 +1,100 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpNpmClient
16
+ class NpmApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Handle npm/yarn publish requests (``PUT /``).
23
+ # @param package_name [String]
24
+ # @param path [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
27
+ # @return [nil]
28
+ def put(package_name, path, opts = {})
29
+ put_with_http_info(package_name, path, opts)
30
+ nil
31
+ end
32
+
33
+ # Handle npm/yarn publish requests (&#x60;&#x60;PUT /&#x60;&#x60;).
34
+ # @param package_name [String]
35
+ # @param path [String]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def put_with_http_info(package_name, path, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: NpmApi.put ...'
42
+ end
43
+ # verify the required parameter 'package_name' is set
44
+ if @api_client.config.client_side_validation && package_name.nil?
45
+ fail ArgumentError, "Missing the required parameter 'package_name' when calling NpmApi.put"
46
+ end
47
+ pattern = Regexp.new(/^@[^\/]+%2[Ff][^\/]+|@[^\/]+\/[^\/]+|[^\/@][^\/]*$/)
48
+ if @api_client.config.client_side_validation && package_name !~ pattern
49
+ fail ArgumentError, "invalid value for 'package_name' when calling NpmApi.put, must conform to the pattern #{pattern}."
50
+ end
51
+
52
+ # verify the required parameter 'path' is set
53
+ if @api_client.config.client_side_validation && path.nil?
54
+ fail ArgumentError, "Missing the required parameter 'path' when calling NpmApi.put"
55
+ end
56
+ pattern = Regexp.new(/^.+?$/)
57
+ if @api_client.config.client_side_validation && path !~ pattern
58
+ fail ArgumentError, "invalid value for 'path' when calling NpmApi.put, must conform to the pattern #{pattern}."
59
+ end
60
+
61
+ # resource path
62
+ local_var_path = '/npm/{path}/{package_name}'.sub('{' + 'package_name' + '}', CGI.escape(package_name.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
63
+
64
+ # query parameters
65
+ query_params = opts[:query_params] || {}
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
70
+
71
+ # form parameters
72
+ form_params = opts[:form_params] || {}
73
+
74
+ # http body (model)
75
+ post_body = opts[:debug_body]
76
+
77
+ # return_type
78
+ return_type = opts[:debug_return_type]
79
+
80
+ # auth_names
81
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
82
+
83
+ new_options = opts.merge(
84
+ :operation => :"NpmApi.put",
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => return_type
91
+ )
92
+
93
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "API called: NpmApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
96
+ end
97
+ return data, status_code, headers
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,95 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpNpmClient
16
+ class NpmPingApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Handle ``GET /-/ping`` -- registry health check.
23
+ # @param path [String]
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
26
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
27
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
28
+ # @return [nil]
29
+ def get(path, opts = {})
30
+ get_with_http_info(path, opts)
31
+ nil
32
+ end
33
+
34
+ # Handle &#x60;&#x60;GET /-/ping&#x60;&#x60; -- registry health check.
35
+ # @param path [String]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
38
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
39
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def get_with_http_info(path, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: NpmPingApi.get ...'
44
+ end
45
+ # verify the required parameter 'path' is set
46
+ if @api_client.config.client_side_validation && path.nil?
47
+ fail ArgumentError, "Missing the required parameter 'path' when calling NpmPingApi.get"
48
+ end
49
+ pattern = Regexp.new(/^.+?$/)
50
+ if @api_client.config.client_side_validation && path !~ pattern
51
+ fail ArgumentError, "invalid value for 'path' when calling NpmPingApi.get, must conform to the pattern #{pattern}."
52
+ end
53
+
54
+ # resource path
55
+ local_var_path = '/npm/{path}/-/ping'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
56
+
57
+ # query parameters
58
+ query_params = opts[:query_params] || {}
59
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
60
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
61
+
62
+ # header parameters
63
+ header_params = opts[:header_params] || {}
64
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:debug_body]
71
+
72
+ # return_type
73
+ return_type = opts[:debug_return_type]
74
+
75
+ # auth_names
76
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
77
+
78
+ new_options = opts.merge(
79
+ :operation => :"NpmPingApi.get",
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => return_type
86
+ )
87
+
88
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: NpmPingApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,95 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpNpmClient
16
+ class NpmWhoamiApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Handle ``GET /-/whoami`` -- return the authenticated user.
23
+ # @param path [String]
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
26
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
27
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
28
+ # @return [nil]
29
+ def get(path, opts = {})
30
+ get_with_http_info(path, opts)
31
+ nil
32
+ end
33
+
34
+ # Handle &#x60;&#x60;GET /-/whoami&#x60;&#x60; -- return the authenticated user.
35
+ # @param path [String]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
38
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
39
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def get_with_http_info(path, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: NpmWhoamiApi.get ...'
44
+ end
45
+ # verify the required parameter 'path' is set
46
+ if @api_client.config.client_side_validation && path.nil?
47
+ fail ArgumentError, "Missing the required parameter 'path' when calling NpmWhoamiApi.get"
48
+ end
49
+ pattern = Regexp.new(/^.+?$/)
50
+ if @api_client.config.client_side_validation && path !~ pattern
51
+ fail ArgumentError, "invalid value for 'path' when calling NpmWhoamiApi.get, must conform to the pattern #{pattern}."
52
+ end
53
+
54
+ # resource path
55
+ local_var_path = '/npm/{path}/-/whoami'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
56
+
57
+ # query parameters
58
+ query_params = opts[:query_params] || {}
59
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
60
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
61
+
62
+ # header parameters
63
+ header_params = opts[:header_params] || {}
64
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:debug_body]
71
+
72
+ # return_type
73
+ return_type = opts[:debug_return_type]
74
+
75
+ # auth_names
76
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
77
+
78
+ new_options = opts.merge(
79
+ :operation => :"NpmWhoamiApi.get",
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => return_type
86
+ )
87
+
88
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: NpmWhoamiApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+ end
95
+ end
@@ -11,5 +11,5 @@ Generator version: 7.10.0
11
11
  =end
12
12
 
13
13
  module PulpNpmClient
14
- VERSION = '0.7.2'
14
+ VERSION = '0.8.0'
15
15
  end
@@ -50,6 +50,9 @@ require 'pulp_npm_client/models/unset_label_response'
50
50
  # APIs
51
51
  require 'pulp_npm_client/api/content_packages_api'
52
52
  require 'pulp_npm_client/api/distributions_npm_api'
53
+ require 'pulp_npm_client/api/npm_api'
54
+ require 'pulp_npm_client/api/npm_ping_api'
55
+ require 'pulp_npm_client/api/npm_whoami_api'
53
56
  require 'pulp_npm_client/api/remotes_npm_api'
54
57
  require 'pulp_npm_client/api/repositories_npm_api'
55
58
  require 'pulp_npm_client/api/repositories_npm_versions_api'
@@ -0,0 +1,48 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for PulpNpmClient::NpmApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'NpmApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = PulpNpmClient::NpmApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of NpmApi' do
30
+ it 'should create an instance of NpmApi' do
31
+ expect(@api_instance).to be_instance_of(PulpNpmClient::NpmApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for put
36
+ # Handle npm/yarn publish requests (&#x60;&#x60;PUT /&#x60;&#x60;).
37
+ # @param package_name
38
+ # @param path
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
41
+ # @return [nil]
42
+ describe 'put test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -0,0 +1,49 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for PulpNpmClient::NpmPingApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'NpmPingApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = PulpNpmClient::NpmPingApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of NpmPingApi' do
30
+ it 'should create an instance of NpmPingApi' do
31
+ expect(@api_instance).to be_instance_of(PulpNpmClient::NpmPingApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get
36
+ # Handle &#x60;&#x60;GET /-/ping&#x60;&#x60; -- registry health check.
37
+ # @param path
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
40
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
41
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
42
+ # @return [nil]
43
+ describe 'get test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
+ end
47
+ end
48
+
49
+ end
@@ -0,0 +1,49 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for PulpNpmClient::NpmWhoamiApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'NpmWhoamiApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = PulpNpmClient::NpmWhoamiApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of NpmWhoamiApi' do
30
+ it 'should create an instance of NpmWhoamiApi' do
31
+ expect(@api_instance).to be_instance_of(PulpNpmClient::NpmWhoamiApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get
36
+ # Handle &#x60;&#x60;GET /-/whoami&#x60;&#x60; -- return the authenticated user.
37
+ # @param path
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
40
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
41
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
42
+ # @return [nil]
43
+ describe 'get test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
+ end
47
+ end
48
+
49
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulp_npm_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -92,6 +92,7 @@ files:
92
92
  - docs/ContentPackagesApi.md
93
93
  - docs/ContentSummaryResponse.md
94
94
  - docs/DistributionsNpmApi.md
95
+ - docs/NpmApi.md
95
96
  - docs/NpmNpmDistribution.md
96
97
  - docs/NpmNpmDistributionResponse.md
97
98
  - docs/NpmNpmRemote.md
@@ -100,6 +101,8 @@ files:
100
101
  - docs/NpmNpmRepository.md
101
102
  - docs/NpmNpmRepositoryResponse.md
102
103
  - docs/NpmPackageResponse.md
104
+ - docs/NpmPingApi.md
105
+ - docs/NpmWhoamiApi.md
103
106
  - docs/PaginatedRepositoryVersionResponseList.md
104
107
  - docs/PaginatednpmNpmDistributionResponseList.md
105
108
  - docs/PaginatednpmNpmRemoteResponseList.md
@@ -125,6 +128,9 @@ files:
125
128
  - lib/pulp_npm_client.rb
126
129
  - lib/pulp_npm_client/api/content_packages_api.rb
127
130
  - lib/pulp_npm_client/api/distributions_npm_api.rb
131
+ - lib/pulp_npm_client/api/npm_api.rb
132
+ - lib/pulp_npm_client/api/npm_ping_api.rb
133
+ - lib/pulp_npm_client/api/npm_whoami_api.rb
128
134
  - lib/pulp_npm_client/api/remotes_npm_api.rb
129
135
  - lib/pulp_npm_client/api/repositories_npm_api.rb
130
136
  - lib/pulp_npm_client/api/repositories_npm_versions_api.rb
@@ -164,6 +170,9 @@ files:
164
170
  - pulp_npm_client.gemspec
165
171
  - spec/api/content_packages_api_spec.rb
166
172
  - spec/api/distributions_npm_api_spec.rb
173
+ - spec/api/npm_api_spec.rb
174
+ - spec/api/npm_ping_api_spec.rb
175
+ - spec/api/npm_whoami_api_spec.rb
167
176
  - spec/api/remotes_npm_api_spec.rb
168
177
  - spec/api/repositories_npm_api_spec.rb
169
178
  - spec/api/repositories_npm_versions_api_spec.rb
@@ -224,8 +233,11 @@ test_files:
224
233
  - spec/api/repositories_npm_versions_api_spec.rb
225
234
  - spec/api/remotes_npm_api_spec.rb
226
235
  - spec/api/distributions_npm_api_spec.rb
236
+ - spec/api/npm_ping_api_spec.rb
237
+ - spec/api/npm_api_spec.rb
227
238
  - spec/api/content_packages_api_spec.rb
228
239
  - spec/api/repositories_npm_api_spec.rb
240
+ - spec/api/npm_whoami_api_spec.rb
229
241
  - spec/models/paginatednpm_npm_distribution_response_list_spec.rb
230
242
  - spec/models/unset_label_response_spec.rb
231
243
  - spec/models/npm_package_response_spec.rb