aspose_diagram_cloud 19.10 → 20.3

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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +72 -94
  3. data/lib/AsposeDiagramCloud.rb +11 -0
  4. data/lib/AsposeDiagramCloud/api/diagram_api.rb +468 -0
  5. data/lib/AsposeDiagramCloud/models/api_response_of_list_of_page_data.rb +190 -0
  6. data/lib/AsposeDiagramCloud/models/draw_shape_data.rb +262 -0
  7. data/lib/AsposeDiagramCloud/models/ellipse_data.rb +262 -0
  8. data/lib/AsposeDiagramCloud/models/line_data.rb +273 -0
  9. data/lib/AsposeDiagramCloud/models/page_data.rb +216 -0
  10. data/lib/AsposeDiagramCloud/models/page_setting.rb +219 -0
  11. data/lib/AsposeDiagramCloud/models/polyline_data.rb +273 -0
  12. data/lib/AsposeDiagramCloud/models/shape_data.rb +221 -0
  13. data/lib/AsposeDiagramCloud/models/shape_style_data.rb +189 -0
  14. data/lib/AsposeDiagramCloud/models/text_style_data.rb +253 -0
  15. data/lib/AsposeDiagramCloud/version.rb +1 -1
  16. data/spec/_spec.rb +308 -0
  17. data/spec/api/test_drawing_spec.rb +136 -0
  18. data/spec/api/test_page_spec.rb +92 -0
  19. metadata +18 -37
  20. data/docs/AccessTokenResponse.md +0 -15
  21. data/docs/CreateNewResponse.md +0 -8
  22. data/docs/DiagramApi.md +0 -241
  23. data/docs/DiagramSaveOptions.md +0 -10
  24. data/docs/DiscUsage.md +0 -9
  25. data/docs/Error.md +0 -11
  26. data/docs/ErrorDetails.md +0 -9
  27. data/docs/FileVersion.md +0 -14
  28. data/docs/FileVersions.md +0 -8
  29. data/docs/FilesList.md +0 -8
  30. data/docs/FilesUploadResult.md +0 -9
  31. data/docs/HTMLSaveOptions.md +0 -19
  32. data/docs/ImageSaveOptions.md +0 -29
  33. data/docs/ModifyResponse.md +0 -9
  34. data/docs/OAuthApi.md +0 -60
  35. data/docs/ObjectExist.md +0 -9
  36. data/docs/PageSize.md +0 -8
  37. data/docs/PdfDigitalSignatureDetails.md +0 -11
  38. data/docs/PdfEncryptionDetails.md +0 -11
  39. data/docs/PdfSaveOptions.md +0 -25
  40. data/docs/PointF.md +0 -10
  41. data/docs/RectangleF.md +0 -18
  42. data/docs/RenderingSaveOptions.md +0 -13
  43. data/docs/SVGSaveOptions.md +0 -18
  44. data/docs/SWFSaveOptions.md +0 -13
  45. data/docs/SaaSposeResponse.md +0 -7
  46. data/docs/SaveAsResponse.md +0 -10
  47. data/docs/SaveOptionsModel.md +0 -9
  48. data/docs/SaveOptionsRequest.md +0 -10
  49. data/docs/StorageApi.md +0 -799
  50. data/docs/StorageExist.md +0 -8
  51. data/docs/StorageFile.md +0 -12
  52. data/docs/UploadResponse.md +0 -8
  53. data/docs/XAMLSaveOptions.md +0 -12
  54. data/docs/XPSSaveOptions.md +0 -13
