aspose_diagram_cloud 18.10.3 → 19.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{aspose_diagram_cloud.gemspec → AsposeDiagramCloud.gemspec} +5 -5
- data/README.md +94 -124
- data/docs/{FileFormatRequest.md → CreateNewResponse.md} +2 -2
- data/docs/DiagramApi.md +241 -0
- data/docs/DiagramSaveOptions.md +10 -0
- data/docs/DiscUsage.md +9 -0
- data/docs/Error.md +11 -0
- data/docs/ErrorDetails.md +9 -0
- data/docs/FileVersion.md +14 -0
- data/docs/FileVersions.md +8 -0
- data/docs/FilesList.md +8 -0
- data/docs/FilesUploadResult.md +9 -0
- data/docs/HTMLSaveOptions.md +19 -0
- data/docs/ImageSaveOptions.md +29 -0
- data/docs/ModifyResponse.md +9 -0
- data/docs/OAuthApi.md +3 -3
- data/docs/ObjectExist.md +9 -0
- data/docs/PageSize.md +8 -0
- data/docs/PdfDigitalSignatureDetails.md +11 -0
- data/docs/PdfEncryptionDetails.md +11 -0
- data/docs/PdfSaveOptions.md +25 -0
- data/docs/PointF.md +10 -0
- data/docs/RectangleF.md +18 -0
- data/docs/RenderingSaveOptions.md +13 -0
- data/docs/SVGSaveOptions.md +18 -0
- data/docs/SWFSaveOptions.md +13 -0
- data/docs/SaaSposeResponse.md +0 -2
- data/docs/SaveAsResponse.md +10 -0
- data/docs/SaveOptionsModel.md +9 -0
- data/docs/SaveOptionsRequest.md +10 -0
- data/docs/StorageApi.md +799 -0
- data/docs/StorageExist.md +8 -0
- data/docs/StorageFile.md +12 -0
- data/docs/{SharpModel.md → UploadResponse.md} +2 -2
- data/docs/XAMLSaveOptions.md +12 -0
- data/docs/XPSSaveOptions.md +13 -0
- data/lib/AsposeDiagramCloud.rb +74 -0
- data/lib/AsposeDiagramCloud/api/diagram_api.rb +300 -0
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/api/o_auth_api.rb +3 -3
- data/lib/AsposeDiagramCloud/api/storage_api.rb +905 -0
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/api_client.rb +7 -4
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/api_error.rb +2 -2
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/configuration.rb +4 -18
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/models/access_token_response.rb +2 -2
- data/lib/{aspose_diagram_cloud/models/file_format_request.rb → AsposeDiagramCloud/models/create_new_response.rb} +10 -10
- data/lib/AsposeDiagramCloud/models/diagram_save_options.rb +244 -0
- data/lib/{aspose_diagram_cloud/models/link.rb → AsposeDiagramCloud/models/disc_usage.rb} +29 -35
- data/lib/AsposeDiagramCloud/models/error.rb +219 -0
- data/lib/{aspose_diagram_cloud/models/saa_spose_response.rb → AsposeDiagramCloud/models/error_details.rb} +22 -20
- data/lib/AsposeDiagramCloud/models/file_version.rb +264 -0
- data/lib/{aspose_diagram_cloud/models/page_model.rb → AsposeDiagramCloud/models/file_versions.rb} +13 -21
- data/lib/AsposeDiagramCloud/models/files_list.rb +191 -0
- data/lib/AsposeDiagramCloud/models/files_upload_result.rb +203 -0
- data/lib/AsposeDiagramCloud/models/html_save_options.rb +330 -0
- data/lib/AsposeDiagramCloud/models/image_save_options.rb +492 -0
- data/lib/AsposeDiagramCloud/models/modify_response.rb +202 -0
- data/lib/{aspose_diagram_cloud/models/diagram_response.rb → AsposeDiagramCloud/models/object_exist.rb} +27 -29
- data/lib/AsposeDiagramCloud/models/page_size.rb +221 -0
- data/lib/AsposeDiagramCloud/models/pdf_digital_signature_details.rb +248 -0
- data/lib/AsposeDiagramCloud/models/pdf_encryption_details.rb +260 -0
- data/lib/AsposeDiagramCloud/models/pdf_save_options.rb +408 -0
- data/lib/{aspose_diagram_cloud/models/save_result.rb → AsposeDiagramCloud/models/point_f.rb} +37 -24
- data/lib/AsposeDiagramCloud/models/rectangle_f.rb +333 -0
- data/lib/AsposeDiagramCloud/models/rendering_save_options.rb +276 -0
- data/lib/{aspose_diagram_cloud/models/sharp_model.rb → AsposeDiagramCloud/models/saa_spose_response.rb} +5 -14
- data/lib/{aspose_diagram_cloud/models/save_response.rb → AsposeDiagramCloud/models/save_as_response.rb} +24 -27
- data/lib/AsposeDiagramCloud/models/save_options_model.rb +235 -0
- data/lib/{aspose_diagram_cloud/models/diagram_model.rb → AsposeDiagramCloud/models/save_options_request.rb} +19 -12
- data/lib/AsposeDiagramCloud/models/storage_exist.rb +194 -0
- data/lib/AsposeDiagramCloud/models/storage_file.rb +239 -0
- data/lib/AsposeDiagramCloud/models/svg_save_options.rb +321 -0
- data/lib/AsposeDiagramCloud/models/swf_save_options.rb +271 -0
- data/lib/AsposeDiagramCloud/models/upload_response.rb +188 -0
- data/lib/AsposeDiagramCloud/models/xaml_save_options.rb +262 -0
- data/lib/AsposeDiagramCloud/models/xps_save_options.rb +271 -0
- data/lib/{aspose_diagram_cloud → AsposeDiagramCloud}/version.rb +3 -3
- data/spec/api/test_convert_spec.rb +308 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +5 -5
- data/spec/spec_helper.rb +10 -6
- data/testData/FileUpload.vdx +437 -0
- metadata +80 -55
- data/docs/DiagramFileApi.md +0 -228
- data/docs/DiagramModel.md +0 -9
- data/docs/DiagramResponse.md +0 -10
- data/docs/Link.md +0 -11
- data/docs/PageModel.md +0 -9
- data/docs/SaveResponse.md +0 -10
- data/docs/SaveResult.md +0 -10
- data/lib/aspose_diagram_cloud.rb +0 -51
- data/lib/aspose_diagram_cloud/api/diagram_file_api.rb +0 -304
- data/spec/api/diagram_file_api_spec.rb +0 -118
- data/spec/api/o_auth_api_spec.rb +0 -56
- data/spec/models/access_token_response_spec.rb +0 -84
- data/spec/models/diagram_model_spec.rb +0 -48
- data/spec/models/diagram_response_spec.rb +0 -54
- data/spec/models/file_format_request_spec.rb +0 -42
- data/spec/models/link_spec.rb +0 -60
- data/spec/models/page_model_spec.rb +0 -48
- data/spec/models/saa_spose_response_spec.rb +0 -48
- data/spec/models/save_response_spec.rb +0 -54
- data/spec/models/save_result_spec.rb +0 -54
- data/spec/models/sharp_model_spec.rb +0 -42
data/docs/StorageFile.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# AsposeDiagramCloud::StorageFile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**name** | **String** | File or folder name. | [optional]
|
7
|
+
**is_folder** | **BOOLEAN** | True if it is a folder. |
|
8
|
+
**modified_date** | **DateTime** | File or folder last modified DateTime. | [optional]
|
9
|
+
**size** | **Integer** | File or folder size. |
|
10
|
+
**path** | **String** | File or folder path. | [optional]
|
11
|
+
|
12
|
+
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# AsposeDiagramCloud::
|
1
|
+
# AsposeDiagramCloud::UploadResponse
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**
|
6
|
+
**uploaded** | **String** | | [optional]
|
7
7
|
|
8
8
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# AsposeDiagramCloud::XAMLSaveOptions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**save_format** | **String** | |
|
7
|
+
**default_font** | **String** | | [optional]
|
8
|
+
**page_count** | **Integer** | | [optional]
|
9
|
+
**page_index** | **Integer** | | [optional]
|
10
|
+
**save_foreground_pages_only** | **BOOLEAN** | | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# AsposeDiagramCloud::XPSSaveOptions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**save_format** | **String** | |
|
7
|
+
**default_font** | **String** | | [optional]
|
8
|
+
**page_count** | **Integer** | | [optional]
|
9
|
+
**export_hidden_page** | **BOOLEAN** | | [optional]
|
10
|
+
**page_index** | **Integer** | | [optional]
|
11
|
+
**save_foreground_pages_only** | **BOOLEAN** | | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,74 @@
|
|
1
|
+
=begin
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'AsposeDiagramCloud/api_client'
|
15
|
+
require 'AsposeDiagramCloud/api_error'
|
16
|
+
require 'AsposeDiagramCloud/version'
|
17
|
+
require 'AsposeDiagramCloud/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'AsposeDiagramCloud/models/access_token_response'
|
21
|
+
require 'AsposeDiagramCloud/models/disc_usage'
|
22
|
+
require 'AsposeDiagramCloud/models/error'
|
23
|
+
require 'AsposeDiagramCloud/models/error_details'
|
24
|
+
require 'AsposeDiagramCloud/models/file_versions'
|
25
|
+
require 'AsposeDiagramCloud/models/files_list'
|
26
|
+
require 'AsposeDiagramCloud/models/files_upload_result'
|
27
|
+
require 'AsposeDiagramCloud/models/object_exist'
|
28
|
+
require 'AsposeDiagramCloud/models/page_size'
|
29
|
+
require 'AsposeDiagramCloud/models/pdf_digital_signature_details'
|
30
|
+
require 'AsposeDiagramCloud/models/pdf_encryption_details'
|
31
|
+
require 'AsposeDiagramCloud/models/point_f'
|
32
|
+
require 'AsposeDiagramCloud/models/rectangle_f'
|
33
|
+
require 'AsposeDiagramCloud/models/saa_spose_response'
|
34
|
+
require 'AsposeDiagramCloud/models/save_options_model'
|
35
|
+
require 'AsposeDiagramCloud/models/save_options_request'
|
36
|
+
require 'AsposeDiagramCloud/models/storage_exist'
|
37
|
+
require 'AsposeDiagramCloud/models/storage_file'
|
38
|
+
require 'AsposeDiagramCloud/models/create_new_response'
|
39
|
+
require 'AsposeDiagramCloud/models/diagram_save_options'
|
40
|
+
require 'AsposeDiagramCloud/models/file_version'
|
41
|
+
require 'AsposeDiagramCloud/models/modify_response'
|
42
|
+
require 'AsposeDiagramCloud/models/rendering_save_options'
|
43
|
+
require 'AsposeDiagramCloud/models/swf_save_options'
|
44
|
+
require 'AsposeDiagramCloud/models/save_as_response'
|
45
|
+
require 'AsposeDiagramCloud/models/upload_response'
|
46
|
+
require 'AsposeDiagramCloud/models/xaml_save_options'
|
47
|
+
require 'AsposeDiagramCloud/models/xps_save_options'
|
48
|
+
require 'AsposeDiagramCloud/models/html_save_options'
|
49
|
+
require 'AsposeDiagramCloud/models/image_save_options'
|
50
|
+
require 'AsposeDiagramCloud/models/pdf_save_options'
|
51
|
+
require 'AsposeDiagramCloud/models/svg_save_options'
|
52
|
+
|
53
|
+
# APIs
|
54
|
+
require 'AsposeDiagramCloud/api/diagram_api'
|
55
|
+
require 'AsposeDiagramCloud/api/o_auth_api'
|
56
|
+
require 'AsposeDiagramCloud/api/storage_api'
|
57
|
+
|
58
|
+
module AsposeDiagramCloud
|
59
|
+
class << self
|
60
|
+
# Customize default settings for the SDK using block.
|
61
|
+
# AsposeDiagramCloud.configure do |config|
|
62
|
+
# config.username = "xxx"
|
63
|
+
# config.password = "xxx"
|
64
|
+
# end
|
65
|
+
# If no block given, return the default Configuration object.
|
66
|
+
def configure
|
67
|
+
if block_given?
|
68
|
+
yield(Configuration.default)
|
69
|
+
else
|
70
|
+
Configuration.default
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,300 @@
|
|
1
|
+
=begin
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module AsposeDiagramCloud
|
16
|
+
class DiagramApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(grant_type,app_sid,app_key,api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
@api_client.config.api_key['api_key'] = app_key
|
22
|
+
@api_client.config.api_key['app_sid'] = app_sid
|
23
|
+
@api_client.config.api_key['grant_type'] = grant_type
|
24
|
+
request_token
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# Gets a request token from server
|
30
|
+
#
|
31
|
+
def request_token
|
32
|
+
authconfig=Configuration.new
|
33
|
+
authconfig.base_path=""
|
34
|
+
authClient=ApiClient.new(authconfig)
|
35
|
+
authApi=AsposeDiagramCloud::OAuthApi.new(authClient)
|
36
|
+
config=@api_client.config
|
37
|
+
data, _status_code, _headers=authApi.o_auth_post(config.api_key['grant_type'],config.api_key['app_sid'],config.api_key['api_key'])
|
38
|
+
#print(data.access_token)
|
39
|
+
@api_client.default_headers["Authorization"] ="Bearer " + data.access_token
|
40
|
+
end
|
41
|
+
# Converts document from the request's content to the specified format.
|
42
|
+
#
|
43
|
+
# @param name Download document name.
|
44
|
+
# @param file File to upload
|
45
|
+
# @param [Hash] opts the optional parameters
|
46
|
+
# @option opts [String] :source_filename Source document name.
|
47
|
+
# @return [File]
|
48
|
+
def convert_document(name, file, opts = {})
|
49
|
+
data, _status_code, _headers = convert_document_with_http_info(name, file, opts)
|
50
|
+
return data
|
51
|
+
end
|
52
|
+
|
53
|
+
# Converts document from the request's content to the specified format.
|
54
|
+
#
|
55
|
+
# @param name Download document name.
|
56
|
+
# @param file File to upload
|
57
|
+
# @param [Hash] opts the optional parameters
|
58
|
+
# @option opts [String] :source_filename Source document name.
|
59
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
60
|
+
def convert_document_with_http_info(name, file, opts = {})
|
61
|
+
if @api_client.config.debugging
|
62
|
+
@api_client.config.logger.debug "Calling API: DiagramApi.convert_document ..."
|
63
|
+
end
|
64
|
+
# verify the required parameter 'name' is set
|
65
|
+
if @api_client.config.client_side_validation && name.nil?
|
66
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling DiagramApi.convert_document"
|
67
|
+
end
|
68
|
+
# verify the required parameter 'file' is set
|
69
|
+
if @api_client.config.client_side_validation && file.nil?
|
70
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling DiagramApi.convert_document"
|
71
|
+
end
|
72
|
+
# resource path
|
73
|
+
local_var_path = "/diagram/{name}/convert".sub('{' + 'name' + '}', name.to_s)
|
74
|
+
|
75
|
+
# query parameters
|
76
|
+
query_params = {}
|
77
|
+
query_params[:'sourceFilename'] = opts[:'source_filename'] if !opts[:'source_filename'].nil?
|
78
|
+
|
79
|
+
# header parameters
|
80
|
+
header_params = {}
|
81
|
+
# HTTP header 'Accept' (if needed)
|
82
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
83
|
+
# HTTP header 'Content-Type'
|
84
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
85
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
86
|
+
|
87
|
+
# form parameters
|
88
|
+
form_params = {}
|
89
|
+
#form_params["File"] = file
|
90
|
+
|
91
|
+
# http body (model)
|
92
|
+
post_body = file
|
93
|
+
auth_names = ['JWT']
|
94
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
95
|
+
:header_params => header_params,
|
96
|
+
:query_params => query_params,
|
97
|
+
:form_params => form_params,
|
98
|
+
:body => post_body,
|
99
|
+
:auth_names => auth_names,
|
100
|
+
:return_type => 'File')
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug "API called: DiagramApi#convert_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
103
|
+
end
|
104
|
+
return data, status_code, headers
|
105
|
+
end
|
106
|
+
|
107
|
+
# Create Empty file into the specified format.
|
108
|
+
#
|
109
|
+
# @param name The document name.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [String] :folder The document folder.
|
112
|
+
# @option opts [BOOLEAN] :is_overwrite If true overwrite the same name file.The default value is false (default to false)
|
113
|
+
# @return [CreateNewResponse]
|
114
|
+
def create_new(name, opts = {})
|
115
|
+
data, _status_code, _headers = create_new_with_http_info(name, opts)
|
116
|
+
return data
|
117
|
+
end
|
118
|
+
|
119
|
+
# Create Empty file into the specified format.
|
120
|
+
#
|
121
|
+
# @param name The document name.
|
122
|
+
# @param [Hash] opts the optional parameters
|
123
|
+
# @option opts [String] :folder The document folder.
|
124
|
+
# @option opts [BOOLEAN] :is_overwrite If true overwrite the same name file.The default value is false
|
125
|
+
# @return [Array<(CreateNewResponse, Fixnum, Hash)>] CreateNewResponse data, response status code and response headers
|
126
|
+
def create_new_with_http_info(name, opts = {})
|
127
|
+
if @api_client.config.debugging
|
128
|
+
@api_client.config.logger.debug "Calling API: DiagramApi.create_new ..."
|
129
|
+
end
|
130
|
+
# verify the required parameter 'name' is set
|
131
|
+
if @api_client.config.client_side_validation && name.nil?
|
132
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling DiagramApi.create_new"
|
133
|
+
end
|
134
|
+
# resource path
|
135
|
+
local_var_path = "/diagram/{name}".sub('{' + 'name' + '}', name.to_s)
|
136
|
+
|
137
|
+
# query parameters
|
138
|
+
query_params = {}
|
139
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
140
|
+
query_params[:'IsOverwrite'] = opts[:'is_overwrite'] if !opts[:'is_overwrite'].nil?
|
141
|
+
|
142
|
+
# header parameters
|
143
|
+
header_params = {}
|
144
|
+
# HTTP header 'Accept' (if needed)
|
145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
146
|
+
# HTTP header 'Content-Type'
|
147
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
148
|
+
|
149
|
+
# form parameters
|
150
|
+
form_params = {}
|
151
|
+
|
152
|
+
# http body (model)
|
153
|
+
post_body = nil
|
154
|
+
auth_names = ['JWT']
|
155
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
156
|
+
:header_params => header_params,
|
157
|
+
:query_params => query_params,
|
158
|
+
:form_params => form_params,
|
159
|
+
:body => post_body,
|
160
|
+
:auth_names => auth_names,
|
161
|
+
:return_type => 'CreateNewResponse')
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: DiagramApi#create_new\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
168
|
+
# Exports the document into the specified format.
|
169
|
+
#
|
170
|
+
# @param name The document name.
|
171
|
+
# @param format The destination format.
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [String] :folder Original document folder.
|
174
|
+
# @return [File]
|
175
|
+
def download_file_with_format(name, format, opts = {})
|
176
|
+
data, _status_code, _headers = download_file_with_format_with_http_info(name, format, opts)
|
177
|
+
return data
|
178
|
+
end
|
179
|
+
|
180
|
+
# Exports the document into the specified format.
|
181
|
+
#
|
182
|
+
# @param name The document name.
|
183
|
+
# @param format The destination format.
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [String] :folder Original document folder.
|
186
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
187
|
+
def download_file_with_format_with_http_info(name, format, opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug "Calling API: DiagramApi.download_file_with_format ..."
|
190
|
+
end
|
191
|
+
# verify the required parameter 'name' is set
|
192
|
+
if @api_client.config.client_side_validation && name.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling DiagramApi.download_file_with_format"
|
194
|
+
end
|
195
|
+
# verify the required parameter 'format' is set
|
196
|
+
if @api_client.config.client_side_validation && format.nil?
|
197
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling DiagramApi.download_file_with_format"
|
198
|
+
end
|
199
|
+
# resource path
|
200
|
+
local_var_path = "/diagram/{name}".sub('{' + 'name' + '}', name.to_s)
|
201
|
+
|
202
|
+
# query parameters
|
203
|
+
query_params = {}
|
204
|
+
query_params[:'format'] = format
|
205
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
206
|
+
|
207
|
+
# header parameters
|
208
|
+
header_params = {}
|
209
|
+
# HTTP header 'Accept' (if needed)
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
211
|
+
# HTTP header 'Content-Type'
|
212
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
213
|
+
|
214
|
+
# form parameters
|
215
|
+
form_params = {}
|
216
|
+
|
217
|
+
# http body (model)
|
218
|
+
post_body = nil
|
219
|
+
auth_names = ['JWT']
|
220
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => 'File')
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug "API called: DiagramApi#download_file_with_format\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
229
|
+
end
|
230
|
+
return data, status_code, headers
|
231
|
+
end
|
232
|
+
|
233
|
+
# Converts document to destination format with detailed settings and saves result to storage.
|
234
|
+
#
|
235
|
+
# @param name Original document name.
|
236
|
+
# @param save_options_request Save options.
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @option opts [String] :folder Original document folder.
|
239
|
+
# @option opts [BOOLEAN] :is_overwrite If true overwrite the same name file.The default value is false (default to false)
|
240
|
+
# @return [SaveAsResponse]
|
241
|
+
def save_as(name, save_options_request, opts = {})
|
242
|
+
data, _status_code, _headers = save_as_with_http_info(name, save_options_request, opts)
|
243
|
+
return data
|
244
|
+
end
|
245
|
+
|
246
|
+
# Converts document to destination format with detailed settings and saves result to storage.
|
247
|
+
#
|
248
|
+
# @param name Original document name.
|
249
|
+
# @param save_options_request Save options.
|
250
|
+
# @param [Hash] opts the optional parameters
|
251
|
+
# @option opts [String] :folder Original document folder.
|
252
|
+
# @option opts [BOOLEAN] :is_overwrite If true overwrite the same name file.The default value is false
|
253
|
+
# @return [Array<(SaveAsResponse, Fixnum, Hash)>] SaveAsResponse data, response status code and response headers
|
254
|
+
def save_as_with_http_info(name, save_options_request, opts = {})
|
255
|
+
if @api_client.config.debugging
|
256
|
+
@api_client.config.logger.debug "Calling API: DiagramApi.save_as ..."
|
257
|
+
end
|
258
|
+
# verify the required parameter 'name' is set
|
259
|
+
if @api_client.config.client_side_validation && name.nil?
|
260
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling DiagramApi.save_as"
|
261
|
+
end
|
262
|
+
# verify the required parameter 'save_options_request' is set
|
263
|
+
if @api_client.config.client_side_validation && save_options_request.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'save_options_request' when calling DiagramApi.save_as"
|
265
|
+
end
|
266
|
+
# resource path
|
267
|
+
local_var_path = "/diagram/{name}/saveAs".sub('{' + 'name' + '}', name.to_s)
|
268
|
+
|
269
|
+
# query parameters
|
270
|
+
query_params = {}
|
271
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
272
|
+
query_params[:'IsOverwrite'] = opts[:'is_overwrite'] if !opts[:'is_overwrite'].nil?
|
273
|
+
|
274
|
+
# header parameters
|
275
|
+
header_params = {}
|
276
|
+
# HTTP header 'Accept' (if needed)
|
277
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
278
|
+
# HTTP header 'Content-Type'
|
279
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
280
|
+
|
281
|
+
# form parameters
|
282
|
+
form_params = {}
|
283
|
+
|
284
|
+
# http body (model)
|
285
|
+
post_body = @api_client.object_to_http_body(save_options_request)
|
286
|
+
auth_names = ['JWT']
|
287
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
288
|
+
:header_params => header_params,
|
289
|
+
:query_params => query_params,
|
290
|
+
:form_params => form_params,
|
291
|
+
:body => post_body,
|
292
|
+
:auth_names => auth_names,
|
293
|
+
:return_type => 'SaveAsResponse')
|
294
|
+
if @api_client.config.debugging
|
295
|
+
@api_client.config.logger.debug "API called: DiagramApi#save_as\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
296
|
+
end
|
297
|
+
return data, status_code, headers
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Aspose.Diagram Cloud API Reference
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -56,7 +56,7 @@ module AsposeDiagramCloud
|
|
56
56
|
fail ArgumentError, "Missing the required parameter 'client_secret' when calling OAuthApi.o_auth_post"
|
57
57
|
end
|
58
58
|
# resource path
|
59
|
-
local_var_path = "/
|
59
|
+
local_var_path = "/connect/token"
|
60
60
|
|
61
61
|
# query parameters
|
62
62
|
query_params = {}
|