aspose_cad_cloud 19.11
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/lib/aspose_cad_cloud.rb +83 -0
- data/lib/aspose_cad_cloud/api/cad_api.rb +2138 -0
- data/lib/aspose_cad_cloud/api_client.rb +403 -0
- data/lib/aspose_cad_cloud/api_error.rb +54 -0
- data/lib/aspose_cad_cloud/configuration.rb +189 -0
- data/lib/aspose_cad_cloud/models/bmp_options_dto.rb +327 -0
- data/lib/aspose_cad_cloud/models/cad_rasterization_options_dto.rb +473 -0
- data/lib/aspose_cad_cloud/models/cad_response.rb +317 -0
- data/lib/aspose_cad_cloud/models/cff2_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/color.rb +312 -0
- data/lib/aspose_cad_cloud/models/dgn_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/drawing_options_base_dto.rb +281 -0
- data/lib/aspose_cad_cloud/models/dwf_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/dwg_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/dxf_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/gif_options_dto.rb +386 -0
- data/lib/aspose_cad_cloud/models/graphics_options.rb +311 -0
- data/lib/aspose_cad_cloud/models/ifc_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/igs_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/jpeg2000_options_dto.rb +322 -0
- data/lib/aspose_cad_cloud/models/jpeg_options_dto.rb +378 -0
- data/lib/aspose_cad_cloud/models/pdf_document_info.rb +237 -0
- data/lib/aspose_cad_cloud/models/pdf_document_options.rb +249 -0
- data/lib/aspose_cad_cloud/models/pdf_options_dto.rb +301 -0
- data/lib/aspose_cad_cloud/models/pen_options.rb +280 -0
- data/lib/aspose_cad_cloud/models/png_options_dto.rb +388 -0
- data/lib/aspose_cad_cloud/models/psd_options_dto.rb +388 -0
- data/lib/aspose_cad_cloud/models/rd_optimizer_settings.rb +302 -0
- data/lib/aspose_cad_cloud/models/requests/GetDrawingPropertiesRequest.rb +53 -0
- data/lib/aspose_cad_cloud/models/requests/GetDrawingResizeRequest.rb +69 -0
- data/lib/aspose_cad_cloud/models/requests/GetDrawingRotateFlipRequest.rb +65 -0
- data/lib/aspose_cad_cloud/models/requests/GetDrawingSaveAsRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingBmpRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingGifRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingJpeg2000Request.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingJpegRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingPdfRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingPngRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingPropertiesRequest.rb +45 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingPsdRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingResizeRequest.rb +65 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingRotateFlipRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingSaveAsRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingSvgRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingTiffRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PostDrawingWmfRequest.rb +61 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingBmpRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingGifRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingJpeg2000Request.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingJpegRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingPdfRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingPngRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingPsdRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingSvgRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingTiffRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/requests/PutDrawingWmfRequest.rb +57 -0
- data/lib/aspose_cad_cloud/models/resolution_setting.rb +227 -0
- data/lib/aspose_cad_cloud/models/stl_properties.rb +197 -0
- data/lib/aspose_cad_cloud/models/svg_options_dto.rb +327 -0
- data/lib/aspose_cad_cloud/models/tiff_options_dto.rb +417 -0
- data/lib/aspose_cad_cloud/models/vector_rasterization_options_dto.rb +363 -0
- data/lib/aspose_cad_cloud/models/wmf_options_dto.rb +296 -0
- data/lib/aspose_cad_cloud/version.rb +29 -0
- metadata +178 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 560dada7e667ab074c0aba317618cfdd47ea280d8c3d0c1280f572b17331ef17
|
|
4
|
+
data.tar.gz: 102a008dc62cab6d6e3b24d34ed8e2ae1a6d27ab58aea8017126a57965370958
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 9609470f95265c609c250fae9424a6dcb40777544bccf607844a6aca217a90b6d7ed35f02133214a3b5f45f8ff802cbc33d48d1b10d032eabe8da067e705db65
|
|
7
|
+
data.tar.gz: 07b53625dcb0cb5c36c9d598b5f566fbac7e38dfb375be3c13e14864036c15f7df5e2d608f8631a27f5a7646bb6ea0212a9a6cd725a5279ca9b75b518ac43e8f
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="aspose_cad_cloud.rb">
|
|
3
|
+
# Copyright (c) 2018 Aspose.CAD Cloud
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
# furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
# copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
# SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ------------------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
# Common files
|
|
27
|
+
require_relative 'aspose_cad_cloud/api_client'
|
|
28
|
+
require_relative 'aspose_cad_cloud/api_error'
|
|
29
|
+
require_relative 'aspose_cad_cloud/version'
|
|
30
|
+
require_relative 'aspose_cad_cloud/configuration'
|
|
31
|
+
|
|
32
|
+
# Models
|
|
33
|
+
require_relative 'aspose_cad_cloud/models/cad_response'
|
|
34
|
+
require_relative 'aspose_cad_cloud/models/cff2_properties'
|
|
35
|
+
require_relative 'aspose_cad_cloud/models/color'
|
|
36
|
+
require_relative 'aspose_cad_cloud/models/dgn_properties'
|
|
37
|
+
require_relative 'aspose_cad_cloud/models/drawing_options_base_dto'
|
|
38
|
+
require_relative 'aspose_cad_cloud/models/dwf_properties'
|
|
39
|
+
require_relative 'aspose_cad_cloud/models/dwg_properties'
|
|
40
|
+
require_relative 'aspose_cad_cloud/models/dxf_properties'
|
|
41
|
+
require_relative 'aspose_cad_cloud/models/graphics_options'
|
|
42
|
+
require_relative 'aspose_cad_cloud/models/ifc_properties'
|
|
43
|
+
require_relative 'aspose_cad_cloud/models/igs_properties'
|
|
44
|
+
require_relative 'aspose_cad_cloud/models/pdf_document_info'
|
|
45
|
+
require_relative 'aspose_cad_cloud/models/pdf_document_options'
|
|
46
|
+
require_relative 'aspose_cad_cloud/models/pen_options'
|
|
47
|
+
require_relative 'aspose_cad_cloud/models/rd_optimizer_settings'
|
|
48
|
+
require_relative 'aspose_cad_cloud/models/resolution_setting'
|
|
49
|
+
require_relative 'aspose_cad_cloud/models/stl_properties'
|
|
50
|
+
require_relative 'aspose_cad_cloud/models/vector_rasterization_options_dto'
|
|
51
|
+
require_relative 'aspose_cad_cloud/models/bmp_options_dto'
|
|
52
|
+
require_relative 'aspose_cad_cloud/models/cad_rasterization_options_dto'
|
|
53
|
+
require_relative 'aspose_cad_cloud/models/gif_options_dto'
|
|
54
|
+
require_relative 'aspose_cad_cloud/models/jpeg2000_options_dto'
|
|
55
|
+
require_relative 'aspose_cad_cloud/models/jpeg_options_dto'
|
|
56
|
+
require_relative 'aspose_cad_cloud/models/pdf_options_dto'
|
|
57
|
+
require_relative 'aspose_cad_cloud/models/png_options_dto'
|
|
58
|
+
require_relative 'aspose_cad_cloud/models/psd_options_dto'
|
|
59
|
+
require_relative 'aspose_cad_cloud/models/svg_options_dto'
|
|
60
|
+
require_relative 'aspose_cad_cloud/models/tiff_options_dto'
|
|
61
|
+
require_relative 'aspose_cad_cloud/models/wmf_options_dto'
|
|
62
|
+
|
|
63
|
+
# APIs
|
|
64
|
+
require_relative 'aspose_cad_cloud/api/cad_api'
|
|
65
|
+
|
|
66
|
+
module AsposeCadCloud
|
|
67
|
+
# Main module
|
|
68
|
+
class << self
|
|
69
|
+
# Configure sdk using block.
|
|
70
|
+
# AsposeCadCloud.configure do |config|
|
|
71
|
+
# config.username = "xxx"
|
|
72
|
+
# config.password = "xxx"
|
|
73
|
+
# end
|
|
74
|
+
# If no block given, return the configuration singleton instance.
|
|
75
|
+
def configure
|
|
76
|
+
if block_given?
|
|
77
|
+
yield Configuration.default
|
|
78
|
+
else
|
|
79
|
+
Configuration.default
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,2138 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="cad_api.rb">
|
|
3
|
+
# Copyright (c) 2018 Aspose.CAD Cloud
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
# furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
# copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
# SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# -----------------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
require 'uri'
|
|
27
|
+
|
|
28
|
+
module AsposeCadCloud
|
|
29
|
+
#
|
|
30
|
+
# Aspose.CAD Cloud API
|
|
31
|
+
#
|
|
32
|
+
class CadApi
|
|
33
|
+
attr_accessor :api_client
|
|
34
|
+
|
|
35
|
+
def initialize(api_client = ApiClient.default)
|
|
36
|
+
@api_client = api_client
|
|
37
|
+
require_all '../models/requests'
|
|
38
|
+
request_token
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Retrieves info about an existing drawing.
|
|
42
|
+
#
|
|
43
|
+
# @param request GetDrawingPropertiesRequest
|
|
44
|
+
# @return [CadResponse]
|
|
45
|
+
def get_drawing_properties(request)
|
|
46
|
+
data, _status_code, _headers = get_drawing_properties_with_http_info(request)
|
|
47
|
+
request_token if _status_code == 401
|
|
48
|
+
data
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Retrieves info about an existing drawing.
|
|
52
|
+
#
|
|
53
|
+
# @param request GetDrawingPropertiesRequest
|
|
54
|
+
# @return [Array<(CadResponse, Fixnum, Hash)>]
|
|
55
|
+
# CadResponse data, response status code and response headers
|
|
56
|
+
def get_drawing_properties_with_http_info(request)
|
|
57
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetDrawingPropertiesRequest
|
|
58
|
+
|
|
59
|
+
@api_client.config.logger.debug 'Calling API: CadApi.get_drawing_properties ...' if @api_client.config.debugging
|
|
60
|
+
# verify the required parameter 'name' is set
|
|
61
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.get_drawing_properties' if @api_client.config.client_side_validation && request.name.nil?
|
|
62
|
+
# resource path
|
|
63
|
+
local_var_path = '/cad/{name}/properties'
|
|
64
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = {}
|
|
68
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
69
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
70
|
+
else
|
|
71
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
72
|
+
end
|
|
73
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
74
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
75
|
+
else
|
|
76
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# header parameters
|
|
80
|
+
header_params = {}
|
|
81
|
+
# HTTP header 'Accept' (if needed)
|
|
82
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
83
|
+
# HTTP header 'Content-Type'
|
|
84
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
85
|
+
|
|
86
|
+
# form parameters
|
|
87
|
+
form_params = {}
|
|
88
|
+
|
|
89
|
+
if not form_params.empty?
|
|
90
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# http body (model)
|
|
94
|
+
post_body = nil
|
|
95
|
+
auth_names = ['JWT']
|
|
96
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
97
|
+
header_params: header_params,
|
|
98
|
+
query_params: query_params,
|
|
99
|
+
form_params: form_params,
|
|
100
|
+
body: post_body,
|
|
101
|
+
auth_names: auth_names,
|
|
102
|
+
return_type: 'CadResponse')
|
|
103
|
+
if @api_client.config.debugging
|
|
104
|
+
@api_client.config.logger.debug "API called:
|
|
105
|
+
CadApi#get_drawing_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
106
|
+
end
|
|
107
|
+
[data, status_code, headers]
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Resize an existing drawing.
|
|
111
|
+
#
|
|
112
|
+
# @param request GetDrawingResizeRequest
|
|
113
|
+
# @return [File]
|
|
114
|
+
def get_drawing_resize(request)
|
|
115
|
+
data, _status_code, _headers = get_drawing_resize_with_http_info(request)
|
|
116
|
+
request_token if _status_code == 401
|
|
117
|
+
data
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Resize an existing drawing.
|
|
121
|
+
#
|
|
122
|
+
# @param request GetDrawingResizeRequest
|
|
123
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
124
|
+
# File data, response status code and response headers
|
|
125
|
+
def get_drawing_resize_with_http_info(request)
|
|
126
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetDrawingResizeRequest
|
|
127
|
+
|
|
128
|
+
@api_client.config.logger.debug 'Calling API: CadApi.get_drawing_resize ...' if @api_client.config.debugging
|
|
129
|
+
# verify the required parameter 'name' is set
|
|
130
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.get_drawing_resize' if @api_client.config.client_side_validation && request.name.nil?
|
|
131
|
+
# verify the required parameter 'output_format' is set
|
|
132
|
+
raise ArgumentError, 'Missing the required parameter output_format when calling CadApi.get_drawing_resize' if @api_client.config.client_side_validation && request.output_format.nil?
|
|
133
|
+
# verify the required parameter 'new_width' is set
|
|
134
|
+
raise ArgumentError, 'Missing the required parameter new_width when calling CadApi.get_drawing_resize' if @api_client.config.client_side_validation && request.new_width.nil?
|
|
135
|
+
# verify the required parameter 'new_height' is set
|
|
136
|
+
raise ArgumentError, 'Missing the required parameter new_height when calling CadApi.get_drawing_resize' if @api_client.config.client_side_validation && request.new_height.nil?
|
|
137
|
+
# resource path
|
|
138
|
+
local_var_path = '/cad/{name}/resize'
|
|
139
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
140
|
+
|
|
141
|
+
# query parameters
|
|
142
|
+
query_params = {}
|
|
143
|
+
query_params[downcase_first_letter('outputFormat')] = request.output_format
|
|
144
|
+
query_params[downcase_first_letter('newWidth')] = request.new_width
|
|
145
|
+
query_params[downcase_first_letter('newHeight')] = request.new_height
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
150
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
151
|
+
else
|
|
152
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
153
|
+
end
|
|
154
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
155
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
156
|
+
else
|
|
157
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
158
|
+
end
|
|
159
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
160
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
161
|
+
else
|
|
162
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# header parameters
|
|
166
|
+
header_params = {}
|
|
167
|
+
# HTTP header 'Accept' (if needed)
|
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
169
|
+
# HTTP header 'Content-Type'
|
|
170
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
171
|
+
|
|
172
|
+
# form parameters
|
|
173
|
+
form_params = {}
|
|
174
|
+
|
|
175
|
+
if not form_params.empty?
|
|
176
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# http body (model)
|
|
180
|
+
post_body = nil
|
|
181
|
+
auth_names = ['JWT']
|
|
182
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
183
|
+
header_params: header_params,
|
|
184
|
+
query_params: query_params,
|
|
185
|
+
form_params: form_params,
|
|
186
|
+
body: post_body,
|
|
187
|
+
auth_names: auth_names,
|
|
188
|
+
return_type: 'File')
|
|
189
|
+
if @api_client.config.debugging
|
|
190
|
+
@api_client.config.logger.debug "API called:
|
|
191
|
+
CadApi#get_drawing_resize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
192
|
+
end
|
|
193
|
+
[data, status_code, headers]
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Rotate/flip an existing drawing.
|
|
197
|
+
#
|
|
198
|
+
# @param request GetDrawingRotateFlipRequest
|
|
199
|
+
# @return [File]
|
|
200
|
+
def get_drawing_rotate_flip(request)
|
|
201
|
+
data, _status_code, _headers = get_drawing_rotate_flip_with_http_info(request)
|
|
202
|
+
request_token if _status_code == 401
|
|
203
|
+
data
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Rotate/flip an existing drawing.
|
|
207
|
+
#
|
|
208
|
+
# @param request GetDrawingRotateFlipRequest
|
|
209
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
210
|
+
# File data, response status code and response headers
|
|
211
|
+
def get_drawing_rotate_flip_with_http_info(request)
|
|
212
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetDrawingRotateFlipRequest
|
|
213
|
+
|
|
214
|
+
@api_client.config.logger.debug 'Calling API: CadApi.get_drawing_rotate_flip ...' if @api_client.config.debugging
|
|
215
|
+
# verify the required parameter 'name' is set
|
|
216
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.get_drawing_rotate_flip' if @api_client.config.client_side_validation && request.name.nil?
|
|
217
|
+
# verify the required parameter 'output_format' is set
|
|
218
|
+
raise ArgumentError, 'Missing the required parameter output_format when calling CadApi.get_drawing_rotate_flip' if @api_client.config.client_side_validation && request.output_format.nil?
|
|
219
|
+
# verify the required parameter 'rotate_flip_type' is set
|
|
220
|
+
raise ArgumentError, 'Missing the required parameter rotate_flip_type when calling CadApi.get_drawing_rotate_flip' if @api_client.config.client_side_validation && request.rotate_flip_type.nil?
|
|
221
|
+
# verify enum value
|
|
222
|
+
raise ArgumentError, 'invalid value for rotate_flip_type, must be one of RotateNoneFlipNone, Rotate90FlipNone, Rotate180FlipNone, Rotate270FlipNone, RotateNoneFlipX, Rotate90FlipX, Rotate180FlipX, Rotate270FlipX, RotateNoneFlipY, Rotate90FlipY, Rotate180FlipY, Rotate270FlipY, RotateNoneFlipXY, Rotate90FlipXY, Rotate180FlipXY, Rotate270FlipXY' if @api_client.config.client_side_validation && !['RotateNoneFlipNone', 'Rotate90FlipNone', 'Rotate180FlipNone', 'Rotate270FlipNone', 'RotateNoneFlipX', 'Rotate90FlipX', 'Rotate180FlipX', 'Rotate270FlipX', 'RotateNoneFlipY', 'Rotate90FlipY', 'Rotate180FlipY', 'Rotate270FlipY', 'RotateNoneFlipXY', 'Rotate90FlipXY', 'Rotate180FlipXY', 'Rotate270FlipXY'].include?(request.rotate_flip_type)
|
|
223
|
+
# resource path
|
|
224
|
+
local_var_path = '/cad/{name}/rotateflip'
|
|
225
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
226
|
+
|
|
227
|
+
# query parameters
|
|
228
|
+
query_params = {}
|
|
229
|
+
query_params[downcase_first_letter('outputFormat')] = request.output_format
|
|
230
|
+
query_params[downcase_first_letter('rotateFlipType')] = request.rotate_flip_type
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
234
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
235
|
+
else
|
|
236
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
237
|
+
end
|
|
238
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
239
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
240
|
+
else
|
|
241
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
242
|
+
end
|
|
243
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
244
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
245
|
+
else
|
|
246
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# header parameters
|
|
250
|
+
header_params = {}
|
|
251
|
+
# HTTP header 'Accept' (if needed)
|
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
253
|
+
# HTTP header 'Content-Type'
|
|
254
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = {}
|
|
258
|
+
|
|
259
|
+
if not form_params.empty?
|
|
260
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# http body (model)
|
|
264
|
+
post_body = nil
|
|
265
|
+
auth_names = ['JWT']
|
|
266
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
267
|
+
header_params: header_params,
|
|
268
|
+
query_params: query_params,
|
|
269
|
+
form_params: form_params,
|
|
270
|
+
body: post_body,
|
|
271
|
+
auth_names: auth_names,
|
|
272
|
+
return_type: 'File')
|
|
273
|
+
if @api_client.config.debugging
|
|
274
|
+
@api_client.config.logger.debug "API called:
|
|
275
|
+
CadApi#get_drawing_rotate_flip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
276
|
+
end
|
|
277
|
+
[data, status_code, headers]
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Export an existing drawing to another format.
|
|
281
|
+
#
|
|
282
|
+
# @param request GetDrawingSaveAsRequest
|
|
283
|
+
# @return [File]
|
|
284
|
+
def get_drawing_save_as(request)
|
|
285
|
+
data, _status_code, _headers = get_drawing_save_as_with_http_info(request)
|
|
286
|
+
request_token if _status_code == 401
|
|
287
|
+
data
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Export an existing drawing to another format.
|
|
291
|
+
#
|
|
292
|
+
# @param request GetDrawingSaveAsRequest
|
|
293
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
294
|
+
# File data, response status code and response headers
|
|
295
|
+
def get_drawing_save_as_with_http_info(request)
|
|
296
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetDrawingSaveAsRequest
|
|
297
|
+
|
|
298
|
+
@api_client.config.logger.debug 'Calling API: CadApi.get_drawing_save_as ...' if @api_client.config.debugging
|
|
299
|
+
# verify the required parameter 'name' is set
|
|
300
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.get_drawing_save_as' if @api_client.config.client_side_validation && request.name.nil?
|
|
301
|
+
# verify the required parameter 'output_format' is set
|
|
302
|
+
raise ArgumentError, 'Missing the required parameter output_format when calling CadApi.get_drawing_save_as' if @api_client.config.client_side_validation && request.output_format.nil?
|
|
303
|
+
# resource path
|
|
304
|
+
local_var_path = '/cad/{name}/saveAs/{outputFormat}'
|
|
305
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
306
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outputFormat') + '}', request.output_format.to_s)
|
|
307
|
+
|
|
308
|
+
# query parameters
|
|
309
|
+
query_params = {}
|
|
310
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
311
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
312
|
+
else
|
|
313
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
314
|
+
end
|
|
315
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
316
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
317
|
+
else
|
|
318
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
319
|
+
end
|
|
320
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
321
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
322
|
+
else
|
|
323
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# header parameters
|
|
327
|
+
header_params = {}
|
|
328
|
+
# HTTP header 'Accept' (if needed)
|
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
330
|
+
# HTTP header 'Content-Type'
|
|
331
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
332
|
+
|
|
333
|
+
# form parameters
|
|
334
|
+
form_params = {}
|
|
335
|
+
|
|
336
|
+
if not form_params.empty?
|
|
337
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# http body (model)
|
|
341
|
+
post_body = nil
|
|
342
|
+
auth_names = ['JWT']
|
|
343
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
344
|
+
header_params: header_params,
|
|
345
|
+
query_params: query_params,
|
|
346
|
+
form_params: form_params,
|
|
347
|
+
body: post_body,
|
|
348
|
+
auth_names: auth_names,
|
|
349
|
+
return_type: 'File')
|
|
350
|
+
if @api_client.config.debugging
|
|
351
|
+
@api_client.config.logger.debug "API called:
|
|
352
|
+
CadApi#get_drawing_save_as\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
353
|
+
end
|
|
354
|
+
[data, status_code, headers]
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Export an existing drawing to BMP format with export settings specified.
|
|
358
|
+
#
|
|
359
|
+
# @param request PostDrawingBmpRequest
|
|
360
|
+
# @return [File]
|
|
361
|
+
def post_drawing_bmp(request)
|
|
362
|
+
data, _status_code, _headers = post_drawing_bmp_with_http_info(request)
|
|
363
|
+
request_token if _status_code == 401
|
|
364
|
+
data
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Export an existing drawing to BMP format with export settings specified.
|
|
368
|
+
#
|
|
369
|
+
# @param request PostDrawingBmpRequest
|
|
370
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
371
|
+
# File data, response status code and response headers
|
|
372
|
+
def post_drawing_bmp_with_http_info(request)
|
|
373
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingBmpRequest
|
|
374
|
+
|
|
375
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_bmp ...' if @api_client.config.debugging
|
|
376
|
+
# verify the required parameter 'name' is set
|
|
377
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_bmp' if @api_client.config.client_side_validation && request.name.nil?
|
|
378
|
+
# verify the required parameter 'options' is set
|
|
379
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_bmp' if @api_client.config.client_side_validation && request.options.nil?
|
|
380
|
+
# resource path
|
|
381
|
+
local_var_path = '/cad/{name}/bmp'
|
|
382
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
383
|
+
|
|
384
|
+
# query parameters
|
|
385
|
+
query_params = {}
|
|
386
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
387
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
388
|
+
else
|
|
389
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
390
|
+
end
|
|
391
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
392
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
393
|
+
else
|
|
394
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
395
|
+
end
|
|
396
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
397
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
398
|
+
else
|
|
399
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# header parameters
|
|
403
|
+
header_params = {}
|
|
404
|
+
# HTTP header 'Accept' (if needed)
|
|
405
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
406
|
+
# HTTP header 'Content-Type'
|
|
407
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
408
|
+
|
|
409
|
+
# form parameters
|
|
410
|
+
form_params = {}
|
|
411
|
+
|
|
412
|
+
if not form_params.empty?
|
|
413
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# http body (model)
|
|
417
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
418
|
+
auth_names = ['JWT']
|
|
419
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
420
|
+
header_params: header_params,
|
|
421
|
+
query_params: query_params,
|
|
422
|
+
form_params: form_params,
|
|
423
|
+
body: post_body,
|
|
424
|
+
auth_names: auth_names,
|
|
425
|
+
return_type: 'File')
|
|
426
|
+
if @api_client.config.debugging
|
|
427
|
+
@api_client.config.logger.debug "API called:
|
|
428
|
+
CadApi#post_drawing_bmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
429
|
+
end
|
|
430
|
+
[data, status_code, headers]
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Export an existing drawing into GIF format with export settings specified.
|
|
434
|
+
#
|
|
435
|
+
# @param request PostDrawingGifRequest
|
|
436
|
+
# @return [File]
|
|
437
|
+
def post_drawing_gif(request)
|
|
438
|
+
data, _status_code, _headers = post_drawing_gif_with_http_info(request)
|
|
439
|
+
request_token if _status_code == 401
|
|
440
|
+
data
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Export an existing drawing into GIF format with export settings specified.
|
|
444
|
+
#
|
|
445
|
+
# @param request PostDrawingGifRequest
|
|
446
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
447
|
+
# File data, response status code and response headers
|
|
448
|
+
def post_drawing_gif_with_http_info(request)
|
|
449
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingGifRequest
|
|
450
|
+
|
|
451
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_gif ...' if @api_client.config.debugging
|
|
452
|
+
# verify the required parameter 'name' is set
|
|
453
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_gif' if @api_client.config.client_side_validation && request.name.nil?
|
|
454
|
+
# verify the required parameter 'options' is set
|
|
455
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_gif' if @api_client.config.client_side_validation && request.options.nil?
|
|
456
|
+
# resource path
|
|
457
|
+
local_var_path = '/cad/{name}/gif'
|
|
458
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
459
|
+
|
|
460
|
+
# query parameters
|
|
461
|
+
query_params = {}
|
|
462
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
463
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
464
|
+
else
|
|
465
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
466
|
+
end
|
|
467
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
468
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
469
|
+
else
|
|
470
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
471
|
+
end
|
|
472
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
473
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
474
|
+
else
|
|
475
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
# header parameters
|
|
479
|
+
header_params = {}
|
|
480
|
+
# HTTP header 'Accept' (if needed)
|
|
481
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
482
|
+
# HTTP header 'Content-Type'
|
|
483
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
484
|
+
|
|
485
|
+
# form parameters
|
|
486
|
+
form_params = {}
|
|
487
|
+
|
|
488
|
+
if not form_params.empty?
|
|
489
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# http body (model)
|
|
493
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
494
|
+
auth_names = ['JWT']
|
|
495
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
496
|
+
header_params: header_params,
|
|
497
|
+
query_params: query_params,
|
|
498
|
+
form_params: form_params,
|
|
499
|
+
body: post_body,
|
|
500
|
+
auth_names: auth_names,
|
|
501
|
+
return_type: 'File')
|
|
502
|
+
if @api_client.config.debugging
|
|
503
|
+
@api_client.config.logger.debug "API called:
|
|
504
|
+
CadApi#post_drawing_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
505
|
+
end
|
|
506
|
+
[data, status_code, headers]
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
# Export an existing drawing into JPEG format with export settings specified.
|
|
510
|
+
#
|
|
511
|
+
# @param request PostDrawingJpegRequest
|
|
512
|
+
# @return [File]
|
|
513
|
+
def post_drawing_jpeg(request)
|
|
514
|
+
data, _status_code, _headers = post_drawing_jpeg_with_http_info(request)
|
|
515
|
+
request_token if _status_code == 401
|
|
516
|
+
data
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
# Export an existing drawing into JPEG format with export settings specified.
|
|
520
|
+
#
|
|
521
|
+
# @param request PostDrawingJpegRequest
|
|
522
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
523
|
+
# File data, response status code and response headers
|
|
524
|
+
def post_drawing_jpeg_with_http_info(request)
|
|
525
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingJpegRequest
|
|
526
|
+
|
|
527
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_jpeg ...' if @api_client.config.debugging
|
|
528
|
+
# verify the required parameter 'name' is set
|
|
529
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_jpeg' if @api_client.config.client_side_validation && request.name.nil?
|
|
530
|
+
# verify the required parameter 'options' is set
|
|
531
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_jpeg' if @api_client.config.client_side_validation && request.options.nil?
|
|
532
|
+
# resource path
|
|
533
|
+
local_var_path = '/cad/{name}/jpeg'
|
|
534
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
535
|
+
|
|
536
|
+
# query parameters
|
|
537
|
+
query_params = {}
|
|
538
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
539
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
540
|
+
else
|
|
541
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
542
|
+
end
|
|
543
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
544
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
545
|
+
else
|
|
546
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
547
|
+
end
|
|
548
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
549
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
550
|
+
else
|
|
551
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# header parameters
|
|
555
|
+
header_params = {}
|
|
556
|
+
# HTTP header 'Accept' (if needed)
|
|
557
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
558
|
+
# HTTP header 'Content-Type'
|
|
559
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
560
|
+
|
|
561
|
+
# form parameters
|
|
562
|
+
form_params = {}
|
|
563
|
+
|
|
564
|
+
if not form_params.empty?
|
|
565
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# http body (model)
|
|
569
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
570
|
+
auth_names = ['JWT']
|
|
571
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
572
|
+
header_params: header_params,
|
|
573
|
+
query_params: query_params,
|
|
574
|
+
form_params: form_params,
|
|
575
|
+
body: post_body,
|
|
576
|
+
auth_names: auth_names,
|
|
577
|
+
return_type: 'File')
|
|
578
|
+
if @api_client.config.debugging
|
|
579
|
+
@api_client.config.logger.debug "API called:
|
|
580
|
+
CadApi#post_drawing_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
581
|
+
end
|
|
582
|
+
[data, status_code, headers]
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
# Export an existing drawing into JPEG2000 format with export settings specified.
|
|
586
|
+
#
|
|
587
|
+
# @param request PostDrawingJpeg2000Request
|
|
588
|
+
# @return [File]
|
|
589
|
+
def post_drawing_jpeg2000(request)
|
|
590
|
+
data, _status_code, _headers = post_drawing_jpeg2000_with_http_info(request)
|
|
591
|
+
request_token if _status_code == 401
|
|
592
|
+
data
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
# Export an existing drawing into JPEG2000 format with export settings specified.
|
|
596
|
+
#
|
|
597
|
+
# @param request PostDrawingJpeg2000Request
|
|
598
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
599
|
+
# File data, response status code and response headers
|
|
600
|
+
def post_drawing_jpeg2000_with_http_info(request)
|
|
601
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingJpeg2000Request
|
|
602
|
+
|
|
603
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_jpeg2000 ...' if @api_client.config.debugging
|
|
604
|
+
# verify the required parameter 'name' is set
|
|
605
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_jpeg2000' if @api_client.config.client_side_validation && request.name.nil?
|
|
606
|
+
# verify the required parameter 'options' is set
|
|
607
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_jpeg2000' if @api_client.config.client_side_validation && request.options.nil?
|
|
608
|
+
# resource path
|
|
609
|
+
local_var_path = '/cad/{name}/jpeg2000'
|
|
610
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
611
|
+
|
|
612
|
+
# query parameters
|
|
613
|
+
query_params = {}
|
|
614
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
615
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
616
|
+
else
|
|
617
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
618
|
+
end
|
|
619
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
620
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
621
|
+
else
|
|
622
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
623
|
+
end
|
|
624
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
625
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
626
|
+
else
|
|
627
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
# header parameters
|
|
631
|
+
header_params = {}
|
|
632
|
+
# HTTP header 'Accept' (if needed)
|
|
633
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
634
|
+
# HTTP header 'Content-Type'
|
|
635
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
636
|
+
|
|
637
|
+
# form parameters
|
|
638
|
+
form_params = {}
|
|
639
|
+
|
|
640
|
+
if not form_params.empty?
|
|
641
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
# http body (model)
|
|
645
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
646
|
+
auth_names = ['JWT']
|
|
647
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
648
|
+
header_params: header_params,
|
|
649
|
+
query_params: query_params,
|
|
650
|
+
form_params: form_params,
|
|
651
|
+
body: post_body,
|
|
652
|
+
auth_names: auth_names,
|
|
653
|
+
return_type: 'File')
|
|
654
|
+
if @api_client.config.debugging
|
|
655
|
+
@api_client.config.logger.debug "API called:
|
|
656
|
+
CadApi#post_drawing_jpeg2000\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
657
|
+
end
|
|
658
|
+
[data, status_code, headers]
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# Export an existing drawing to PDF format with export settings specified.
|
|
662
|
+
#
|
|
663
|
+
# @param request PostDrawingPdfRequest
|
|
664
|
+
# @return [File]
|
|
665
|
+
def post_drawing_pdf(request)
|
|
666
|
+
data, _status_code, _headers = post_drawing_pdf_with_http_info(request)
|
|
667
|
+
request_token if _status_code == 401
|
|
668
|
+
data
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# Export an existing drawing to PDF format with export settings specified.
|
|
672
|
+
#
|
|
673
|
+
# @param request PostDrawingPdfRequest
|
|
674
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
675
|
+
# File data, response status code and response headers
|
|
676
|
+
def post_drawing_pdf_with_http_info(request)
|
|
677
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingPdfRequest
|
|
678
|
+
|
|
679
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_pdf ...' if @api_client.config.debugging
|
|
680
|
+
# verify the required parameter 'name' is set
|
|
681
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_pdf' if @api_client.config.client_side_validation && request.name.nil?
|
|
682
|
+
# verify the required parameter 'options' is set
|
|
683
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_pdf' if @api_client.config.client_side_validation && request.options.nil?
|
|
684
|
+
# resource path
|
|
685
|
+
local_var_path = '/cad/{name}/pdf'
|
|
686
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
687
|
+
|
|
688
|
+
# query parameters
|
|
689
|
+
query_params = {}
|
|
690
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
691
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
692
|
+
else
|
|
693
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
694
|
+
end
|
|
695
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
696
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
697
|
+
else
|
|
698
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
699
|
+
end
|
|
700
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
701
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
702
|
+
else
|
|
703
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
# header parameters
|
|
707
|
+
header_params = {}
|
|
708
|
+
# HTTP header 'Accept' (if needed)
|
|
709
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
710
|
+
# HTTP header 'Content-Type'
|
|
711
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
712
|
+
|
|
713
|
+
# form parameters
|
|
714
|
+
form_params = {}
|
|
715
|
+
|
|
716
|
+
if not form_params.empty?
|
|
717
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
# http body (model)
|
|
721
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
722
|
+
auth_names = ['JWT']
|
|
723
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
724
|
+
header_params: header_params,
|
|
725
|
+
query_params: query_params,
|
|
726
|
+
form_params: form_params,
|
|
727
|
+
body: post_body,
|
|
728
|
+
auth_names: auth_names,
|
|
729
|
+
return_type: 'File')
|
|
730
|
+
if @api_client.config.debugging
|
|
731
|
+
@api_client.config.logger.debug "API called:
|
|
732
|
+
CadApi#post_drawing_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
733
|
+
end
|
|
734
|
+
[data, status_code, headers]
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# Export an existing drawing into PNG format with export settings specified.
|
|
738
|
+
#
|
|
739
|
+
# @param request PostDrawingPngRequest
|
|
740
|
+
# @return [File]
|
|
741
|
+
def post_drawing_png(request)
|
|
742
|
+
data, _status_code, _headers = post_drawing_png_with_http_info(request)
|
|
743
|
+
request_token if _status_code == 401
|
|
744
|
+
data
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
# Export an existing drawing into PNG format with export settings specified.
|
|
748
|
+
#
|
|
749
|
+
# @param request PostDrawingPngRequest
|
|
750
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
751
|
+
# File data, response status code and response headers
|
|
752
|
+
def post_drawing_png_with_http_info(request)
|
|
753
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingPngRequest
|
|
754
|
+
|
|
755
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_png ...' if @api_client.config.debugging
|
|
756
|
+
# verify the required parameter 'name' is set
|
|
757
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_png' if @api_client.config.client_side_validation && request.name.nil?
|
|
758
|
+
# verify the required parameter 'options' is set
|
|
759
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_png' if @api_client.config.client_side_validation && request.options.nil?
|
|
760
|
+
# resource path
|
|
761
|
+
local_var_path = '/cad/{name}/png'
|
|
762
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
763
|
+
|
|
764
|
+
# query parameters
|
|
765
|
+
query_params = {}
|
|
766
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
767
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
768
|
+
else
|
|
769
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
770
|
+
end
|
|
771
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
772
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
773
|
+
else
|
|
774
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
775
|
+
end
|
|
776
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
777
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
778
|
+
else
|
|
779
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
780
|
+
end
|
|
781
|
+
|
|
782
|
+
# header parameters
|
|
783
|
+
header_params = {}
|
|
784
|
+
# HTTP header 'Accept' (if needed)
|
|
785
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
786
|
+
# HTTP header 'Content-Type'
|
|
787
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
788
|
+
|
|
789
|
+
# form parameters
|
|
790
|
+
form_params = {}
|
|
791
|
+
|
|
792
|
+
if not form_params.empty?
|
|
793
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
# http body (model)
|
|
797
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
798
|
+
auth_names = ['JWT']
|
|
799
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
800
|
+
header_params: header_params,
|
|
801
|
+
query_params: query_params,
|
|
802
|
+
form_params: form_params,
|
|
803
|
+
body: post_body,
|
|
804
|
+
auth_names: auth_names,
|
|
805
|
+
return_type: 'File')
|
|
806
|
+
if @api_client.config.debugging
|
|
807
|
+
@api_client.config.logger.debug "API called:
|
|
808
|
+
CadApi#post_drawing_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
809
|
+
end
|
|
810
|
+
[data, status_code, headers]
|
|
811
|
+
end
|
|
812
|
+
|
|
813
|
+
# Retrieves info about drawing which is passed as a zero-indexed multipart/form-data content or as raw body stream.
|
|
814
|
+
#
|
|
815
|
+
# @param request PostDrawingPropertiesRequest
|
|
816
|
+
# @return [CadResponse]
|
|
817
|
+
def post_drawing_properties(request)
|
|
818
|
+
data, _status_code, _headers = post_drawing_properties_with_http_info(request)
|
|
819
|
+
request_token if _status_code == 401
|
|
820
|
+
data
|
|
821
|
+
end
|
|
822
|
+
|
|
823
|
+
# Retrieves info about drawing which is passed as a zero-indexed multipart/form-data content or as raw body stream.
|
|
824
|
+
#
|
|
825
|
+
# @param request PostDrawingPropertiesRequest
|
|
826
|
+
# @return [Array<(CadResponse, Fixnum, Hash)>]
|
|
827
|
+
# CadResponse data, response status code and response headers
|
|
828
|
+
def post_drawing_properties_with_http_info(request)
|
|
829
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingPropertiesRequest
|
|
830
|
+
|
|
831
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_properties ...' if @api_client.config.debugging
|
|
832
|
+
# verify the required parameter 'drawing_data' is set
|
|
833
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.post_drawing_properties' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
834
|
+
# resource path
|
|
835
|
+
local_var_path = '/cad/properties'
|
|
836
|
+
|
|
837
|
+
# query parameters
|
|
838
|
+
query_params = {}
|
|
839
|
+
|
|
840
|
+
# header parameters
|
|
841
|
+
header_params = {}
|
|
842
|
+
# HTTP header 'Accept' (if needed)
|
|
843
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
844
|
+
# HTTP header 'Content-Type'
|
|
845
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
846
|
+
|
|
847
|
+
# form parameters
|
|
848
|
+
form_params = {}
|
|
849
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
850
|
+
|
|
851
|
+
if not form_params.empty?
|
|
852
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
# http body (model)
|
|
856
|
+
post_body = nil
|
|
857
|
+
auth_names = ['JWT']
|
|
858
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
859
|
+
header_params: header_params,
|
|
860
|
+
query_params: query_params,
|
|
861
|
+
form_params: form_params,
|
|
862
|
+
body: post_body,
|
|
863
|
+
auth_names: auth_names,
|
|
864
|
+
return_type: 'CadResponse')
|
|
865
|
+
if @api_client.config.debugging
|
|
866
|
+
@api_client.config.logger.debug "API called:
|
|
867
|
+
CadApi#post_drawing_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
868
|
+
end
|
|
869
|
+
[data, status_code, headers]
|
|
870
|
+
end
|
|
871
|
+
|
|
872
|
+
# Export an existing drawing into PSD format with export settings specified.
|
|
873
|
+
#
|
|
874
|
+
# @param request PostDrawingPsdRequest
|
|
875
|
+
# @return [File]
|
|
876
|
+
def post_drawing_psd(request)
|
|
877
|
+
data, _status_code, _headers = post_drawing_psd_with_http_info(request)
|
|
878
|
+
request_token if _status_code == 401
|
|
879
|
+
data
|
|
880
|
+
end
|
|
881
|
+
|
|
882
|
+
# Export an existing drawing into PSD format with export settings specified.
|
|
883
|
+
#
|
|
884
|
+
# @param request PostDrawingPsdRequest
|
|
885
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
886
|
+
# File data, response status code and response headers
|
|
887
|
+
def post_drawing_psd_with_http_info(request)
|
|
888
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingPsdRequest
|
|
889
|
+
|
|
890
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_psd ...' if @api_client.config.debugging
|
|
891
|
+
# verify the required parameter 'name' is set
|
|
892
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_psd' if @api_client.config.client_side_validation && request.name.nil?
|
|
893
|
+
# verify the required parameter 'options' is set
|
|
894
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_psd' if @api_client.config.client_side_validation && request.options.nil?
|
|
895
|
+
# resource path
|
|
896
|
+
local_var_path = '/cad/{name}/psd'
|
|
897
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
898
|
+
|
|
899
|
+
# query parameters
|
|
900
|
+
query_params = {}
|
|
901
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
902
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
903
|
+
else
|
|
904
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
905
|
+
end
|
|
906
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
907
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
908
|
+
else
|
|
909
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
910
|
+
end
|
|
911
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
912
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
913
|
+
else
|
|
914
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
# header parameters
|
|
918
|
+
header_params = {}
|
|
919
|
+
# HTTP header 'Accept' (if needed)
|
|
920
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
921
|
+
# HTTP header 'Content-Type'
|
|
922
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
923
|
+
|
|
924
|
+
# form parameters
|
|
925
|
+
form_params = {}
|
|
926
|
+
|
|
927
|
+
if not form_params.empty?
|
|
928
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
# http body (model)
|
|
932
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
933
|
+
auth_names = ['JWT']
|
|
934
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
935
|
+
header_params: header_params,
|
|
936
|
+
query_params: query_params,
|
|
937
|
+
form_params: form_params,
|
|
938
|
+
body: post_body,
|
|
939
|
+
auth_names: auth_names,
|
|
940
|
+
return_type: 'File')
|
|
941
|
+
if @api_client.config.debugging
|
|
942
|
+
@api_client.config.logger.debug "API called:
|
|
943
|
+
CadApi#post_drawing_psd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
944
|
+
end
|
|
945
|
+
[data, status_code, headers]
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
# Resize a drawing. Drawing data is passed as a zero-indexed multipart/form-data content or as raw body stream.
|
|
949
|
+
#
|
|
950
|
+
# @param request PostDrawingResizeRequest
|
|
951
|
+
# @return [File]
|
|
952
|
+
def post_drawing_resize(request)
|
|
953
|
+
data, _status_code, _headers = post_drawing_resize_with_http_info(request)
|
|
954
|
+
request_token if _status_code == 401
|
|
955
|
+
data
|
|
956
|
+
end
|
|
957
|
+
|
|
958
|
+
# Resize a drawing. Drawing data is passed as a zero-indexed multipart/form-data content or as raw body stream.
|
|
959
|
+
#
|
|
960
|
+
# @param request PostDrawingResizeRequest
|
|
961
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
962
|
+
# File data, response status code and response headers
|
|
963
|
+
def post_drawing_resize_with_http_info(request)
|
|
964
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingResizeRequest
|
|
965
|
+
|
|
966
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_resize ...' if @api_client.config.debugging
|
|
967
|
+
# verify the required parameter 'drawing_data' is set
|
|
968
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.post_drawing_resize' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
969
|
+
# verify the required parameter 'output_format' is set
|
|
970
|
+
raise ArgumentError, 'Missing the required parameter output_format when calling CadApi.post_drawing_resize' if @api_client.config.client_side_validation && request.output_format.nil?
|
|
971
|
+
# verify the required parameter 'new_width' is set
|
|
972
|
+
raise ArgumentError, 'Missing the required parameter new_width when calling CadApi.post_drawing_resize' if @api_client.config.client_side_validation && request.new_width.nil?
|
|
973
|
+
# verify the required parameter 'new_height' is set
|
|
974
|
+
raise ArgumentError, 'Missing the required parameter new_height when calling CadApi.post_drawing_resize' if @api_client.config.client_side_validation && request.new_height.nil?
|
|
975
|
+
# resource path
|
|
976
|
+
local_var_path = '/cad/resize'
|
|
977
|
+
|
|
978
|
+
# query parameters
|
|
979
|
+
query_params = {}
|
|
980
|
+
query_params[downcase_first_letter('outputFormat')] = request.output_format
|
|
981
|
+
query_params[downcase_first_letter('newWidth')] = request.new_width
|
|
982
|
+
query_params[downcase_first_letter('newHeight')] = request.new_height
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
987
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
988
|
+
else
|
|
989
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
990
|
+
end
|
|
991
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
992
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
993
|
+
else
|
|
994
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
995
|
+
end
|
|
996
|
+
|
|
997
|
+
# header parameters
|
|
998
|
+
header_params = {}
|
|
999
|
+
# HTTP header 'Accept' (if needed)
|
|
1000
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1001
|
+
# HTTP header 'Content-Type'
|
|
1002
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'multipart/form-data'])
|
|
1003
|
+
|
|
1004
|
+
# form parameters
|
|
1005
|
+
form_params = {}
|
|
1006
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1007
|
+
|
|
1008
|
+
if not form_params.empty?
|
|
1009
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
# http body (model)
|
|
1013
|
+
post_body = nil
|
|
1014
|
+
auth_names = ['JWT']
|
|
1015
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1016
|
+
header_params: header_params,
|
|
1017
|
+
query_params: query_params,
|
|
1018
|
+
form_params: form_params,
|
|
1019
|
+
body: post_body,
|
|
1020
|
+
auth_names: auth_names,
|
|
1021
|
+
return_type: 'File')
|
|
1022
|
+
if @api_client.config.debugging
|
|
1023
|
+
@api_client.config.logger.debug "API called:
|
|
1024
|
+
CadApi#post_drawing_resize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1025
|
+
end
|
|
1026
|
+
[data, status_code, headers]
|
|
1027
|
+
end
|
|
1028
|
+
|
|
1029
|
+
# Rotate/flip a drawing. Drawing data is passed as a zero-indexed multipart/form-data content or as raw body stream.
|
|
1030
|
+
#
|
|
1031
|
+
# @param request PostDrawingRotateFlipRequest
|
|
1032
|
+
# @return [File]
|
|
1033
|
+
def post_drawing_rotate_flip(request)
|
|
1034
|
+
data, _status_code, _headers = post_drawing_rotate_flip_with_http_info(request)
|
|
1035
|
+
request_token if _status_code == 401
|
|
1036
|
+
data
|
|
1037
|
+
end
|
|
1038
|
+
|
|
1039
|
+
# Rotate/flip a drawing. Drawing data is passed as a zero-indexed multipart/form-data content or as raw body stream.
|
|
1040
|
+
#
|
|
1041
|
+
# @param request PostDrawingRotateFlipRequest
|
|
1042
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1043
|
+
# File data, response status code and response headers
|
|
1044
|
+
def post_drawing_rotate_flip_with_http_info(request)
|
|
1045
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingRotateFlipRequest
|
|
1046
|
+
|
|
1047
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_rotate_flip ...' if @api_client.config.debugging
|
|
1048
|
+
# verify the required parameter 'drawing_data' is set
|
|
1049
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.post_drawing_rotate_flip' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1050
|
+
# verify the required parameter 'output_format' is set
|
|
1051
|
+
raise ArgumentError, 'Missing the required parameter output_format when calling CadApi.post_drawing_rotate_flip' if @api_client.config.client_side_validation && request.output_format.nil?
|
|
1052
|
+
# verify the required parameter 'rotate_flip_type' is set
|
|
1053
|
+
raise ArgumentError, 'Missing the required parameter rotate_flip_type when calling CadApi.post_drawing_rotate_flip' if @api_client.config.client_side_validation && request.rotate_flip_type.nil?
|
|
1054
|
+
# verify enum value
|
|
1055
|
+
raise ArgumentError, 'invalid value for rotate_flip_type, must be one of RotateNoneFlipNone, Rotate90FlipNone, Rotate180FlipNone, Rotate270FlipNone, RotateNoneFlipX, Rotate90FlipX, Rotate180FlipX, Rotate270FlipX, RotateNoneFlipY, Rotate90FlipY, Rotate180FlipY, Rotate270FlipY, RotateNoneFlipXY, Rotate90FlipXY, Rotate180FlipXY, Rotate270FlipXY' if @api_client.config.client_side_validation && !['RotateNoneFlipNone', 'Rotate90FlipNone', 'Rotate180FlipNone', 'Rotate270FlipNone', 'RotateNoneFlipX', 'Rotate90FlipX', 'Rotate180FlipX', 'Rotate270FlipX', 'RotateNoneFlipY', 'Rotate90FlipY', 'Rotate180FlipY', 'Rotate270FlipY', 'RotateNoneFlipXY', 'Rotate90FlipXY', 'Rotate180FlipXY', 'Rotate270FlipXY'].include?(request.rotate_flip_type)
|
|
1056
|
+
# resource path
|
|
1057
|
+
local_var_path = '/cad/rotateflip'
|
|
1058
|
+
|
|
1059
|
+
# query parameters
|
|
1060
|
+
query_params = {}
|
|
1061
|
+
query_params[downcase_first_letter('outputFormat')] = request.output_format
|
|
1062
|
+
query_params[downcase_first_letter('rotateFlipType')] = request.rotate_flip_type
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1066
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1067
|
+
else
|
|
1068
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1069
|
+
end
|
|
1070
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1071
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1072
|
+
else
|
|
1073
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1074
|
+
end
|
|
1075
|
+
|
|
1076
|
+
# header parameters
|
|
1077
|
+
header_params = {}
|
|
1078
|
+
# HTTP header 'Accept' (if needed)
|
|
1079
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1080
|
+
# HTTP header 'Content-Type'
|
|
1081
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'multipart/form-data'])
|
|
1082
|
+
|
|
1083
|
+
# form parameters
|
|
1084
|
+
form_params = {}
|
|
1085
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1086
|
+
|
|
1087
|
+
if not form_params.empty?
|
|
1088
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1089
|
+
end
|
|
1090
|
+
|
|
1091
|
+
# http body (model)
|
|
1092
|
+
post_body = nil
|
|
1093
|
+
auth_names = ['JWT']
|
|
1094
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1095
|
+
header_params: header_params,
|
|
1096
|
+
query_params: query_params,
|
|
1097
|
+
form_params: form_params,
|
|
1098
|
+
body: post_body,
|
|
1099
|
+
auth_names: auth_names,
|
|
1100
|
+
return_type: 'File')
|
|
1101
|
+
if @api_client.config.debugging
|
|
1102
|
+
@api_client.config.logger.debug "API called:
|
|
1103
|
+
CadApi#post_drawing_rotate_flip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1104
|
+
end
|
|
1105
|
+
[data, status_code, headers]
|
|
1106
|
+
end
|
|
1107
|
+
|
|
1108
|
+
# Export existing drawing to another format. Drawing data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
|
1109
|
+
#
|
|
1110
|
+
# @param request PostDrawingSaveAsRequest
|
|
1111
|
+
# @return [File]
|
|
1112
|
+
def post_drawing_save_as(request)
|
|
1113
|
+
data, _status_code, _headers = post_drawing_save_as_with_http_info(request)
|
|
1114
|
+
request_token if _status_code == 401
|
|
1115
|
+
data
|
|
1116
|
+
end
|
|
1117
|
+
|
|
1118
|
+
# Export existing drawing to another format. Drawing data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
|
1119
|
+
#
|
|
1120
|
+
# @param request PostDrawingSaveAsRequest
|
|
1121
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1122
|
+
# File data, response status code and response headers
|
|
1123
|
+
def post_drawing_save_as_with_http_info(request)
|
|
1124
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingSaveAsRequest
|
|
1125
|
+
|
|
1126
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_save_as ...' if @api_client.config.debugging
|
|
1127
|
+
# verify the required parameter 'drawing_data' is set
|
|
1128
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.post_drawing_save_as' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1129
|
+
# verify the required parameter 'output_format' is set
|
|
1130
|
+
raise ArgumentError, 'Missing the required parameter output_format when calling CadApi.post_drawing_save_as' if @api_client.config.client_side_validation && request.output_format.nil?
|
|
1131
|
+
# resource path
|
|
1132
|
+
local_var_path = '/cad/saveAs/{outputFormat}'
|
|
1133
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outputFormat') + '}', request.output_format.to_s)
|
|
1134
|
+
|
|
1135
|
+
# query parameters
|
|
1136
|
+
query_params = {}
|
|
1137
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1138
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1139
|
+
else
|
|
1140
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1141
|
+
end
|
|
1142
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1143
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1144
|
+
else
|
|
1145
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
# header parameters
|
|
1149
|
+
header_params = {}
|
|
1150
|
+
# HTTP header 'Accept' (if needed)
|
|
1151
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1152
|
+
# HTTP header 'Content-Type'
|
|
1153
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'multipart/form-data'])
|
|
1154
|
+
|
|
1155
|
+
# form parameters
|
|
1156
|
+
form_params = {}
|
|
1157
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1158
|
+
|
|
1159
|
+
if not form_params.empty?
|
|
1160
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1161
|
+
end
|
|
1162
|
+
|
|
1163
|
+
# http body (model)
|
|
1164
|
+
post_body = nil
|
|
1165
|
+
auth_names = ['JWT']
|
|
1166
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1167
|
+
header_params: header_params,
|
|
1168
|
+
query_params: query_params,
|
|
1169
|
+
form_params: form_params,
|
|
1170
|
+
body: post_body,
|
|
1171
|
+
auth_names: auth_names,
|
|
1172
|
+
return_type: 'File')
|
|
1173
|
+
if @api_client.config.debugging
|
|
1174
|
+
@api_client.config.logger.debug "API called:
|
|
1175
|
+
CadApi#post_drawing_save_as\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1176
|
+
end
|
|
1177
|
+
[data, status_code, headers]
|
|
1178
|
+
end
|
|
1179
|
+
|
|
1180
|
+
# Export an existing drawing to SVG format with export settings specified.
|
|
1181
|
+
#
|
|
1182
|
+
# @param request PostDrawingSvgRequest
|
|
1183
|
+
# @return [File]
|
|
1184
|
+
def post_drawing_svg(request)
|
|
1185
|
+
data, _status_code, _headers = post_drawing_svg_with_http_info(request)
|
|
1186
|
+
request_token if _status_code == 401
|
|
1187
|
+
data
|
|
1188
|
+
end
|
|
1189
|
+
|
|
1190
|
+
# Export an existing drawing to SVG format with export settings specified.
|
|
1191
|
+
#
|
|
1192
|
+
# @param request PostDrawingSvgRequest
|
|
1193
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1194
|
+
# File data, response status code and response headers
|
|
1195
|
+
def post_drawing_svg_with_http_info(request)
|
|
1196
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingSvgRequest
|
|
1197
|
+
|
|
1198
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_svg ...' if @api_client.config.debugging
|
|
1199
|
+
# verify the required parameter 'name' is set
|
|
1200
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_svg' if @api_client.config.client_side_validation && request.name.nil?
|
|
1201
|
+
# verify the required parameter 'options' is set
|
|
1202
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_svg' if @api_client.config.client_side_validation && request.options.nil?
|
|
1203
|
+
# resource path
|
|
1204
|
+
local_var_path = '/cad/{name}/svg'
|
|
1205
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
1206
|
+
|
|
1207
|
+
# query parameters
|
|
1208
|
+
query_params = {}
|
|
1209
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
1210
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
1211
|
+
else
|
|
1212
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
1213
|
+
end
|
|
1214
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1215
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1216
|
+
else
|
|
1217
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1218
|
+
end
|
|
1219
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1220
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1221
|
+
else
|
|
1222
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1223
|
+
end
|
|
1224
|
+
|
|
1225
|
+
# header parameters
|
|
1226
|
+
header_params = {}
|
|
1227
|
+
# HTTP header 'Accept' (if needed)
|
|
1228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1229
|
+
# HTTP header 'Content-Type'
|
|
1230
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1231
|
+
|
|
1232
|
+
# form parameters
|
|
1233
|
+
form_params = {}
|
|
1234
|
+
|
|
1235
|
+
if not form_params.empty?
|
|
1236
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1237
|
+
end
|
|
1238
|
+
|
|
1239
|
+
# http body (model)
|
|
1240
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
1241
|
+
auth_names = ['JWT']
|
|
1242
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1243
|
+
header_params: header_params,
|
|
1244
|
+
query_params: query_params,
|
|
1245
|
+
form_params: form_params,
|
|
1246
|
+
body: post_body,
|
|
1247
|
+
auth_names: auth_names,
|
|
1248
|
+
return_type: 'File')
|
|
1249
|
+
if @api_client.config.debugging
|
|
1250
|
+
@api_client.config.logger.debug "API called:
|
|
1251
|
+
CadApi#post_drawing_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1252
|
+
end
|
|
1253
|
+
[data, status_code, headers]
|
|
1254
|
+
end
|
|
1255
|
+
|
|
1256
|
+
# Export an existing drawing into TIFF format with export settings specified.
|
|
1257
|
+
#
|
|
1258
|
+
# @param request PostDrawingTiffRequest
|
|
1259
|
+
# @return [File]
|
|
1260
|
+
def post_drawing_tiff(request)
|
|
1261
|
+
data, _status_code, _headers = post_drawing_tiff_with_http_info(request)
|
|
1262
|
+
request_token if _status_code == 401
|
|
1263
|
+
data
|
|
1264
|
+
end
|
|
1265
|
+
|
|
1266
|
+
# Export an existing drawing into TIFF format with export settings specified.
|
|
1267
|
+
#
|
|
1268
|
+
# @param request PostDrawingTiffRequest
|
|
1269
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1270
|
+
# File data, response status code and response headers
|
|
1271
|
+
def post_drawing_tiff_with_http_info(request)
|
|
1272
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingTiffRequest
|
|
1273
|
+
|
|
1274
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_tiff ...' if @api_client.config.debugging
|
|
1275
|
+
# verify the required parameter 'name' is set
|
|
1276
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_tiff' if @api_client.config.client_side_validation && request.name.nil?
|
|
1277
|
+
# verify the required parameter 'options' is set
|
|
1278
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_tiff' if @api_client.config.client_side_validation && request.options.nil?
|
|
1279
|
+
# resource path
|
|
1280
|
+
local_var_path = '/cad/{name}/tiff'
|
|
1281
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
1282
|
+
|
|
1283
|
+
# query parameters
|
|
1284
|
+
query_params = {}
|
|
1285
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
1286
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
1287
|
+
else
|
|
1288
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
1289
|
+
end
|
|
1290
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1291
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1292
|
+
else
|
|
1293
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1294
|
+
end
|
|
1295
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1296
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1297
|
+
else
|
|
1298
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1299
|
+
end
|
|
1300
|
+
|
|
1301
|
+
# header parameters
|
|
1302
|
+
header_params = {}
|
|
1303
|
+
# HTTP header 'Accept' (if needed)
|
|
1304
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1305
|
+
# HTTP header 'Content-Type'
|
|
1306
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1307
|
+
|
|
1308
|
+
# form parameters
|
|
1309
|
+
form_params = {}
|
|
1310
|
+
|
|
1311
|
+
if not form_params.empty?
|
|
1312
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1313
|
+
end
|
|
1314
|
+
|
|
1315
|
+
# http body (model)
|
|
1316
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
1317
|
+
auth_names = ['JWT']
|
|
1318
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1319
|
+
header_params: header_params,
|
|
1320
|
+
query_params: query_params,
|
|
1321
|
+
form_params: form_params,
|
|
1322
|
+
body: post_body,
|
|
1323
|
+
auth_names: auth_names,
|
|
1324
|
+
return_type: 'File')
|
|
1325
|
+
if @api_client.config.debugging
|
|
1326
|
+
@api_client.config.logger.debug "API called:
|
|
1327
|
+
CadApi#post_drawing_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1328
|
+
end
|
|
1329
|
+
[data, status_code, headers]
|
|
1330
|
+
end
|
|
1331
|
+
|
|
1332
|
+
# Export an existing drawing to WMF format with export settings specified.
|
|
1333
|
+
#
|
|
1334
|
+
# @param request PostDrawingWmfRequest
|
|
1335
|
+
# @return [File]
|
|
1336
|
+
def post_drawing_wmf(request)
|
|
1337
|
+
data, _status_code, _headers = post_drawing_wmf_with_http_info(request)
|
|
1338
|
+
request_token if _status_code == 401
|
|
1339
|
+
data
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
# Export an existing drawing to WMF format with export settings specified.
|
|
1343
|
+
#
|
|
1344
|
+
# @param request PostDrawingWmfRequest
|
|
1345
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1346
|
+
# File data, response status code and response headers
|
|
1347
|
+
def post_drawing_wmf_with_http_info(request)
|
|
1348
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PostDrawingWmfRequest
|
|
1349
|
+
|
|
1350
|
+
@api_client.config.logger.debug 'Calling API: CadApi.post_drawing_wmf ...' if @api_client.config.debugging
|
|
1351
|
+
# verify the required parameter 'name' is set
|
|
1352
|
+
raise ArgumentError, 'Missing the required parameter name when calling CadApi.post_drawing_wmf' if @api_client.config.client_side_validation && request.name.nil?
|
|
1353
|
+
# verify the required parameter 'options' is set
|
|
1354
|
+
raise ArgumentError, 'Missing the required parameter options when calling CadApi.post_drawing_wmf' if @api_client.config.client_side_validation && request.options.nil?
|
|
1355
|
+
# resource path
|
|
1356
|
+
local_var_path = '/cad/{name}/wmf'
|
|
1357
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('name') + '}', request.name.to_s)
|
|
1358
|
+
|
|
1359
|
+
# query parameters
|
|
1360
|
+
query_params = {}
|
|
1361
|
+
if local_var_path.include? downcase_first_letter('folder')
|
|
1362
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('folder') + '}', request.folder.to_s)
|
|
1363
|
+
else
|
|
1364
|
+
query_params[downcase_first_letter('folder')] = request.folder unless request.folder.nil?
|
|
1365
|
+
end
|
|
1366
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1367
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1368
|
+
else
|
|
1369
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1370
|
+
end
|
|
1371
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1372
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1373
|
+
else
|
|
1374
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1375
|
+
end
|
|
1376
|
+
|
|
1377
|
+
# header parameters
|
|
1378
|
+
header_params = {}
|
|
1379
|
+
# HTTP header 'Accept' (if needed)
|
|
1380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1381
|
+
# HTTP header 'Content-Type'
|
|
1382
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1383
|
+
|
|
1384
|
+
# form parameters
|
|
1385
|
+
form_params = {}
|
|
1386
|
+
|
|
1387
|
+
if not form_params.empty?
|
|
1388
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1389
|
+
end
|
|
1390
|
+
|
|
1391
|
+
# http body (model)
|
|
1392
|
+
post_body = @api_client.object_to_http_body(request.options)
|
|
1393
|
+
auth_names = ['JWT']
|
|
1394
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1395
|
+
header_params: header_params,
|
|
1396
|
+
query_params: query_params,
|
|
1397
|
+
form_params: form_params,
|
|
1398
|
+
body: post_body,
|
|
1399
|
+
auth_names: auth_names,
|
|
1400
|
+
return_type: 'File')
|
|
1401
|
+
if @api_client.config.debugging
|
|
1402
|
+
@api_client.config.logger.debug "API called:
|
|
1403
|
+
CadApi#post_drawing_wmf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1404
|
+
end
|
|
1405
|
+
[data, status_code, headers]
|
|
1406
|
+
end
|
|
1407
|
+
|
|
1408
|
+
# Export drawing to BMP format. Drawing data is passed as zero-indexed multipart/form-data as well as export BMP options serialized as JSON. Order of drawing data and BMP options could vary.
|
|
1409
|
+
#
|
|
1410
|
+
# @param request PutDrawingBmpRequest
|
|
1411
|
+
# @return [File]
|
|
1412
|
+
def put_drawing_bmp(request)
|
|
1413
|
+
data, _status_code, _headers = put_drawing_bmp_with_http_info(request)
|
|
1414
|
+
request_token if _status_code == 401
|
|
1415
|
+
data
|
|
1416
|
+
end
|
|
1417
|
+
|
|
1418
|
+
# Export drawing to BMP format. Drawing data is passed as zero-indexed multipart/form-data as well as export BMP options serialized as JSON. Order of drawing data and BMP options could vary.
|
|
1419
|
+
#
|
|
1420
|
+
# @param request PutDrawingBmpRequest
|
|
1421
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1422
|
+
# File data, response status code and response headers
|
|
1423
|
+
def put_drawing_bmp_with_http_info(request)
|
|
1424
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingBmpRequest
|
|
1425
|
+
|
|
1426
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_bmp ...' if @api_client.config.debugging
|
|
1427
|
+
# verify the required parameter 'drawing_data' is set
|
|
1428
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_bmp' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1429
|
+
# resource path
|
|
1430
|
+
local_var_path = '/cad/bmp'
|
|
1431
|
+
|
|
1432
|
+
# query parameters
|
|
1433
|
+
query_params = {}
|
|
1434
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1435
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1436
|
+
else
|
|
1437
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1438
|
+
end
|
|
1439
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1440
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1441
|
+
else
|
|
1442
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1443
|
+
end
|
|
1444
|
+
|
|
1445
|
+
# header parameters
|
|
1446
|
+
header_params = {}
|
|
1447
|
+
# HTTP header 'Accept' (if needed)
|
|
1448
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1449
|
+
# HTTP header 'Content-Type'
|
|
1450
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream', 'multipart/form-data'])
|
|
1451
|
+
|
|
1452
|
+
# form parameters
|
|
1453
|
+
form_params = {}
|
|
1454
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1455
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1456
|
+
|
|
1457
|
+
if not form_params.empty?
|
|
1458
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1459
|
+
end
|
|
1460
|
+
|
|
1461
|
+
# http body (model)
|
|
1462
|
+
post_body = nil
|
|
1463
|
+
auth_names = ['JWT']
|
|
1464
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1465
|
+
header_params: header_params,
|
|
1466
|
+
query_params: query_params,
|
|
1467
|
+
form_params: form_params,
|
|
1468
|
+
body: post_body,
|
|
1469
|
+
auth_names: auth_names,
|
|
1470
|
+
return_type: 'File')
|
|
1471
|
+
if @api_client.config.debugging
|
|
1472
|
+
@api_client.config.logger.debug "API called:
|
|
1473
|
+
CadApi#put_drawing_bmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1474
|
+
end
|
|
1475
|
+
[data, status_code, headers]
|
|
1476
|
+
end
|
|
1477
|
+
|
|
1478
|
+
# Export drawing to GIF format. Drawing data is passed as zero-indexed multipart/form-data as well as export GIF options serialized as JSON. Order of drawing data and GIF options could vary.
|
|
1479
|
+
#
|
|
1480
|
+
# @param request PutDrawingGifRequest
|
|
1481
|
+
# @return [File]
|
|
1482
|
+
def put_drawing_gif(request)
|
|
1483
|
+
data, _status_code, _headers = put_drawing_gif_with_http_info(request)
|
|
1484
|
+
request_token if _status_code == 401
|
|
1485
|
+
data
|
|
1486
|
+
end
|
|
1487
|
+
|
|
1488
|
+
# Export drawing to GIF format. Drawing data is passed as zero-indexed multipart/form-data as well as export GIF options serialized as JSON. Order of drawing data and GIF options could vary.
|
|
1489
|
+
#
|
|
1490
|
+
# @param request PutDrawingGifRequest
|
|
1491
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1492
|
+
# File data, response status code and response headers
|
|
1493
|
+
def put_drawing_gif_with_http_info(request)
|
|
1494
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingGifRequest
|
|
1495
|
+
|
|
1496
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_gif ...' if @api_client.config.debugging
|
|
1497
|
+
# verify the required parameter 'drawing_data' is set
|
|
1498
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_gif' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1499
|
+
# resource path
|
|
1500
|
+
local_var_path = '/cad/gif'
|
|
1501
|
+
|
|
1502
|
+
# query parameters
|
|
1503
|
+
query_params = {}
|
|
1504
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1505
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1506
|
+
else
|
|
1507
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1508
|
+
end
|
|
1509
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1510
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1511
|
+
else
|
|
1512
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1513
|
+
end
|
|
1514
|
+
|
|
1515
|
+
# header parameters
|
|
1516
|
+
header_params = {}
|
|
1517
|
+
# HTTP header 'Accept' (if needed)
|
|
1518
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1519
|
+
# HTTP header 'Content-Type'
|
|
1520
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1521
|
+
|
|
1522
|
+
# form parameters
|
|
1523
|
+
form_params = {}
|
|
1524
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1525
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1526
|
+
|
|
1527
|
+
if not form_params.empty?
|
|
1528
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1529
|
+
end
|
|
1530
|
+
|
|
1531
|
+
# http body (model)
|
|
1532
|
+
post_body = nil
|
|
1533
|
+
auth_names = ['JWT']
|
|
1534
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1535
|
+
header_params: header_params,
|
|
1536
|
+
query_params: query_params,
|
|
1537
|
+
form_params: form_params,
|
|
1538
|
+
body: post_body,
|
|
1539
|
+
auth_names: auth_names,
|
|
1540
|
+
return_type: 'File')
|
|
1541
|
+
if @api_client.config.debugging
|
|
1542
|
+
@api_client.config.logger.debug "API called:
|
|
1543
|
+
CadApi#put_drawing_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1544
|
+
end
|
|
1545
|
+
[data, status_code, headers]
|
|
1546
|
+
end
|
|
1547
|
+
|
|
1548
|
+
# Export drawing to JPEG format. Drawing data is passed as zero-indexed multipart/form-data as well as export JPEG options serialized as JSON. Order of drawing data and JPEG options could vary.
|
|
1549
|
+
#
|
|
1550
|
+
# @param request PutDrawingJpegRequest
|
|
1551
|
+
# @return [File]
|
|
1552
|
+
def put_drawing_jpeg(request)
|
|
1553
|
+
data, _status_code, _headers = put_drawing_jpeg_with_http_info(request)
|
|
1554
|
+
request_token if _status_code == 401
|
|
1555
|
+
data
|
|
1556
|
+
end
|
|
1557
|
+
|
|
1558
|
+
# Export drawing to JPEG format. Drawing data is passed as zero-indexed multipart/form-data as well as export JPEG options serialized as JSON. Order of drawing data and JPEG options could vary.
|
|
1559
|
+
#
|
|
1560
|
+
# @param request PutDrawingJpegRequest
|
|
1561
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1562
|
+
# File data, response status code and response headers
|
|
1563
|
+
def put_drawing_jpeg_with_http_info(request)
|
|
1564
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingJpegRequest
|
|
1565
|
+
|
|
1566
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_jpeg ...' if @api_client.config.debugging
|
|
1567
|
+
# verify the required parameter 'drawing_data' is set
|
|
1568
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_jpeg' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1569
|
+
# resource path
|
|
1570
|
+
local_var_path = '/cad/jpeg'
|
|
1571
|
+
|
|
1572
|
+
# query parameters
|
|
1573
|
+
query_params = {}
|
|
1574
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1575
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1576
|
+
else
|
|
1577
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1578
|
+
end
|
|
1579
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1580
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1581
|
+
else
|
|
1582
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1583
|
+
end
|
|
1584
|
+
|
|
1585
|
+
# header parameters
|
|
1586
|
+
header_params = {}
|
|
1587
|
+
# HTTP header 'Accept' (if needed)
|
|
1588
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1589
|
+
# HTTP header 'Content-Type'
|
|
1590
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1591
|
+
|
|
1592
|
+
# form parameters
|
|
1593
|
+
form_params = {}
|
|
1594
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1595
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1596
|
+
|
|
1597
|
+
if not form_params.empty?
|
|
1598
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1599
|
+
end
|
|
1600
|
+
|
|
1601
|
+
# http body (model)
|
|
1602
|
+
post_body = nil
|
|
1603
|
+
auth_names = ['JWT']
|
|
1604
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1605
|
+
header_params: header_params,
|
|
1606
|
+
query_params: query_params,
|
|
1607
|
+
form_params: form_params,
|
|
1608
|
+
body: post_body,
|
|
1609
|
+
auth_names: auth_names,
|
|
1610
|
+
return_type: 'File')
|
|
1611
|
+
if @api_client.config.debugging
|
|
1612
|
+
@api_client.config.logger.debug "API called:
|
|
1613
|
+
CadApi#put_drawing_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1614
|
+
end
|
|
1615
|
+
[data, status_code, headers]
|
|
1616
|
+
end
|
|
1617
|
+
|
|
1618
|
+
# Export drawing to JPEG2000 format. Drawing data is passed as zero-indexed multipart/form-data as well as export JPEG2000 options serialized as JSON. Order of drawing data and JPEG2000 options could vary.
|
|
1619
|
+
#
|
|
1620
|
+
# @param request PutDrawingJpeg2000Request
|
|
1621
|
+
# @return [File]
|
|
1622
|
+
def put_drawing_jpeg2000(request)
|
|
1623
|
+
data, _status_code, _headers = put_drawing_jpeg2000_with_http_info(request)
|
|
1624
|
+
request_token if _status_code == 401
|
|
1625
|
+
data
|
|
1626
|
+
end
|
|
1627
|
+
|
|
1628
|
+
# Export drawing to JPEG2000 format. Drawing data is passed as zero-indexed multipart/form-data as well as export JPEG2000 options serialized as JSON. Order of drawing data and JPEG2000 options could vary.
|
|
1629
|
+
#
|
|
1630
|
+
# @param request PutDrawingJpeg2000Request
|
|
1631
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1632
|
+
# File data, response status code and response headers
|
|
1633
|
+
def put_drawing_jpeg2000_with_http_info(request)
|
|
1634
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingJpeg2000Request
|
|
1635
|
+
|
|
1636
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_jpeg2000 ...' if @api_client.config.debugging
|
|
1637
|
+
# verify the required parameter 'drawing_data' is set
|
|
1638
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_jpeg2000' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1639
|
+
# resource path
|
|
1640
|
+
local_var_path = '/cad/jpeg2000'
|
|
1641
|
+
|
|
1642
|
+
# query parameters
|
|
1643
|
+
query_params = {}
|
|
1644
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1645
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1646
|
+
else
|
|
1647
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1648
|
+
end
|
|
1649
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1650
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1651
|
+
else
|
|
1652
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1653
|
+
end
|
|
1654
|
+
|
|
1655
|
+
# header parameters
|
|
1656
|
+
header_params = {}
|
|
1657
|
+
# HTTP header 'Accept' (if needed)
|
|
1658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1659
|
+
# HTTP header 'Content-Type'
|
|
1660
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1661
|
+
|
|
1662
|
+
# form parameters
|
|
1663
|
+
form_params = {}
|
|
1664
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1665
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1666
|
+
|
|
1667
|
+
if not form_params.empty?
|
|
1668
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1669
|
+
end
|
|
1670
|
+
|
|
1671
|
+
# http body (model)
|
|
1672
|
+
post_body = nil
|
|
1673
|
+
auth_names = ['JWT']
|
|
1674
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1675
|
+
header_params: header_params,
|
|
1676
|
+
query_params: query_params,
|
|
1677
|
+
form_params: form_params,
|
|
1678
|
+
body: post_body,
|
|
1679
|
+
auth_names: auth_names,
|
|
1680
|
+
return_type: 'File')
|
|
1681
|
+
if @api_client.config.debugging
|
|
1682
|
+
@api_client.config.logger.debug "API called:
|
|
1683
|
+
CadApi#put_drawing_jpeg2000\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1684
|
+
end
|
|
1685
|
+
[data, status_code, headers]
|
|
1686
|
+
end
|
|
1687
|
+
|
|
1688
|
+
# Export drawing to PDF format. Drawing data is passed as zero-indexed multipart/form-data as well as export PDF options serialized as JSON. Order of drawing data and PDF options could vary.
|
|
1689
|
+
#
|
|
1690
|
+
# @param request PutDrawingPdfRequest
|
|
1691
|
+
# @return [File]
|
|
1692
|
+
def put_drawing_pdf(request)
|
|
1693
|
+
data, _status_code, _headers = put_drawing_pdf_with_http_info(request)
|
|
1694
|
+
request_token if _status_code == 401
|
|
1695
|
+
data
|
|
1696
|
+
end
|
|
1697
|
+
|
|
1698
|
+
# Export drawing to PDF format. Drawing data is passed as zero-indexed multipart/form-data as well as export PDF options serialized as JSON. Order of drawing data and PDF options could vary.
|
|
1699
|
+
#
|
|
1700
|
+
# @param request PutDrawingPdfRequest
|
|
1701
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1702
|
+
# File data, response status code and response headers
|
|
1703
|
+
def put_drawing_pdf_with_http_info(request)
|
|
1704
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingPdfRequest
|
|
1705
|
+
|
|
1706
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_pdf ...' if @api_client.config.debugging
|
|
1707
|
+
# verify the required parameter 'drawing_data' is set
|
|
1708
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_pdf' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1709
|
+
# resource path
|
|
1710
|
+
local_var_path = '/cad/pdf'
|
|
1711
|
+
|
|
1712
|
+
# query parameters
|
|
1713
|
+
query_params = {}
|
|
1714
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1715
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1716
|
+
else
|
|
1717
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1718
|
+
end
|
|
1719
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1720
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1721
|
+
else
|
|
1722
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1723
|
+
end
|
|
1724
|
+
|
|
1725
|
+
# header parameters
|
|
1726
|
+
header_params = {}
|
|
1727
|
+
# HTTP header 'Accept' (if needed)
|
|
1728
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1729
|
+
# HTTP header 'Content-Type'
|
|
1730
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1731
|
+
|
|
1732
|
+
# form parameters
|
|
1733
|
+
form_params = {}
|
|
1734
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1735
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1736
|
+
|
|
1737
|
+
if not form_params.empty?
|
|
1738
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1739
|
+
end
|
|
1740
|
+
|
|
1741
|
+
# http body (model)
|
|
1742
|
+
post_body = nil
|
|
1743
|
+
auth_names = ['JWT']
|
|
1744
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1745
|
+
header_params: header_params,
|
|
1746
|
+
query_params: query_params,
|
|
1747
|
+
form_params: form_params,
|
|
1748
|
+
body: post_body,
|
|
1749
|
+
auth_names: auth_names,
|
|
1750
|
+
return_type: 'File')
|
|
1751
|
+
if @api_client.config.debugging
|
|
1752
|
+
@api_client.config.logger.debug "API called:
|
|
1753
|
+
CadApi#put_drawing_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1754
|
+
end
|
|
1755
|
+
[data, status_code, headers]
|
|
1756
|
+
end
|
|
1757
|
+
|
|
1758
|
+
# Export drawing to PNG format. Drawing data is passed as zero-indexed multipart/form-data as well as export PNG options serialized as JSON. Order of drawing data and PNG options could vary.
|
|
1759
|
+
#
|
|
1760
|
+
# @param request PutDrawingPngRequest
|
|
1761
|
+
# @return [File]
|
|
1762
|
+
def put_drawing_png(request)
|
|
1763
|
+
data, _status_code, _headers = put_drawing_png_with_http_info(request)
|
|
1764
|
+
request_token if _status_code == 401
|
|
1765
|
+
data
|
|
1766
|
+
end
|
|
1767
|
+
|
|
1768
|
+
# Export drawing to PNG format. Drawing data is passed as zero-indexed multipart/form-data as well as export PNG options serialized as JSON. Order of drawing data and PNG options could vary.
|
|
1769
|
+
#
|
|
1770
|
+
# @param request PutDrawingPngRequest
|
|
1771
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1772
|
+
# File data, response status code and response headers
|
|
1773
|
+
def put_drawing_png_with_http_info(request)
|
|
1774
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingPngRequest
|
|
1775
|
+
|
|
1776
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_png ...' if @api_client.config.debugging
|
|
1777
|
+
# verify the required parameter 'drawing_data' is set
|
|
1778
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_png' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1779
|
+
# resource path
|
|
1780
|
+
local_var_path = '/cad/png'
|
|
1781
|
+
|
|
1782
|
+
# query parameters
|
|
1783
|
+
query_params = {}
|
|
1784
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1785
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1786
|
+
else
|
|
1787
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1788
|
+
end
|
|
1789
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1790
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1791
|
+
else
|
|
1792
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1793
|
+
end
|
|
1794
|
+
|
|
1795
|
+
# header parameters
|
|
1796
|
+
header_params = {}
|
|
1797
|
+
# HTTP header 'Accept' (if needed)
|
|
1798
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1799
|
+
# HTTP header 'Content-Type'
|
|
1800
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1801
|
+
|
|
1802
|
+
# form parameters
|
|
1803
|
+
form_params = {}
|
|
1804
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1805
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1806
|
+
|
|
1807
|
+
if not form_params.empty?
|
|
1808
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1809
|
+
end
|
|
1810
|
+
|
|
1811
|
+
# http body (model)
|
|
1812
|
+
post_body = nil
|
|
1813
|
+
auth_names = ['JWT']
|
|
1814
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1815
|
+
header_params: header_params,
|
|
1816
|
+
query_params: query_params,
|
|
1817
|
+
form_params: form_params,
|
|
1818
|
+
body: post_body,
|
|
1819
|
+
auth_names: auth_names,
|
|
1820
|
+
return_type: 'File')
|
|
1821
|
+
if @api_client.config.debugging
|
|
1822
|
+
@api_client.config.logger.debug "API called:
|
|
1823
|
+
CadApi#put_drawing_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1824
|
+
end
|
|
1825
|
+
[data, status_code, headers]
|
|
1826
|
+
end
|
|
1827
|
+
|
|
1828
|
+
# Export drawing to PSD format. Drawing data is passed as zero-indexed multipart/form-data as well as export PSD options serialized as JSON. Order of drawing data and PSD options could vary.
|
|
1829
|
+
#
|
|
1830
|
+
# @param request PutDrawingPsdRequest
|
|
1831
|
+
# @return [File]
|
|
1832
|
+
def put_drawing_psd(request)
|
|
1833
|
+
data, _status_code, _headers = put_drawing_psd_with_http_info(request)
|
|
1834
|
+
request_token if _status_code == 401
|
|
1835
|
+
data
|
|
1836
|
+
end
|
|
1837
|
+
|
|
1838
|
+
# Export drawing to PSD format. Drawing data is passed as zero-indexed multipart/form-data as well as export PSD options serialized as JSON. Order of drawing data and PSD options could vary.
|
|
1839
|
+
#
|
|
1840
|
+
# @param request PutDrawingPsdRequest
|
|
1841
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1842
|
+
# File data, response status code and response headers
|
|
1843
|
+
def put_drawing_psd_with_http_info(request)
|
|
1844
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingPsdRequest
|
|
1845
|
+
|
|
1846
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_psd ...' if @api_client.config.debugging
|
|
1847
|
+
# verify the required parameter 'drawing_data' is set
|
|
1848
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_psd' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1849
|
+
# resource path
|
|
1850
|
+
local_var_path = '/cad/psd'
|
|
1851
|
+
|
|
1852
|
+
# query parameters
|
|
1853
|
+
query_params = {}
|
|
1854
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1855
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1856
|
+
else
|
|
1857
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1858
|
+
end
|
|
1859
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1860
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1861
|
+
else
|
|
1862
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1863
|
+
end
|
|
1864
|
+
|
|
1865
|
+
# header parameters
|
|
1866
|
+
header_params = {}
|
|
1867
|
+
# HTTP header 'Accept' (if needed)
|
|
1868
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1869
|
+
# HTTP header 'Content-Type'
|
|
1870
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1871
|
+
|
|
1872
|
+
# form parameters
|
|
1873
|
+
form_params = {}
|
|
1874
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1875
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1876
|
+
|
|
1877
|
+
if not form_params.empty?
|
|
1878
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1879
|
+
end
|
|
1880
|
+
|
|
1881
|
+
# http body (model)
|
|
1882
|
+
post_body = nil
|
|
1883
|
+
auth_names = ['JWT']
|
|
1884
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1885
|
+
header_params: header_params,
|
|
1886
|
+
query_params: query_params,
|
|
1887
|
+
form_params: form_params,
|
|
1888
|
+
body: post_body,
|
|
1889
|
+
auth_names: auth_names,
|
|
1890
|
+
return_type: 'File')
|
|
1891
|
+
if @api_client.config.debugging
|
|
1892
|
+
@api_client.config.logger.debug "API called:
|
|
1893
|
+
CadApi#put_drawing_psd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1894
|
+
end
|
|
1895
|
+
[data, status_code, headers]
|
|
1896
|
+
end
|
|
1897
|
+
|
|
1898
|
+
# Export drawing to SVG format. Drawing data is passed as zero-indexed multipart/form-data as well as export SVG options serialized as JSON. Order of drawing data and SVG options could vary.
|
|
1899
|
+
#
|
|
1900
|
+
# @param request PutDrawingSvgRequest
|
|
1901
|
+
# @return [File]
|
|
1902
|
+
def put_drawing_svg(request)
|
|
1903
|
+
data, _status_code, _headers = put_drawing_svg_with_http_info(request)
|
|
1904
|
+
request_token if _status_code == 401
|
|
1905
|
+
data
|
|
1906
|
+
end
|
|
1907
|
+
|
|
1908
|
+
# Export drawing to SVG format. Drawing data is passed as zero-indexed multipart/form-data as well as export SVG options serialized as JSON. Order of drawing data and SVG options could vary.
|
|
1909
|
+
#
|
|
1910
|
+
# @param request PutDrawingSvgRequest
|
|
1911
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1912
|
+
# File data, response status code and response headers
|
|
1913
|
+
def put_drawing_svg_with_http_info(request)
|
|
1914
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingSvgRequest
|
|
1915
|
+
|
|
1916
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_svg ...' if @api_client.config.debugging
|
|
1917
|
+
# verify the required parameter 'drawing_data' is set
|
|
1918
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_svg' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1919
|
+
# resource path
|
|
1920
|
+
local_var_path = '/cad/svg'
|
|
1921
|
+
|
|
1922
|
+
# query parameters
|
|
1923
|
+
query_params = {}
|
|
1924
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1925
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1926
|
+
else
|
|
1927
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1928
|
+
end
|
|
1929
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
1930
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
1931
|
+
else
|
|
1932
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
1933
|
+
end
|
|
1934
|
+
|
|
1935
|
+
# header parameters
|
|
1936
|
+
header_params = {}
|
|
1937
|
+
# HTTP header 'Accept' (if needed)
|
|
1938
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1939
|
+
# HTTP header 'Content-Type'
|
|
1940
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
1941
|
+
|
|
1942
|
+
# form parameters
|
|
1943
|
+
form_params = {}
|
|
1944
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
1945
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
1946
|
+
|
|
1947
|
+
if not form_params.empty?
|
|
1948
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
1949
|
+
end
|
|
1950
|
+
|
|
1951
|
+
# http body (model)
|
|
1952
|
+
post_body = nil
|
|
1953
|
+
auth_names = ['JWT']
|
|
1954
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
1955
|
+
header_params: header_params,
|
|
1956
|
+
query_params: query_params,
|
|
1957
|
+
form_params: form_params,
|
|
1958
|
+
body: post_body,
|
|
1959
|
+
auth_names: auth_names,
|
|
1960
|
+
return_type: 'File')
|
|
1961
|
+
if @api_client.config.debugging
|
|
1962
|
+
@api_client.config.logger.debug "API called:
|
|
1963
|
+
CadApi#put_drawing_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1964
|
+
end
|
|
1965
|
+
[data, status_code, headers]
|
|
1966
|
+
end
|
|
1967
|
+
|
|
1968
|
+
# Export drawing to TIFF format. Drawing data is passed as zero-indexed multipart/form-data as well as export TIFF options serialized as JSON. Order of drawing data and TIFF options could vary.
|
|
1969
|
+
#
|
|
1970
|
+
# @param request PutDrawingTiffRequest
|
|
1971
|
+
# @return [File]
|
|
1972
|
+
def put_drawing_tiff(request)
|
|
1973
|
+
data, _status_code, _headers = put_drawing_tiff_with_http_info(request)
|
|
1974
|
+
request_token if _status_code == 401
|
|
1975
|
+
data
|
|
1976
|
+
end
|
|
1977
|
+
|
|
1978
|
+
# Export drawing to TIFF format. Drawing data is passed as zero-indexed multipart/form-data as well as export TIFF options serialized as JSON. Order of drawing data and TIFF options could vary.
|
|
1979
|
+
#
|
|
1980
|
+
# @param request PutDrawingTiffRequest
|
|
1981
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
1982
|
+
# File data, response status code and response headers
|
|
1983
|
+
def put_drawing_tiff_with_http_info(request)
|
|
1984
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingTiffRequest
|
|
1985
|
+
|
|
1986
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_tiff ...' if @api_client.config.debugging
|
|
1987
|
+
# verify the required parameter 'drawing_data' is set
|
|
1988
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_tiff' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
1989
|
+
# resource path
|
|
1990
|
+
local_var_path = '/cad/tiff'
|
|
1991
|
+
|
|
1992
|
+
# query parameters
|
|
1993
|
+
query_params = {}
|
|
1994
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
1995
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
1996
|
+
else
|
|
1997
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
1998
|
+
end
|
|
1999
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
2000
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
2001
|
+
else
|
|
2002
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
2003
|
+
end
|
|
2004
|
+
|
|
2005
|
+
# header parameters
|
|
2006
|
+
header_params = {}
|
|
2007
|
+
# HTTP header 'Accept' (if needed)
|
|
2008
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2009
|
+
# HTTP header 'Content-Type'
|
|
2010
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
2011
|
+
|
|
2012
|
+
# form parameters
|
|
2013
|
+
form_params = {}
|
|
2014
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
2015
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
2016
|
+
|
|
2017
|
+
if not form_params.empty?
|
|
2018
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
2019
|
+
end
|
|
2020
|
+
|
|
2021
|
+
# http body (model)
|
|
2022
|
+
post_body = nil
|
|
2023
|
+
auth_names = ['JWT']
|
|
2024
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
2025
|
+
header_params: header_params,
|
|
2026
|
+
query_params: query_params,
|
|
2027
|
+
form_params: form_params,
|
|
2028
|
+
body: post_body,
|
|
2029
|
+
auth_names: auth_names,
|
|
2030
|
+
return_type: 'File')
|
|
2031
|
+
if @api_client.config.debugging
|
|
2032
|
+
@api_client.config.logger.debug "API called:
|
|
2033
|
+
CadApi#put_drawing_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2034
|
+
end
|
|
2035
|
+
[data, status_code, headers]
|
|
2036
|
+
end
|
|
2037
|
+
|
|
2038
|
+
# Export drawing to WMF format. Drawing data is passed as zero-indexed multipart/form-data as well as export WMF options serialized as JSON. Order of drawing data and WMF options could vary.
|
|
2039
|
+
#
|
|
2040
|
+
# @param request PutDrawingWmfRequest
|
|
2041
|
+
# @return [File]
|
|
2042
|
+
def put_drawing_wmf(request)
|
|
2043
|
+
data, _status_code, _headers = put_drawing_wmf_with_http_info(request)
|
|
2044
|
+
request_token if _status_code == 401
|
|
2045
|
+
data
|
|
2046
|
+
end
|
|
2047
|
+
|
|
2048
|
+
# Export drawing to WMF format. Drawing data is passed as zero-indexed multipart/form-data as well as export WMF options serialized as JSON. Order of drawing data and WMF options could vary.
|
|
2049
|
+
#
|
|
2050
|
+
# @param request PutDrawingWmfRequest
|
|
2051
|
+
# @return [Array<(File, Fixnum, Hash)>]
|
|
2052
|
+
# File data, response status code and response headers
|
|
2053
|
+
def put_drawing_wmf_with_http_info(request)
|
|
2054
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? PutDrawingWmfRequest
|
|
2055
|
+
|
|
2056
|
+
@api_client.config.logger.debug 'Calling API: CadApi.put_drawing_wmf ...' if @api_client.config.debugging
|
|
2057
|
+
# verify the required parameter 'drawing_data' is set
|
|
2058
|
+
raise ArgumentError, 'Missing the required parameter drawing_data when calling CadApi.put_drawing_wmf' if @api_client.config.client_side_validation && request.drawing_data.nil?
|
|
2059
|
+
# resource path
|
|
2060
|
+
local_var_path = '/cad/wmf'
|
|
2061
|
+
|
|
2062
|
+
# query parameters
|
|
2063
|
+
query_params = {}
|
|
2064
|
+
if local_var_path.include? downcase_first_letter('outPath')
|
|
2065
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('outPath') + '}', request.out_path.to_s)
|
|
2066
|
+
else
|
|
2067
|
+
query_params[downcase_first_letter('outPath')] = request.out_path unless request.out_path.nil?
|
|
2068
|
+
end
|
|
2069
|
+
if local_var_path.include? downcase_first_letter('storage')
|
|
2070
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('storage') + '}', request.storage.to_s)
|
|
2071
|
+
else
|
|
2072
|
+
query_params[downcase_first_letter('storage')] = request.storage unless request.storage.nil?
|
|
2073
|
+
end
|
|
2074
|
+
|
|
2075
|
+
# header parameters
|
|
2076
|
+
header_params = {}
|
|
2077
|
+
# HTTP header 'Accept' (if needed)
|
|
2078
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2079
|
+
# HTTP header 'Content-Type'
|
|
2080
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/octet-stream'])
|
|
2081
|
+
|
|
2082
|
+
# form parameters
|
|
2083
|
+
form_params = {}
|
|
2084
|
+
form_params[downcase_first_letter('drawingData')] = request.drawing_data
|
|
2085
|
+
form_params[downcase_first_letter('exportOptions')] = request.export_options unless request.export_options.nil?
|
|
2086
|
+
|
|
2087
|
+
if not form_params.empty?
|
|
2088
|
+
header_params['Content-Type'] = 'multipart/form-data'
|
|
2089
|
+
end
|
|
2090
|
+
|
|
2091
|
+
# http body (model)
|
|
2092
|
+
post_body = nil
|
|
2093
|
+
auth_names = ['JWT']
|
|
2094
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
2095
|
+
header_params: header_params,
|
|
2096
|
+
query_params: query_params,
|
|
2097
|
+
form_params: form_params,
|
|
2098
|
+
body: post_body,
|
|
2099
|
+
auth_names: auth_names,
|
|
2100
|
+
return_type: 'File')
|
|
2101
|
+
if @api_client.config.debugging
|
|
2102
|
+
@api_client.config.logger.debug "API called:
|
|
2103
|
+
CadApi#put_drawing_wmf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2104
|
+
end
|
|
2105
|
+
[data, status_code, headers]
|
|
2106
|
+
end
|
|
2107
|
+
|
|
2108
|
+
#
|
|
2109
|
+
# Helper method to convert first letter to downcase
|
|
2110
|
+
#
|
|
2111
|
+
private def downcase_first_letter(str)
|
|
2112
|
+
value = str[0].downcase + str[1..-1]
|
|
2113
|
+
value
|
|
2114
|
+
end
|
|
2115
|
+
|
|
2116
|
+
#
|
|
2117
|
+
# Gets a request token from server
|
|
2118
|
+
#
|
|
2119
|
+
private def request_token
|
|
2120
|
+
config = @api_client.config
|
|
2121
|
+
api_version = config.api_version
|
|
2122
|
+
config.api_version = ''
|
|
2123
|
+
request_url = "/connect/token"
|
|
2124
|
+
post_data = "grant_type=client_credentials" + "&client_id=" + config.api_key['app_sid'] + "&client_secret=" + config.api_key['api_key']
|
|
2125
|
+
data, status_code, header = @api_client.call_api(:POST, request_url, :body => post_data, :header_params => { "Content-Type": "application/x-www-form-urlencoded" }, :return_type => 'Object')
|
|
2126
|
+
@api_client.config.access_token = data[:access_token]
|
|
2127
|
+
@api_client.config.api_version = api_version
|
|
2128
|
+
end
|
|
2129
|
+
|
|
2130
|
+
# requires all files inside a directory from current dir
|
|
2131
|
+
# @param _dir can be relative path like '/lib' or "../lib"
|
|
2132
|
+
private def require_all(_dir)
|
|
2133
|
+
Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
|
|
2134
|
+
require file
|
|
2135
|
+
end
|
|
2136
|
+
end
|
|
2137
|
+
end
|
|
2138
|
+
end
|