@@ -0,0 +1,92 @@
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
+ #rspec spec/api/test_convert_spec.rb
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+
17
+ $fileName="pageTest.vsdx"
18
+
19
+ # Unit tests for AsposeDiagramCloud::DiagramApi
20
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
21
+ # Please update as you see appropriate
22
+ describe 'PageApi' do
23
+ before do
24
+ # run before each test
25
+ #@instance = AsposeDiagramCloud::DiagramApi.new($grant_type,$client_id,$client_secret)
26
+ end
27
+
28
+ after do
29
+ # run after each test
30
+ end
31
+
32
+ describe 'test an instance of DiagramApi' do
33
+ it 'should create an instance of DiagramApi' do
34
+ expect($diagramApi).to be_instance_of(AsposeDiagramCloud::DiagramApi)
35
+ end
36
+ end
37
+
38
+ # unit tests for create_new
39
+ # Create Empty file into the specified format.
40
+ #
41
+ # @param name The document name.
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [String] :folder The document folder.
44
+ # @option opts [BOOLEAN] :is_overwrite If true overwrite the same name file.The default value is false
45
+ # @return [CreateNewResponse]
46
+ describe 'create_new test' do
47
+ it "should work" do
48
+ name = $fileName
49
+ folder = $storageTestFOLDER
50
+ is_overwrite=true
51
+ result=$diagramApi.create_new(name, {:name=>name, :is_overwrite=>is_overwrite, :folder=>folder})
52
+ #print(result)
53
+ expect(result.created).not_to be_empty
54
+ #assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'put_new_page test' do
59
+ it "should work" do
60
+ folder = $storageTestFOLDER
61
+ result=$diagramApi.put_new_page($fileName,"newPage", {:folder=>folder})
62
+ #print(result)
63
+ expect(result.is_success).to be_truthy
64
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ end
66
+ end
67
+
68
+ describe 'post_page_setup test' do
69
+ it "should work" do
70
+ folder = $storageTestFOLDER
71
+ setting=AsposeDiagramCloud::PageSetting.new
72
+ setting.page_width=2
73
+ setting.page_height=2
74
+ result=$diagramApi.post_page_setup($fileName,"Page-0",setting, {:folder=>folder})
75
+ #print(result)
76
+ expect(result.is_success).to be_truthy
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
78
+ end
79
+ end
80
+
81
+ describe 'get_pages test' do
82
+ it "should work" do
83
+ folder = $storageTestFOLDER
84
+ result=$diagramApi.get_pages($fileName, {:folder=>folder})
85
+ print(result.model.size)
86
+ expect(result.model.size).to be > 0
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
91
+
92
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_diagram_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '19.10'
4
+ version: '20.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - AsposeCloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -201,41 +201,6 @@ files:
201
201
  - Gemfile
202
202
  - README.md
203
203
  - Rakefile
204
- - docs/AccessTokenResponse.md
205
- - docs/CreateNewResponse.md
206
- - docs/DiagramApi.md
207
- - docs/DiagramSaveOptions.md
208
- - docs/DiscUsage.md
209
- - docs/Error.md
210
- - docs/ErrorDetails.md
211
- - docs/FileVersion.md
212
- - docs/FileVersions.md
213
- - docs/FilesList.md
214
- - docs/FilesUploadResult.md
215
- - docs/HTMLSaveOptions.md
216
- - docs/ImageSaveOptions.md
217
- - docs/ModifyResponse.md
218
- - docs/OAuthApi.md
219
- - docs/ObjectExist.md
220
- - docs/PageSize.md
221
- - docs/PdfDigitalSignatureDetails.md
222
- - docs/PdfEncryptionDetails.md
223
- - docs/PdfSaveOptions.md
224
- - docs/PointF.md
225
- - docs/RectangleF.md
226
- - docs/RenderingSaveOptions.md
227
- - docs/SVGSaveOptions.md
228
- - docs/SWFSaveOptions.md
229
- - docs/SaaSposeResponse.md
230
- - docs/SaveAsResponse.md
231
- - docs/SaveOptionsModel.md
232
- - docs/SaveOptionsRequest.md
233
- - docs/StorageApi.md
234
- - docs/StorageExist.md
235
- - docs/StorageFile.md
236
- - docs/UploadResponse.md
237
- - docs/XAMLSaveOptions.md
238
- - docs/XPSSaveOptions.md
239
204
  - git_push.sh
240
205
  - lib/AsposeDiagramCloud.rb
241
206
  - lib/AsposeDiagramCloud/api/diagram_api.rb
@@ -245,9 +210,12 @@ files:
245
210
  - lib/AsposeDiagramCloud/api_error.rb
246
211
  - lib/AsposeDiagramCloud/configuration.rb
247
212
  - lib/AsposeDiagramCloud/models/access_token_response.rb
213
+ - lib/AsposeDiagramCloud/models/api_response_of_list_of_page_data.rb
248
214
  - lib/AsposeDiagramCloud/models/create_new_response.rb
