pulp_cookbook_client 0.1.0b9
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +162 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentCookbooksApi.md +208 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/CookbookCookbookDistribution.md +27 -0
- data/docs/CookbookCookbookDistributionResponse.md +33 -0
- data/docs/CookbookCookbookPackageContent.md +25 -0
- data/docs/CookbookCookbookPackageContentResponse.md +29 -0
- data/docs/CookbookCookbookPublication.md +19 -0
- data/docs/CookbookCookbookPublicationResponse.md +25 -0
- data/docs/CookbookCookbookRemote.md +59 -0
- data/docs/CookbookCookbookRemoteResponse.md +55 -0
- data/docs/CookbookCookbookRepository.md +25 -0
- data/docs/CookbookCookbookRepositoryResponse.md +33 -0
- data/docs/DistributionsCookbookApi.md +372 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookDistributionResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookPackageContentResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookPublicationResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookRemoteResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookRepositoryResponseList.md +23 -0
- data/docs/PatchedcookbookCookbookDistribution.md +27 -0
- data/docs/PatchedcookbookCookbookRemote.md +59 -0
- data/docs/PatchedcookbookCookbookRepository.md +25 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsCookbookApi.md +257 -0
- data/docs/RemotesCookbookApi.md +376 -0
- data/docs/RepositoriesCookbookApi.md +475 -0
- data/docs/RepositoriesCookbookVersionsApi.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 +27 -0
- data/git_push.sh +58 -0
- data/lib/pulp_cookbook_client/api/content_cookbooks_api.rb +264 -0
- data/lib/pulp_cookbook_client/api/distributions_cookbook_api.rb +457 -0
- data/lib/pulp_cookbook_client/api/publications_cookbook_api.rb +312 -0
- data/lib/pulp_cookbook_client/api/remotes_cookbook_api.rb +463 -0
- data/lib/pulp_cookbook_client/api/repositories_cookbook_api.rb +583 -0
- data/lib/pulp_cookbook_client/api/repositories_cookbook_versions_api.rb +339 -0
- data/lib/pulp_cookbook_client/api_client.rb +406 -0
- data/lib/pulp_cookbook_client/api_error.rb +57 -0
- data/lib/pulp_cookbook_client/configuration.rb +250 -0
- data/lib/pulp_cookbook_client/models/async_operation_response.rb +213 -0
- data/lib/pulp_cookbook_client/models/content_summary.rb +246 -0
- data/lib/pulp_cookbook_client/models/content_summary_response.rb +246 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution.rb +308 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution_response.rb +299 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content.rb +287 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content_response.rb +272 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_publication.rb +217 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_publication_response.rb +248 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote.rb +677 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote_response.rb +493 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository.rb +304 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository_response.rb +307 -0
- data/lib/pulp_cookbook_client/models/paginated_repository_version_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_distribution_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_package_content_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_publication_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_remote_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_repository_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_distribution.rb +290 -0
- data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_remote.rb +659 -0
- data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_repository.rb +295 -0
- data/lib/pulp_cookbook_client/models/policy_enum.rb +37 -0
- data/lib/pulp_cookbook_client/models/repository_add_remove_content.rb +232 -0
- data/lib/pulp_cookbook_client/models/repository_sync_url.rb +220 -0
- data/lib/pulp_cookbook_client/models/repository_version.rb +208 -0
- data/lib/pulp_cookbook_client/models/repository_version_response.rb +255 -0
- data/lib/pulp_cookbook_client/version.rb +15 -0
- data/lib/pulp_cookbook_client.rb +72 -0
- data/pulp_cookbook_client.gemspec +39 -0
- data/spec/api/content_cookbooks_api_spec.rb +87 -0
- data/spec/api/distributions_cookbook_api_spec.rb +125 -0
- data/spec/api/publications_cookbook_api_spec.rb +98 -0
- data/spec/api/remotes_cookbook_api_spec.rb +127 -0
- data/spec/api/repositories_cookbook_api_spec.rb +146 -0
- data/spec/api/repositories_cookbook_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/cookbook_cookbook_distribution_response_spec.rb +89 -0
- data/spec/models/cookbook_cookbook_distribution_spec.rb +71 -0
- data/spec/models/cookbook_cookbook_package_content_response_spec.rb +77 -0
- data/spec/models/cookbook_cookbook_package_content_spec.rb +65 -0
- data/spec/models/cookbook_cookbook_publication_response_spec.rb +65 -0
- data/spec/models/cookbook_cookbook_publication_spec.rb +47 -0
- data/spec/models/cookbook_cookbook_remote_response_spec.rb +155 -0
- data/spec/models/cookbook_cookbook_remote_spec.rb +167 -0
- data/spec/models/cookbook_cookbook_repository_response_spec.rb +89 -0
- data/spec/models/cookbook_cookbook_repository_spec.rb +65 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_distribution_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_package_content_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_publication_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_remote_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_repository_response_list_spec.rb +59 -0
- data/spec/models/patchedcookbook_cookbook_distribution_spec.rb +71 -0
- data/spec/models/patchedcookbook_cookbook_remote_spec.rb +167 -0
- data/spec/models/patchedcookbook_cookbook_repository_spec.rb +65 -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 +71 -0
- data/spec/models/repository_version_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +251 -0
@@ -0,0 +1,312 @@
|
|
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.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpCookbookClient
|
16
|
+
class PublicationsCookbookApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a cookbook publication
|
23
|
+
# Trigger an asynchronous task to publish cookbook content.
|
24
|
+
# @param cookbook_cookbook_publication [CookbookCookbookPublication]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AsyncOperationResponse]
|
27
|
+
def create(cookbook_cookbook_publication, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(cookbook_cookbook_publication, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a cookbook publication
|
33
|
+
# Trigger an asynchronous task to publish cookbook content.
|
34
|
+
# @param cookbook_cookbook_publication [CookbookCookbookPublication]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(cookbook_cookbook_publication, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PublicationsCookbookApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'cookbook_cookbook_publication' is set
|
42
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_publication.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_publication' when calling PublicationsCookbookApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/publications/cookbook/cookbook/'
|
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(cookbook_cookbook_publication)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
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: PublicationsCookbookApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete a cookbook publication
|
87
|
+
# File Publication Endpoint. A CookbookPublication contains metadata about all the Cookbook Content in a particular Cookbook Repository Version. Once a CookbookPublication has been created, it can be hosted using the Cookbook Distribution API.
|
88
|
+
# @param cookbook_cookbook_publication_href [String]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [nil]
|
91
|
+
def delete(cookbook_cookbook_publication_href, opts = {})
|
92
|
+
delete_with_http_info(cookbook_cookbook_publication_href, opts)
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a cookbook publication
|
97
|
+
# File Publication Endpoint. A CookbookPublication contains metadata about all the Cookbook Content in a particular Cookbook Repository Version. Once a CookbookPublication has been created, it can be hosted using the Cookbook Distribution API.
|
98
|
+
# @param cookbook_cookbook_publication_href [String]
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
|
+
def delete_with_http_info(cookbook_cookbook_publication_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: PublicationsCookbookApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'cookbook_cookbook_publication_href' is set
|
106
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_publication_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_publication_href' when calling PublicationsCookbookApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{cookbook_cookbook_publication_href}'.sub('{' + 'cookbook_cookbook_publication_href' + '}', CGI.escape(cookbook_cookbook_publication_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
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body]
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type]
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: PublicationsCookbookApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# List cookbook publications
|
147
|
+
# File Publication Endpoint. A CookbookPublication contains metadata about all the Cookbook Content in a particular Cookbook Repository Version. Once a CookbookPublication has been created, it can be hosted using the Cookbook Distribution API.
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
150
|
+
# @option opts [String] :content__in Content Unit referenced by HREF
|
151
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
152
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
153
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
154
|
+
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
155
|
+
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
156
|
+
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
157
|
+
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
158
|
+
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
159
|
+
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
160
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
161
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
162
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
163
|
+
# @return [PaginatedcookbookCookbookPublicationResponseList]
|
164
|
+
def list(opts = {})
|
165
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# List cookbook publications
|
170
|
+
# File Publication Endpoint. A CookbookPublication contains metadata about all the Cookbook Content in a particular Cookbook Repository Version. Once a CookbookPublication has been created, it can be hosted using the Cookbook Distribution API.
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
173
|
+
# @option opts [String] :content__in Content Unit referenced by HREF
|
174
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
175
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
176
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
177
|
+
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
178
|
+
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
179
|
+
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
180
|
+
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
181
|
+
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
182
|
+
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
183
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
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<(PaginatedcookbookCookbookPublicationResponseList, Integer, Hash)>] PaginatedcookbookCookbookPublicationResponseList 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: PublicationsCookbookApi.list ...'
|
190
|
+
end
|
191
|
+
# resource path
|
192
|
+
local_var_path = '/pulp/api/v3/publications/cookbook/cookbook/'
|
193
|
+
|
194
|
+
# query parameters
|
195
|
+
query_params = opts[:query_params] || {}
|
196
|
+
query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
|
197
|
+
query_params[:'content__in'] = opts[:'content__in'] if !opts[:'content__in'].nil?
|
198
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
|
202
|
+
query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
|
203
|
+
query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
|
204
|
+
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
205
|
+
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
206
|
+
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
207
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
208
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
209
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
210
|
+
|
211
|
+
# header parameters
|
212
|
+
header_params = opts[:header_params] || {}
|
213
|
+
# HTTP header 'Accept' (if needed)
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
215
|
+
|
216
|
+
# form parameters
|
217
|
+
form_params = opts[:form_params] || {}
|
218
|
+
|
219
|
+
# http body (model)
|
220
|
+
post_body = opts[:body]
|
221
|
+
|
222
|
+
# return_type
|
223
|
+
return_type = opts[:return_type] || 'PaginatedcookbookCookbookPublicationResponseList'
|
224
|
+
|
225
|
+
# auth_names
|
226
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
227
|
+
|
228
|
+
new_options = opts.merge(
|
229
|
+
:header_params => header_params,
|
230
|
+
:query_params => query_params,
|
231
|
+
:form_params => form_params,
|
232
|
+
:body => post_body,
|
233
|
+
:auth_names => auth_names,
|
234
|
+
:return_type => return_type
|
235
|
+
)
|
236
|
+
|
237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
238
|
+
if @api_client.config.debugging
|
239
|
+
@api_client.config.logger.debug "API called: PublicationsCookbookApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
240
|
+
end
|
241
|
+
return data, status_code, headers
|
242
|
+
end
|
243
|
+
|
244
|
+
# Inspect a cookbook publication
|
245
|
+
# File Publication Endpoint. A CookbookPublication contains metadata about all the Cookbook Content in a particular Cookbook Repository Version. Once a CookbookPublication has been created, it can be hosted using the Cookbook Distribution API.
|
246
|
+
# @param cookbook_cookbook_publication_href [String]
|
247
|
+
# @param [Hash] opts the optional parameters
|
248
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
249
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
250
|
+
# @return [CookbookCookbookPublicationResponse]
|
251
|
+
def read(cookbook_cookbook_publication_href, opts = {})
|
252
|
+
data, _status_code, _headers = read_with_http_info(cookbook_cookbook_publication_href, opts)
|
253
|
+
data
|
254
|
+
end
|
255
|
+
|
256
|
+
# Inspect a cookbook publication
|
257
|
+
# File Publication Endpoint. A CookbookPublication contains metadata about all the Cookbook Content in a particular Cookbook Repository Version. Once a CookbookPublication has been created, it can be hosted using the Cookbook Distribution API.
|
258
|
+
# @param cookbook_cookbook_publication_href [String]
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
261
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
262
|
+
# @return [Array<(CookbookCookbookPublicationResponse, Integer, Hash)>] CookbookCookbookPublicationResponse data, response status code and response headers
|
263
|
+
def read_with_http_info(cookbook_cookbook_publication_href, opts = {})
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug 'Calling API: PublicationsCookbookApi.read ...'
|
266
|
+
end
|
267
|
+
# verify the required parameter 'cookbook_cookbook_publication_href' is set
|
268
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_publication_href.nil?
|
269
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_publication_href' when calling PublicationsCookbookApi.read"
|
270
|
+
end
|
271
|
+
# resource path
|
272
|
+
local_var_path = '{cookbook_cookbook_publication_href}'.sub('{' + 'cookbook_cookbook_publication_href' + '}', CGI.escape(cookbook_cookbook_publication_href.to_s).gsub('%2F', '/'))
|
273
|
+
|
274
|
+
# query parameters
|
275
|
+
query_params = opts[:query_params] || {}
|
276
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
277
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
278
|
+
|
279
|
+
# header parameters
|
280
|
+
header_params = opts[:header_params] || {}
|
281
|
+
# HTTP header 'Accept' (if needed)
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = opts[:form_params] || {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = opts[:body]
|
289
|
+
|
290
|
+
# return_type
|
291
|
+
return_type = opts[:return_type] || 'CookbookCookbookPublicationResponse'
|
292
|
+
|
293
|
+
# auth_names
|
294
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
295
|
+
|
296
|
+
new_options = opts.merge(
|
297
|
+
:header_params => header_params,
|
298
|
+
:query_params => query_params,
|
299
|
+
:form_params => form_params,
|
300
|
+
:body => post_body,
|
301
|
+
:auth_names => auth_names,
|
302
|
+
:return_type => return_type
|
303
|
+
)
|
304
|
+
|
305
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug "API called: PublicationsCookbookApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
|
+
end
|
309
|
+
return data, status_code, headers
|
310
|
+
end
|
311
|
+
end
|
312
|
+
end
|