249
215
  - lib/AsposeDiagramCloud/models/diagram_save_options.rb
250
216
  - lib/AsposeDiagramCloud/models/disc_usage.rb
217
+ - lib/AsposeDiagramCloud/models/draw_shape_data.rb
218
+ - lib/AsposeDiagramCloud/models/ellipse_data.rb
251
219
  - lib/AsposeDiagramCloud/models/error.rb
252
220
  - lib/AsposeDiagramCloud/models/error_details.rb
253
221
  - lib/AsposeDiagramCloud/models/file_version.rb
@@ -256,28 +224,38 @@ files:
256
224
  - lib/AsposeDiagramCloud/models/files_upload_result.rb
257
225
  - lib/AsposeDiagramCloud/models/html_save_options.rb
258
226
  - lib/AsposeDiagramCloud/models/image_save_options.rb
227
+ - lib/AsposeDiagramCloud/models/line_data.rb
259
228
  - lib/AsposeDiagramCloud/models/modify_response.rb
260
229
  - lib/AsposeDiagramCloud/models/object_exist.rb
230
+ - lib/AsposeDiagramCloud/models/page_data.rb
231
+ - lib/AsposeDiagramCloud/models/page_setting.rb
261
232
  - lib/AsposeDiagramCloud/models/page_size.rb
262
233
  - lib/AsposeDiagramCloud/models/pdf_digital_signature_details.rb
263
234
  - lib/AsposeDiagramCloud/models/pdf_encryption_details.rb
264
235
  - lib/AsposeDiagramCloud/models/pdf_save_options.rb
265
236
  - lib/AsposeDiagramCloud/models/point_f.rb
237
+ - lib/AsposeDiagramCloud/models/polyline_data.rb
266
238
  - lib/AsposeDiagramCloud/models/rectangle_f.rb
267
239
  - lib/AsposeDiagramCloud/models/rendering_save_options.rb
268
240
  - lib/AsposeDiagramCloud/models/saa_spose_response.rb
269
241
  - lib/AsposeDiagramCloud/models/save_as_response.rb
270
242
  - lib/AsposeDiagramCloud/models/save_options_model.rb
271
243
  - lib/AsposeDiagramCloud/models/save_options_request.rb
244
+ - lib/AsposeDiagramCloud/models/shape_data.rb
245
+ - lib/AsposeDiagramCloud/models/shape_style_data.rb
272
246
  - lib/AsposeDiagramCloud/models/storage_exist.rb
273
247
  - lib/AsposeDiagramCloud/models/storage_file.rb
274
248
  - lib/AsposeDiagramCloud/models/svg_save_options.rb
275
249
  - lib/AsposeDiagramCloud/models/swf_save_options.rb
250
+ - lib/AsposeDiagramCloud/models/text_style_data.rb
276
251
  - lib/AsposeDiagramCloud/models/upload_response.rb
277
252
  - lib/AsposeDiagramCloud/models/xaml_save_options.rb
278
253
  - lib/AsposeDiagramCloud/models/xps_save_options.rb
279
254
  - lib/AsposeDiagramCloud/version.rb
255
+ - spec/_spec.rb
280
256
  - spec/api/test_convert_spec.rb
257
+ - spec/api/test_drawing_spec.rb
258
+ - spec/api/test_page_spec.rb
281
259
  - spec/api_client_spec.rb
282
260
  - spec/configuration_spec.rb
283
261
  - spec/spec_helper.rb
@@ -308,6 +286,9 @@ specification_version: 4
308
286
  summary: Aspose.Diagram Cloud API
309
287
  test_files:
310
288
  - spec/api/test_convert_spec.rb
289
+ - spec/api/test_drawing_spec.rb
290
+ - spec/api/test_page_spec.rb
311
291
  - spec/api_client_spec.rb
312
292
  - spec/configuration_spec.rb
313
293
  - spec/spec_helper.rb
294
+ - spec/_spec.rb
@@ -1,15 +0,0 @@
1
- # AsposeDiagramCloud::AccessTokenResponse
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **_expires** | **String** | | [optional]
7
- **access_token** | **String** | | [optional]
8
- **_issued** | **String** | | [optional]
9
- **client_refresh_token_life_time_in_minutes** | **String** | | [optional]
10
- **expires_in** | **Integer** | | [optional]
11
- **token_type** | **String** | | [optional]
12
- **client_id** | **String** | | [optional]
13
- **refresh_token** | **String** | | [optional]
14
-
15
-
@@ -1,8 +0,0 @@
1
- # AsposeDiagramCloud::CreateNewResponse
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **created** | **String** | | [optional]
7
-
8
-
@@ -1,241 +0,0 @@
1
- # AsposeDiagramCloud::DiagramApi
2
-
3
- All URIs are relative to *https://api.aspose.cloud/v3.0*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**convert_document**](DiagramApi.md#convert_document) | **PUT** /diagram/{name}/convert | Converts document from the request's content to the specified format.
8
- [**create_new**](DiagramApi.md#create_new) | **PUT** /diagram/{name} | Create Empty file into the specified format.
9
- [**download_file_with_format**](DiagramApi.md#download_file_with_format) | **GET** /diagram/{name} | Exports the document into the specified format.
10
- [**save_as**](DiagramApi.md#save_as) | **POST** /diagram/{name}/saveAs | Converts document to destination format with detailed settings and saves result to storage.
11
-
12
-
13
- # **convert_document**
14
- > File convert_document(name, file, opts)
15
-
16
- Converts document from the request's content to the specified format.
17
-
18
- ### Example
19
- ```ruby
20
- # load the gem
21
- require 'AsposeDiagramCloud'
22
- # setup authorization
23
- AsposeDiagramCloud.configure do |config|
24
- # Configure OAuth2 access token for authorization: JWT
25
- config.access_token = 'YOUR ACCESS TOKEN'
26
- end
27
-
28
- api_instance = AsposeDiagramCloud::DiagramApi.new
29
-
30
- name = "name_example" # String | Download document name.
31
-
32
- file = File.new("/path/to/file.txt") # File | File to upload
33
-
34
- opts = {
35
- source_filename: "source_filename_example" # String | Source document name.
36
- }
37
-
38
- begin
39
- #Converts document from the request's content to the specified format.
40
- result = api_instance.convert_document(name, file, opts)
41
- p result
42
- rescue AsposeDiagramCloud::ApiError => e
43
- puts "Exception when calling DiagramApi->convert_document: #{e}"
44
- end
45
- ```
46
-
47
- ### Parameters
48
-
49
- Name | Type | Description | Notes
50
- ------------- | ------------- | ------------- | -------------
51
- **name** | **String**| Download document name. |
52
- **file** | **File**| File to upload |
53
- **source_filename** | **String**| Source document name. | [optional]
54
-
55
- ### Return type
56
-
57
- **File**
58
-
59
- ### Authorization
60
-
61
- [JWT](../README.md#JWT)
62
-
63
- ### HTTP request headers
64
-
65
- - **Content-Type**: multipart/form-data
66
- - **Accept**: multipart/form-data
67
-
68
-
69
-
70
- # **create_new**
71
- > CreateNewResponse create_new(name, opts)
72
-
73
- Create Empty file into the specified format.
74
-
75
- ### Example
76
- ```ruby
77
- # load the gem
78
- require 'AsposeDiagramCloud'
79
- # setup authorization
80
- AsposeDiagramCloud.configure do |config|
81
- # Configure OAuth2 access token for authorization: JWT
82
- config.access_token = 'YOUR ACCESS TOKEN'
83
- end
84
-
85
- api_instance = AsposeDiagramCloud::DiagramApi.new
86
-
87
- name = "name_example" # String | The document name.
88
-
89
- opts = {
90
- folder: "folder_example", # String | The document folder.
91
- is_overwrite: false # BOOLEAN | If true overwrite the same name file.The default value is false
92
- }
93
-
94
- begin
95
- #Create Empty file into the specified format.
96
- result = api_instance.create_new(name, opts)
97
- p result
98
- rescue AsposeDiagramCloud::ApiError => e
99
- puts "Exception when calling DiagramApi->create_new: #{e}"
100
- end
101
- ```
102
-
103
- ### Parameters
104
-
105
- Name | Type | Description | Notes
106
- ------------- | ------------- | ------------- | -------------
107
- **name** | **String**| The document name. |
108
- **folder** | **String**| The document folder. | [optional]
109
- **is_overwrite** | **BOOLEAN**| If true overwrite the same name file.The default value is false | [optional] [default to false]
110
-
111
- ### Return type
112
-
113
- [**CreateNewResponse**](CreateNewResponse.md)
114
-
115
- ### Authorization
116
-
117
- [JWT](../README.md#JWT)
118
-
119
- ### HTTP request headers
120
-
121
- - **Content-Type**: application/json
122
- - **Accept**: application/json
123
-
124
-
125
-
126
- # **download_file_with_format**
127
- > File download_file_with_format(name, format, opts)
128
-
129
- Exports the document into the specified format.
130
-
131
- ### Example
132
- ```ruby
133
- # load the gem
134
- require 'AsposeDiagramCloud'
135
- # setup authorization
136
- AsposeDiagramCloud.configure do |config|
137
- # Configure OAuth2 access token for authorization: JWT
138
- config.access_token = 'YOUR ACCESS TOKEN'
139
- end
140
-
141
- api_instance = AsposeDiagramCloud::DiagramApi.new
142
-
143
- name = "name_example" # String | The document name.
144
-
145
- format = "format_example" # String | The destination format.
146
-
147
- opts = {
148
- folder: "folder_example" # String | Original document folder.
149
- }
150
-
151
- begin
152
- #Exports the document into the specified format.
153
- result = api_instance.download_file_with_format(name, format, opts)
154
- p result
155
- rescue AsposeDiagramCloud::ApiError => e
156
- puts "Exception when calling DiagramApi->download_file_with_format: #{e}"
157
- end
158
- ```
159
-
160
- ### Parameters
161
-
162
- Name | Type | Description | Notes
163
- ------------- | ------------- | ------------- | -------------
164
- **name** | **String**| The document name. |
165
- **format** | **String**| The destination format. |
166
- **folder** | **String**| Original document folder. | [optional]
167
-
168
- ### Return type
169
-
170
- **File**
171
-
172
- ### Authorization
173
-
174
- [JWT](../README.md#JWT)
175
-
176
- ### HTTP request headers
177
-
178
- - **Content-Type**: application/json
179
- - **Accept**: multipart/form-data
180
-
181
-
182
-
183
- # **save_as**
184
- > SaveAsResponse save_as(name, save_options_request, opts)
185
-
186
- Converts document to destination format with detailed settings and saves result to storage.
187
-
188
- ### Example
189
- ```ruby
190
- # load the gem
191
- require 'AsposeDiagramCloud'
192
- # setup authorization
193
- AsposeDiagramCloud.configure do |config|
194
- # Configure OAuth2 access token for authorization: JWT
195
- config.access_token = 'YOUR ACCESS TOKEN'
196
- end
197
-
198
- api_instance = AsposeDiagramCloud::DiagramApi.new
199
-
200
- name = "name_example" # String | Original document name.
201
-
202
- save_options_request = AsposeDiagramCloud::SaveOptionsRequest.new # SaveOptionsRequest | Save options.
203
-
204
- opts = {
205
- folder: "folder_example", # String | Original document folder.
206
- is_overwrite: false # BOOLEAN | If true overwrite the same name file.The default value is false
207
- }
208
-
209
- begin
210
- #Converts document to destination format with detailed settings and saves result to storage.
211
- result = api_instance.save_as(name, save_options_request, opts)
212
- p result
213
- rescue AsposeDiagramCloud::ApiError => e
214
- puts "Exception when calling DiagramApi->save_as: #{e}"
215
- end
216
- ```
217
-
218
- ### Parameters
219
-
220
- Name | Type | Description | Notes
221
- ------------- | ------------- | ------------- | -------------
222
- **name** | **String**| Original document name. |
223
- **save_options_request** | [**SaveOptionsRequest**](SaveOptionsRequest.md)| Save options. |
224
- **folder** | **String**| Original document folder. | [optional]
225
- **is_overwrite** | **BOOLEAN**| If true overwrite the same name file.The default value is false | [optional] [default to false]
226
-
227
- ### Return type
228
-
229
- [**SaveAsResponse**](SaveAsResponse.md)
230
-
231
- ### Authorization
232
-
233
- [JWT](../README.md#JWT)
234
-
235
- ### HTTP request headers
236
-
237
- - **Content-Type**: application/json
238
- - **Accept**: application/json
239
-
240
-
241
-