aspose_html 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +12 -0
  3. data/Gemfile.lock +92 -0
  4. data/LICENSE +21 -0
  5. data/README.md +181 -0
  6. data/Rakefile +8 -0
  7. data/aspose_html.gemspec +58 -0
  8. data/docs/ConversionApi.md +837 -0
  9. data/docs/DocumentApi.md +386 -0
  10. data/docs/OcrApi.md +128 -0
  11. data/docs/SummarizationApi.md +111 -0
  12. data/docs/TranslationApi.md +126 -0
  13. data/docs/storage/DiscUsage.md +9 -0
  14. data/docs/storage/DiscUsageResponse.md +10 -0
  15. data/docs/storage/FileApi.md +240 -0
  16. data/docs/storage/FileDetail.md +13 -0
  17. data/docs/storage/FileDetailsResponse.md +10 -0
  18. data/docs/storage/FileExist.md +9 -0
  19. data/docs/storage/FileExistResponse.md +10 -0
  20. data/docs/storage/FileVersion.md +15 -0
  21. data/docs/storage/FileVersionsResponse.md +10 -0
  22. data/docs/storage/FolderApi.md +229 -0
  23. data/docs/storage/MessageResponse.md +9 -0
  24. data/docs/storage/MoveFileResponse.md +9 -0
  25. data/docs/storage/MoveFolderResponse.md +9 -0
  26. data/docs/storage/RemoveFileResponse.md +9 -0
  27. data/docs/storage/RemoveFolderResponse.md +9 -0
  28. data/docs/storage/StorageApi.md +217 -0
  29. data/docs/storage/StorageExistResponse.md +10 -0
  30. data/lib/aspose_html.rb +68 -0
  31. data/lib/aspose_html/api/html_api.rb +1900 -0
  32. data/lib/aspose_html/api/storage_api.rb +774 -0
  33. data/lib/aspose_html/api_client.rb +386 -0
  34. data/lib/aspose_html/api_error.rb +54 -0
  35. data/lib/aspose_html/configuration.rb +175 -0
  36. data/lib/aspose_html/models/disc_usage.rb +223 -0
  37. data/lib/aspose_html/models/disc_usage_response.rb +260 -0
  38. data/lib/aspose_html/models/file_detail.rb +254 -0
  39. data/lib/aspose_html/models/file_details_response.rb +262 -0
  40. data/lib/aspose_html/models/file_exist.rb +223 -0
  41. data/lib/aspose_html/models/file_exist_response.rb +274 -0
  42. data/lib/aspose_html/models/file_version.rb +273 -0
  43. data/lib/aspose_html/models/file_versions_response.rb +262 -0
  44. data/lib/aspose_html/models/message_response.rb +251 -0
  45. data/lib/aspose_html/models/move_file_response.rb +251 -0
  46. data/lib/aspose_html/models/move_folder_response.rb +251 -0
  47. data/lib/aspose_html/models/remove_file_response.rb +251 -0
  48. data/lib/aspose_html/models/remove_folder_response.rb +251 -0
  49. data/lib/aspose_html/models/storage_exist_response.rb +260 -0
  50. data/lib/aspose_html/version.rb +31 -0
  51. data/spec/api/html_api_spec.rb +971 -0
  52. data/spec/api/model_spec.rb +622 -0
  53. data/spec/api/storage_api_spec.rb +596 -0
  54. data/spec/spec_helper.rb +169 -0
  55. data/testdata/test.txt +1 -0
  56. data/testdata/test1.html +19 -0
  57. data/testdata/test1.html.zip +0 -0
  58. data/testdata/test2.html +46 -0
  59. data/testdata/test2.html.zip +0 -0
  60. data/testdata/test3.html.zip +0 -0
  61. data/testdata/test4.html.zip +0 -0
  62. data/testdata/test_download.jpg +0 -0
  63. data/testdata/test_en.html +46 -0
  64. data/testdata/test_for_delete.html +46 -0
  65. data/testdata/test_for_move.html +46 -0
  66. data/testdata/test_get_doc.zip +0 -0
  67. data/testdata/test_ocr.jpg +0 -0
  68. data/testdata/test_ocr.png +0 -0
  69. data/testdata/test_put_create.html +19 -0
  70. data/testdata/test_put_create.jpg +0 -0
  71. data/testresult/Convert_html.bmp +0 -0
  72. data/testresult/Convert_html.pdf +0 -0
  73. data/testresult/Convert_html.xps +0 -0
  74. data/testresult/Convert_url.pdf +0 -0
  75. data/testresult/Convert_url.png +0 -0
  76. data/testresult/Convert_url.xps +0 -0
  77. data/testresult/Get_document.zip +0 -0
  78. data/testresult/Get_fragment_css_by_url.html +447 -0
  79. data/testresult/Get_fragment_doc.html +9 -0
  80. data/testresult/Get_fragment_doc_css.html +9 -0
  81. data/testresult/Get_fragment_xpath_by_url.html +38 -0
  82. data/testresult/Get_images_doc.zip +0 -0
  83. data/testresult/Get_images_from_url.zip +0 -0
  84. data/testresult/Keyword_by_doc.json +1 -0
  85. data/testresult/Keyword_by_url.json +1 -0
  86. data/testresult/Recognize_en_png.html +10 -0
  87. data/testresult/Translate_url_en_fr.zip +0 -0
  88. data/testresult/putTest.pdf +0 -0
  89. data/testresult/putTest.png +0 -0
  90. data/testresult/putTest.xps +0 -0
  91. data/testresult/putTestDoc.pdf +0 -0
  92. data/testresult/putTestDoc.tiff +0 -0
  93. data/testresult/putTestDoc.xps +0 -0
  94. data/testresult/test_download.jpg +0 -0
  95. metadata +320 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b61476d68f2e73fdbc0a4fe979c8de03469832ec087c1e75ccba054927836b63
4
+ data.tar.gz: 2c7c1e6859955d5746523bd118dff17661f28a090a8fe1bd6c0dfeb052d5e0c1
5
+ SHA512:
6
+ metadata.gz: 9b1018e7daf44fa32b418a47497009f7aff717484982bb057e5d3e3d2469cd3d2ecb36188c83587b6537124c8a5996766ee724afe174c30a2f72c7dbcf1e48c9
7
+ data.tar.gz: b3b7b01834022c89a5d1137a1b5c09d73c32128e3b089bbc3ad7edd6f09b8211547c4ed5b29f098b040578f0367ddfe2b0c6ab96eda2faa21604b142db6299c2
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+
8
+ # Checks ruby code grammar
9
+ gem 'rubocop', require: false
10
+ # With rspec
11
+ gem 'rubocop-rspec'
12
+ end
@@ -0,0 +1,92 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ aspose_html (1.0.0)
5
+ json (~> 2.1, >= 2.1.0)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ZenTest (4.11.1)
12
+ addressable (2.5.2)
13
+ public_suffix (>= 2.0.2, < 4.0)
14
+ ast (2.4.0)
15
+ autotest (4.4.6)
16
+ ZenTest (>= 4.4.1)
17
+ autotest-fsevent (0.2.13)
18
+ sys-uname
19
+ autotest-growl (0.2.16)
20
+ autotest-rails-pure (4.1.2)
21
+ crack (0.4.3)
22
+ safe_yaml (~> 1.0.0)
23
+ diff-lcs (1.3)
24
+ ethon (0.11.0)
25
+ ffi (>= 1.3.0)
26
+ faraday (0.14.0)
27
+ multipart-post (>= 1.2, < 3)
28
+ ffi (1.9.23-x64-mingw32)
29
+ hashdiff (0.3.7)
30
+ json (2.1.0)
31
+ mimemagic (0.3.2)
32
+ multipart-post (2.0.0)
33
+ parallel (1.12.1)
34
+ parser (2.5.1.0)
35
+ ast (~> 2.4.0)
36
+ powerpack (0.1.1)
37
+ public_suffix (3.0.2)
38
+ rainbow (3.0.0)
39
+ rake (12.0.0)
40
+ rspec (3.7.0)
41
+ rspec-core (~> 3.7.0)
42
+ rspec-expectations (~> 3.7.0)
43
+ rspec-mocks (~> 3.7.0)
44
+ rspec-core (3.7.1)
45
+ rspec-support (~> 3.7.0)
46
+ rspec-expectations (3.7.0)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.7.0)
49
+ rspec-mocks (3.7.0)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.7.0)
52
+ rspec-support (3.7.1)
53
+ rubocop (0.56.0)
54
+ parallel (~> 1.10)
55
+ parser (>= 2.5)
56
+ powerpack (~> 0.1)
57
+ rainbow (>= 2.2.2, < 4.0)
58
+ ruby-progressbar (~> 1.7)
59
+ unicode-display_width (~> 1.0, >= 1.0.1)
60
+ rubocop-rspec (1.25.1)
61
+ rubocop (>= 0.53.0)
62
+ ruby-progressbar (1.9.0)
63
+ safe_yaml (1.0.4)
64
+ sys-uname (1.0.3)
65
+ ffi (>= 1.0.0)
66
+ typhoeus (1.3.0)
67
+ ethon (>= 0.9.0)
68
+ unicode-display_width (1.3.2)
69
+ vcr (3.0.3)
70
+ webmock (1.24.6)
71
+ addressable (>= 2.3.6)
72
+ crack (>= 0.3.2)
73
+ hashdiff
74
+
75
+ PLATFORMS
76
+ x64-mingw32
77
+
78
+ DEPENDENCIES
79
+ aspose_html!
80
+ autotest (~> 4.4, >= 4.4.6)
81
+ autotest-fsevent (~> 0.2, >= 0.2.12)
82
+ autotest-growl (~> 0.2, >= 0.2.16)
83
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
84
+ rake (~> 12.0.0)
85
+ rspec (~> 3.6, >= 3.6.0)
86
+ rubocop
87
+ rubocop-rspec
88
+ vcr (~> 3.0, >= 3.0.1)
89
+ webmock (~> 1.24, >= 1.24.3)
90
+
91
+ BUNDLED WITH
92
+ 1.16.1
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Aspose Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,181 @@
1
+ # Aspose HTML Cloud SDK
2
+
3
+ AsposeHtml - the Ruby gem for the Aspose.HTML for Cloud API Reference
4
+
5
+ - API version: 1.1
6
+ - Package version: 1.0.0
7
+
8
+ ## Requirements
9
+ - Ruby >= 1.9
10
+ - libcurl.dll (libcurl.so)
11
+
12
+ ## Installation
13
+
14
+ ### Build a gem
15
+
16
+ To build the Ruby code into a gem:
17
+
18
+ ```shell
19
+ gem build aspose_html.gemspec
20
+ ```
21
+
22
+ Then either install the gem locally:
23
+
24
+ ```shell
25
+ gem install ./aspose_html-1.0.0.gem
26
+ ```
27
+ (for development, run `gem install --dev ./aspose_html-1.0.0.gem` to install the development dependencies)
28
+
29
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
30
+
31
+ Finally add this to the Gemfile:
32
+
33
+ gem 'aspose_html', '~> 1.0.0'
34
+
35
+ ### Load from git
36
+
37
+ git clone https://github.com/aspose-html-cloud/aspose-html-cloud-ruby.git
38
+ cd aspose-html-cloud-ruby
39
+
40
+ ### Install from Git
41
+
42
+ If the Ruby gem is hosted at a git repository: https://github.com/aspose-html-cloud/aspose-html-cloud-ruby.git, then add the following in the Gemfile:
43
+
44
+ gem 'aspose_html', :git => 'https://github.com/aspose-html-cloud/aspose-html-cloud-ruby.git'
45
+
46
+ ### Include the Ruby code directly
47
+
48
+ Include the Ruby code directly using `-I` as follows:
49
+
50
+ ```shell
51
+ ruby -Ilib script.rb
52
+ ```
53
+
54
+ ## Getting Started
55
+
56
+ Please follow the [installation](#installation) procedure and then run the following code:
57
+ ```ruby
58
+ # Load the gem
59
+ require 'aspose_html'
60
+
61
+
62
+ CONFIG = {
63
+ "basePath":"https://api.aspose.cloud/v1.1",
64
+ "authPath":"https://api.aspose.cloud/oauth2/token",
65
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
66
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
67
+ "debug":true
68
+ }
69
+
70
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
71
+
72
+ name = "test.html" # String | Document name.
73
+
74
+ out_format = "png" # String | Resulting image format.
75
+
76
+ opts = {
77
+ width: 800, # Integer | Resulting image width.
78
+ height: 1000, # Integer | Resulting image height.
79
+ left_margin: 10, # Integer | Left resulting image margin.
80
+ right_margin: 10, # Integer | Right resulting image margin.
81
+ top_margin: 20, # Integer | Top resulting image margin.
82
+ bottom_margin: 20, # Integer | Bottom resulting image margin.
83
+ x_resolution: 300, # Integer | Horizontal resolution of resulting image.
84
+ y_resolution: 300, # Integer | Vertical resolution of resulting image.
85
+ folder: "/", # String | The source document folder.
86
+ storage: nil # String | The source document storage.
87
+ }
88
+
89
+ begin
90
+ #Convert the HTML document from the storage by its name to the specified image format.
91
+ result = api_instance.get_convert_document_to_image(name, out_format, opts)
92
+ p result
93
+ rescue AsposeHtml::ApiError => e
94
+ puts "Exception when calling HtmlApi->get_convert_document_to_image: #{e}"
95
+ end
96
+
97
+ ```
98
+
99
+ ## Documentation for API Endpoints
100
+
101
+ All URIs are relative to *https://api.aspose.cloud/v1.1*
102
+
103
+ Class | Method | HTTP request | Description
104
+ ------------ | ------------- | ------------- | -------------
105
+ *AsposeHtml::HtmlApi* | [**get_convert_document_to_image**](docs/ConversionApi.md#get_convert_document_to_image) | **GET** /html/{name}/convert/image/{outFormat} | Convert the HTML document from the storage by its name to the specified image format.
106
+ *AsposeHtml::HtmlApi* | [**get_convert_document_to_image_by_url**](docs/ConversionApi.md#get_convert_document_to_image_by_url) | **GET** /html/convert/image/{outFormat} | Convert the HTML page from the web by its URL to the specified image format.
107
+ *AsposeHtml::HtmlApi* | [**get_convert_document_to_pdf**](docs/ConversionApi.md#get_convert_document_to_pdf) | **GET** /html/{name}/convert/pdf | Convert the HTML document from the storage by its name to PDF.
108
+ *AsposeHtml::HtmlApi* | [**get_convert_document_to_pdf_by_url**](docs/ConversionApi.md#get_convert_document_to_pdf_by_url) | **GET** /html/convert/pdf | Convert the HTML page from the web by its URL to PDF.
109
+ *AsposeHtml::HtmlApi* | [**get_convert_document_to_xps**](docs/ConversionApi.md#get_convert_document_to_xps) | **GET** /html/{name}/convert/xps | Convert the HTML document from the storage by its name to XPS.
110
+ *AsposeHtml::HtmlApi* | [**get_convert_document_to_xps_by_url**](docs/ConversionApi.md#get_convert_document_to_xps_by_url) | **GET** /html/convert/xps | Convert the HTML page from the web by its URL to XPS.
111
+ *AsposeHtml::HtmlApi* | [**put_convert_document_in_request_to_image**](docs/ConversionApi.md#put_convert_document_in_request_to_image) | **PUT** /html/convert/image/{outFormat} | Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.
112
+ *AsposeHtml::HtmlApi* | [**put_convert_document_in_request_to_pdf**](docs/ConversionApi.md#put_convert_document_in_request_to_pdf) | **PUT** /html/convert/pdf | Converts the HTML document (in request content) to PDF and uploads resulting file to storage.
113
+ *AsposeHtml::HtmlApi* | [**put_convert_document_in_request_to_xps**](docs/ConversionApi.md#put_convert_document_in_request_to_xps) | **PUT** /html/convert/xps | Converts the HTML document (in request content) to XPS and uploads resulting file to storage.
114
+ *AsposeHtml::HtmlApi* | [**put_convert_document_to_image**](docs/ConversionApi.md#put_convert_document_to_image) | **PUT** /html/{name}/convert/image/{outFormat} | Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.
115
+ *AsposeHtml::HtmlApi* | [**put_convert_document_to_pdf**](docs/ConversionApi.md#put_convert_document_to_pdf) | **PUT** /html/{name}/convert/pdf | Converts the HTML document (located on storage) to PDF and uploads resulting file to storage.
116
+ *AsposeHtml::HtmlApi* | [**put_convert_document_to_xps**](docs/ConversionApi.md#put_convert_document_to_xps) | **PUT** /html/{name}/convert/xps | Converts the HTML document (located on storage) to XPS and uploads resulting file to storage.
117
+ *AsposeHtml::HtmlApi* | [**get_document**](docs/DocumentApi.md#get_document) | **GET** /html/{name} | Return the HTML document by the name from default or specified storage.
118
+ *AsposeHtml::HtmlApi* | [**get_document_fragment_by_x_path**](docs/DocumentApi.md#get_document_fragment_by_x_path) | **GET** /html/{name}/fragments/{outFormat} | Return list of HTML fragments matching the specified XPath query.
119
+ *AsposeHtml::HtmlApi* | [**get_document_fragment_by_x_path_by_url**](docs/DocumentApi.md#get_document_fragment_by_x_path_by_url) | **GET** /html/fragments/{outFormat} | Return list of HTML fragments matching the specified XPath query by the source page URL.
120
+ *AsposeHtml::HtmlApi* | [**get_document_fragments_by_css_selector**](docs/DocumentApi.md#get_document_fragments_by_css_selector) | **GET** /html/{name}/fragments/css/{outFormat} | Return list of HTML fragments matching the specified CSS selector.
121
+ *AsposeHtml::HtmlApi* | [**get_document_fragments_by_css_selector_by_url**](docs/DocumentApi.md#get_document_fragments_by_css_selector_by_url) | **GET** /html/fragments/css/{outFormat} | Return list of HTML fragments matching the specified CSS selector by the source page URL.
122
+ *AsposeHtml::HtmlApi* | [**get_document_images**](docs/DocumentApi.md#get_document_images) | **GET** /html/{name}/images/all | Return all HTML document images packaged as a ZIP archive.
123
+ *AsposeHtml::HtmlApi* | [**get_document_images_by_url**](docs/DocumentApi.md#get_document_images_by_url) | **GET** /html/images/all | Return all HTML page images packaged as a ZIP archive by the source page URL.
124
+ *AsposeHtml::HtmlApi* | [**get_recognize_and_import_to_html**](docs/OcrApi.md#get_recognize_and_import_to_html) | **GET** /html/{name}/ocr/import | Recognize text from the image file in the storage and import it to HTML format.
125
+ *AsposeHtml::HtmlApi* | [**get_recognize_and_translate_to_html**](docs/OcrApi.md#get_recognize_and_translate_to_html) | **GET** /html/{name}/ocr/translate/{srcLang}/{resLang} | Recognize text from the image file in the storage, import it to HTML format and translate to specified language.
126
+ *AsposeHtml::HtmlApi* | [**get_translate_document**](docs/TranslationApi.md#get_translate_document) | **GET** /html/{name}/translate/{srcLang}/{resLang} | Translate the HTML document specified by the name from default or specified storage.
127
+ *AsposeHtml::HtmlApi* | [**get_translate_document_by_url**](docs/TranslationApi.md#get_translate_document_by_url) | **GET** /html/translate/{srcLang}/{resLang} | Translate the HTML document from Web specified by its URL.
128
+ *AsposeHtml::HtmlApi* | [**get_detect_html_keywords**](docs/SummarizationApi.md#get_detect_html_keywords) | **GET** /html/{name}/summ/keywords | Get the HTML document keywords using the keyword detection service.
129
+ *AsposeHtml::HtmlApi* | [**get_detect_html_keywords_by_url**](docs/SummarizationApi.md#get_detect_html_keywords_by_url) | **GET** /html/summ/keywords | Get the keywords from HTML document from Web specified by its URL using the keyword detection service
130
+
131
+
132
+ ## oauth
133
+
134
+ - **Type**: OAuth
135
+ - **Flow**: application
136
+ - **Authorization URL**: "https://api.aspose.cloud/oauth2/token"
137
+ - **Scopes**: N/A
138
+
139
+ [Tests](./spec/api/html_api_spec.rb) contain various examples of using the Aspose.HTML SDK.
140
+
141
+ [Docs](./docs/) Documentation for Aspose.HTML Api SDK
142
+
143
+ ## Aspose HTML includes Aspose.Storage.Cloud to manipulate files on a remote server. This is used in tests for download test files to the server.
144
+
145
+ Class | Method | HTTP request | Description
146
+ ------------ | ------------- | ------------- | -------------
147
+ *AsposeHtml::StorageApi* | [**delete_file**](docs/storage/FileApi.md#delete_file) | **DELETE** /storage/file | Remove a specific file
148
+ *AsposeHtml::StorageApi* | [**get_download**](docs/storage/FileApi.md#get_download) | **GET** /storage/file | Download a specific file
149
+ *AsposeHtml::StorageApi* | [**post_move_file**](docs/storage/FileApi.md#post_move_file) | **POST** /storage/file | Move a specific file
150
+ *AsposeHtml::StorageApi* | [**put_create**](docs/storage/FileApi.md#put_create) | **PUT** /storage/file | Upload a specific file
151
+ *AsposeHtml::StorageApi* | [**delete_folder**](docs/storage/FolderApi.md#delete_folder) | **DELETE** /storage/folder | Remove a specific folder
152
+ *AsposeHtml::StorageApi* | [**get_list_files**](docs/storage/FolderApi.md#get_list_files) | **GET** /storage/folder | Get the file listing of a specific folder
153
+ *AsposeHtml::StorageApi* | [**post_move_folder**](docs/storage/FolderApi.md#post_move_folder) | **POST** /storage/folder | Move a specific folder
154
+ *AsposeHtml::StorageApi* | [**put_create_folder**](docs/storage/FolderApi.md#put_create_folder) | **PUT** /storage/folder | Create the folder
155
+ *AsposeHtml::StorageApi* | [**get_disc_usage**](docs/storage/StorageApi.md#get_disc_usage) | **GET** /storage/disc | Check the disk usage of the current account
156
+ *AsposeHtml::StorageApi* | [**get_is_exist**](docs/storage/StorageApi.md#get_is_exist) | **GET** /storage/exist | Check if a specific file or folder exists
157
+ *AsposeHtml::StorageApi* | [**get_is_storage_exist**](docs/storage/StorageApi.md#get_is_storage_exist) | **GET** /storage/{name}/exist | Check if storage exists
158
+ *AsposeHtml::StorageApi* | [**get_list_file_versions**](docs/storage/StorageApi.md#get_list_file_versions) | **GET** /storage/version | Get the file's versions list
159
+
160
+
161
+ ## Documentation for Models
162
+
163
+ - [AsposeHtml::DiscUsage](docs/storage/DiscUsage.md)
164
+ - [AsposeHtml::File](docs/storage/FileDetail.md)
165
+ - [AsposeHtml::FileExist](docs/storage/FileExist.md)
166
+ - [AsposeHtml::SaaSposeResponse](docs/storage/MessageResponse.md)
167
+ - [AsposeHtml::DiscUsageResponse](docs/storage/DiscUsageResponse.md)
168
+ - [AsposeHtml::FileExistResponse](docs/storage/FileExistResponse.md)
169
+ - [AsposeHtml::FileVersion](docs/storage/FileVersion.md)
170
+ - [AsposeHtml::FileVersionsResponse](docs/storage/FileVersionsResponse.md)
171
+ - [AsposeHtml::MoveFileResponse](docs/storage/MoveFileResponse.md)
172
+ - [AsposeHtml::MoveFolderResponse](docs/storage/MoveFolderResponse.md)
173
+ - [AsposeHtml::RemoveFileResponse](docs/storage/RemoveFileResponse.md)
174
+ - [AsposeHtml::RemoveFolderResponse](docs/storage/RemoveFolderResponse.md)
175
+ - [AsposeHtml::StorageExistResponse](docs/storage/StorageExistResponse.md)
176
+
177
+
178
+
179
+ [Tests](./spec/api/storage_api_spec.rb) contain various examples of using the Aspose.Storage SDK.
180
+
181
+ [Docs](docs/storage/) Documentation for Aspose.Storage Api SDK
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,58 @@
1
+
2
+ =begin
3
+ --------------------------------------------------------------------------------------------------------------------
4
+ <copyright company="Aspose" file="aspose_html.gemspec">
5
+ </copyright>
6
+ Copyright (c) 2018 Aspose.HTML for Cloud
7
+ <summary>
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+ </summary>
26
+ --------------------------------------------------------------------------------------------------------------------
27
+ =end
28
+
29
+ $:.push File.expand_path("../lib", __FILE__)
30
+ require "aspose_html/version"
31
+
32
+ Gem::Specification.new do |s|
33
+ s.name = "aspose_html"
34
+ s.version = AsposeHtml::VERSION
35
+ s.platform = Gem::Platform::RUBY
36
+ s.authors = "Aspose"
37
+ s.homepage = "https://www.aspose.com"
38
+ s.summary = "A ruby wrapper for the Aspose.HTML Cloud SDK API."
39
+ s.description = "This repository contains Aspose.HTML Cloud SDK for ruby source code."
40
+ s.license = "MIT"
41
+ s.required_ruby_version = ">= 1.9"
42
+
43
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
44
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
45
+
46
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
47
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
48
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
49
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
50
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
51
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
52
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
53
+
54
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
55
+ s.test_files = `find spec/*`.split("\n")
56
+ s.executables = []
57
+ s.require_paths = ["lib"]
58
+ end
@@ -0,0 +1,837 @@
1
+ # Conversion API
2
+
3
+ All URIs are relative to *https://api.aspose.cloud/v1.1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_convert_document_to_image**](ConversionApi.md#get_convert_document_to_image) | **GET** /html/{name}/convert/image/{outFormat} | Convert the HTML document from the storage by its name to the specified image format.
8
+ [**get_convert_document_to_image_by_url**](ConversionApi.md#get_convert_document_to_image_by_url) | **GET** /html/convert/image/{outFormat} | Convert the HTML page from the web by its URL to the specified image format.
9
+ [**get_convert_document_to_pdf**](ConversionApi.md#get_convert_document_to_pdf) | **GET** /html/{name}/convert/pdf | Convert the HTML document from the storage by its name to PDF.
10
+ [**get_convert_document_to_pdf_by_url**](ConversionApi.md#get_convert_document_to_pdf_by_url) | **GET** /html/convert/pdf | Convert the HTML page from the web by its URL to PDF.
11
+ [**get_convert_document_to_xps**](ConversionApi.md#get_convert_document_to_xps) | **GET** /html/{name}/convert/xps | Convert the HTML document from the storage by its name to XPS.
12
+ [**get_convert_document_to_xps_by_url**](ConversionApi.md#get_convert_document_to_xps_by_url) | **GET** /html/convert/xps | Convert the HTML page from the web by its URL to XPS.
13
+ [**put_convert_document_in_request_to_image**](ConversionApi.md#put_convert_document_in_request_to_image) | **PUT** /html/convert/image/{outFormat} | Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.
14
+ [**put_convert_document_in_request_to_pdf**](ConversionApi.md#put_convert_document_in_request_to_pdf) | **PUT** /html/convert/pdf | Converts the HTML document (in request content) to PDF and uploads resulting file to storage.
15
+ [**put_convert_document_in_request_to_xps**](ConversionApi.md#put_convert_document_in_request_to_xps) | **PUT** /html/convert/xps | Converts the HTML document (in request content) to XPS and uploads resulting file to storage.
16
+ [**put_convert_document_to_image**](ConversionApi.md#put_convert_document_to_image) | **PUT** /html/{name}/convert/image/{outFormat} | Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.
17
+ [**put_convert_document_to_pdf**](ConversionApi.md#put_convert_document_to_pdf) | **PUT** /html/{name}/convert/pdf | Converts the HTML document (located on storage) to PDF and uploads resulting file to storage.
18
+ [**put_convert_document_to_xps**](ConversionApi.md#put_convert_document_to_xps) | **PUT** /html/{name}/convert/xps | Converts the HTML document (located on storage) to XPS and uploads resulting file to storage.
19
+
20
+
21
+ # **get_convert_document_to_image**
22
+ > Hash get_convert_document_to_image(name, out_format, opts)
23
+
24
+ Convert the HTML document from the storage by its name to the specified image format.
25
+
26
+ ### Example
27
+ ```ruby
28
+ # load the gem
29
+ require 'aspose_html'
30
+
31
+ CONFIG = {
32
+ "basePath":"https://api.aspose.cloud/v1.1",
33
+ "authPath":"https://api.aspose.cloud/oauth2/token",
34
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
35
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
36
+ "debug":true
37
+ }
38
+
39
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
40
+
41
+ name = "test.html" # String | Document name.
42
+
43
+ out_format = "bmp" # String | Resulting image format.
44
+
45
+ opts = {
46
+ width: 800, # Integer | Resulting image width.
47
+ height: 1000, # Integer | Resulting image height.
48
+ left_margin: 10, # Integer | Left resulting image margin.
49
+ right_margin: 10, # Integer | Right resulting image margin.
50
+ top_margin: 10, # Integer | Top resulting image margin.
51
+ bottom_margin: 10, # Integer | Bottom resulting image margin.
52
+ x_resolution: 300, # Integer | Horizontal resolution of resulting image.
53
+ y_resolution: 300, # Integer | Vertical resolution of resulting image.
54
+ folder: "folder_example", # String | The source document folder.
55
+ storage: "storage_example" # String | The source document storage.
56
+ }
57
+
58
+ begin
59
+ #Convert the HTML document from the storage by its name to the specified image format.
60
+ result = api_instance.get_convert_document_to_image(name, out_format, opts)
61
+ p result
62
+ rescue AsposeHtml::ApiError => e
63
+ puts "Exception when calling HtmlApi->get_convert_document_to_image: #{e}"
64
+ end
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ Name | Type | Description | Notes
70
+ ------------- | ------------- | ------------- | -------------
71
+ **name** | **String**| Document name. |
72
+ **out_format** | **String**| Resulting image format. |
73
+ **width** | **Integer**| Resulting image width. | [optional]
74
+ **height** | **Integer**| Resulting image height. | [optional]
75
+ **left_margin** | **Integer**| Left resulting image margin. | [optional]
76
+ **right_margin** | **Integer**| Right resulting image margin. | [optional]
77
+ **top_margin** | **Integer**| Top resulting image margin. | [optional]
78
+ **bottom_margin** | **Integer**| Bottom resulting image margin. | [optional]
79
+ **x_resolution** | **Integer**| Horizontal resolution of resulting image. | [optional]
80
+ **y_resolution** | **Integer**| Vertical resolution of resulting image. | [optional]
81
+ **folder** | **String**| The source document folder. | [optional]
82
+ **storage** | **String**| The source document storage. | [optional]
83
+
84
+ ### Return type
85
+
86
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
87
+
88
+ ### HTTP request headers
89
+
90
+ - **Content-Type**: application/json
91
+ - **Accept**: multipart/form-data
92
+
93
+
94
+ # **get_convert_document_to_image_by_url**
95
+ > Hash get_convert_document_to_image_by_url(source_url, out_format, opts)
96
+
97
+ Convert the HTML page from the web by its URL to the specified image format.
98
+
99
+ ### Example
100
+ ```ruby
101
+ # load the gem
102
+ require 'aspose_html'
103
+
104
+ CONFIG = {
105
+ "basePath":"https://api.aspose.cloud/v1.1",
106
+ "authPath":"https://api.aspose.cloud/oauth2/token",
107
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
108
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
109
+ "debug":true
110
+ }
111
+
112
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
113
+
114
+ source_url = "http://www.google.com" # String | Source page URL.
115
+
116
+ out_format = "tiff" # String | Resulting image format.
117
+
118
+ opts = {
119
+ width: 700, # Integer | Resulting image width.
120
+ height: 1000, # Integer | Resulting image height.
121
+ left_margin: 40, # Integer | Left resulting image margin.
122
+ right_margin: 40, # Integer | Right resulting image margin.
123
+ top_margin: 50, # Integer | Top resulting image margin.
124
+ bottom_margin: 50, # Integer | Bottom resulting image margin.
125
+ x_resolution: 150, # Integer | Horizontal resolution of resulting image.
126
+ y_resolution: 150, # Integer | Vertical resolution of resulting image.
127
+ folder: "remote_folder", # String | The document folder.
128
+ storage: "remote_storage" # String | The document storage.
129
+ }
130
+
131
+ begin
132
+ #Convert the HTML page from the web by its URL to the specified image format.
133
+ result = api_instance.get_convert_document_to_image_by_url(source_url, out_format, opts)
134
+ p result
135
+ rescue AsposeHtml::ApiError => e
136
+ puts "Exception when calling HtmlApi->get_convert_document_to_image_by_url: #{e}"
137
+ end
138
+ ```
139
+
140
+ ### Parameters
141
+
142
+ Name | Type | Description | Notes
143
+ ------------- | ------------- | ------------- | -------------
144
+ **source_url** | **String**| Source page URL. |
145
+ **out_format** | **String**| Resulting image format. |
146
+ **width** | **Integer**| Resulting image width. | [optional]
147
+ **height** | **Integer**| Resulting image height. | [optional]
148
+ **left_margin** | **Integer**| Left resulting image margin. | [optional]
149
+ **right_margin** | **Integer**| Right resulting image margin. | [optional]
150
+ **top_margin** | **Integer**| Top resulting image margin. | [optional]
151
+ **bottom_margin** | **Integer**| Bottom resulting image margin. | [optional]
152
+ **x_resolution** | **Integer**| Horizontal resolution of resulting image. | [optional]
153
+ **y_resolution** | **Integer**| Vertical resolution of resulting image. | [optional]
154
+ **folder** | **String**| The document folder. | [optional]
155
+ **storage** | **String**| The document storage. | [optional]
156
+
157
+ ### Return type
158
+
159
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
160
+
161
+ ### HTTP request headers
162
+
163
+ - **Content-Type**: application/json
164
+ - **Accept**: multipart/form-data
165
+
166
+
167
+ # **get_convert_document_to_pdf**
168
+ > Hash get_convert_document_to_pdf(name, opts)
169
+
170
+ Convert the HTML document from the storage by its name to PDF.
171
+
172
+ ### Example
173
+ ```ruby
174
+ # load the gem
175
+ require 'aspose_html'
176
+
177
+ CONFIG = {
178
+ "basePath":"https://api.aspose.cloud/v1.1",
179
+ "authPath":"https://api.aspose.cloud/oauth2/token",
180
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
181
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
182
+ "debug":true
183
+ }
184
+
185
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
186
+
187
+ name = "test.html" # String | Document name.
188
+
189
+ opts = {
190
+ width: 800, # Integer | Resulting image width.
191
+ height: 1000, # Integer | Resulting image height.
192
+ left_margin: 20, # Integer | Left resulting image margin.
193
+ right_margin: 20, # Integer | Right resulting image margin.
194
+ top_margin: 40, # Integer | Top resulting image margin.
195
+ bottom_margin: 50, # Integer | Bottom resulting image margin.
196
+ folder: "remote_folder", # String | The document folder.
197
+ storage: "remote_storage" # String | The document storage.
198
+ }
199
+
200
+ begin
201
+ #Convert the HTML document from the storage by its name to PDF.
202
+ result = api_instance.get_convert_document_to_pdf(name, opts)
203
+ p result
204
+ rescue AsposeHtml::ApiError => e
205
+ puts "Exception when calling HtmlApi->get_convert_document_to_pdf: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ Name | Type | Description | Notes
212
+ ------------- | ------------- | ------------- | -------------
213
+ **name** | **String**| Document name. |
214
+ **width** | **Integer**| Resulting image width. | [optional]
215
+ **height** | **Integer**| Resulting image height. | [optional]
216
+ **left_margin** | **Integer**| Left resulting image margin. | [optional]
217
+ **right_margin** | **Integer**| Right resulting image margin. | [optional]
218
+ **top_margin** | **Integer**| Top resulting image margin. | [optional]
219
+ **bottom_margin** | **Integer**| Bottom resulting image margin. | [optional]
220
+ **folder** | **String**| The document folder. | [optional]
221
+ **storage** | **String**| The document storage. | [optional]
222
+
223
+ ### Return type
224
+
225
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
226
+
227
+ ### HTTP request headers
228
+
229
+ - **Content-Type**: application/json
230
+ - **Accept**: multipart/form-data
231
+
232
+
233
+ # **get_convert_document_to_pdf_by_url**
234
+ > Hash get_convert_document_to_pdf_by_url(source_url, opts)
235
+
236
+ Convert the HTML page from the web by its URL to PDF.
237
+
238
+ ### Example
239
+ ```ruby
240
+ # load the gem
241
+ require 'aspose_html'
242
+
243
+ CONFIG = {
244
+ "basePath":"https://api.aspose.cloud/v1.1",
245
+ "authPath":"https://api.aspose.cloud/oauth2/token",
246
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
247
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
248
+ "debug":true
249
+ }
250
+
251
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
252
+
253
+ source_url = "https://www.yahoo.com" # String | Source page URL.
254
+
255
+ opts = {
256
+ width: 800, # Integer | Resulting image width.
257
+ height: 1000, # Integer | Resulting image height.
258
+ left_margin: 50, # Integer | Left resulting image margin.
259
+ right_margin: 50, # Integer | Right resulting image margin.
260
+ top_margin: 50, # Integer | Top resulting image margin.
261
+ bottom_margin: 50, # Integer | Bottom resulting image margin.
262
+ folder: "remote_folder", # String | The document folder.
263
+ storage: "remote_storage" # String | The document storage.
264
+ }
265
+
266
+ begin
267
+ #Convert the HTML page from the web by its URL to PDF.
268
+ result = api_instance.get_convert_document_to_pdf_by_url(source_url, opts)
269
+ p result
270
+ rescue AsposeHtml::ApiError => e
271
+ puts "Exception when calling HtmlApi->get_convert_document_to_pdf_by_url: #{e}"
272
+ end
273
+ ```
274
+
275
+ ### Parameters
276
+
277
+ Name | Type | Description | Notes
278
+ ------------- | ------------- | ------------- | -------------
279
+ **source_url** | **String**| Source page URL. |
280
+ **width** | **Integer**| Resulting image width. | [optional]
281
+ **height** | **Integer**| Resulting image height. | [optional]
282
+ **left_margin** | **Integer**| Left resulting image margin. | [optional]
283
+ **right_margin** | **Integer**| Right resulting image margin. | [optional]
284
+ **top_margin** | **Integer**| Top resulting image margin. | [optional]
285
+ **bottom_margin** | **Integer**| Bottom resulting image margin. | [optional]
286
+ **folder** | **String**| The document folder. | [optional]
287
+ **storage** | **String**| The document storage. | [optional]
288
+
289
+ ### Return type
290
+
291
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
292
+
293
+ ### HTTP request headers
294
+
295
+ - **Content-Type**: application/json
296
+ - **Accept**: multipart/form-data
297
+
298
+
299
+ # **get_convert_document_to_xps**
300
+ > Hash get_convert_document_to_xps(name, opts)
301
+
302
+ Convert the HTML document from the storage by its name to XPS.
303
+
304
+ ### Example
305
+ ```ruby
306
+ # load the gem
307
+ require 'aspose_html'
308
+ CONFIG = {
309
+ "basePath":"https://api.aspose.cloud/v1.1",
310
+ "authPath":"https://api.aspose.cloud/oauth2/token",
311
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
312
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
313
+ "debug":true
314
+ }
315
+
316
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
317
+
318
+ name = "test.html" # String | Document name.
319
+
320
+ opts = {
321
+ width: 700, # Integer | Resulting image width.
322
+ height: 900, # Integer | Resulting image height.
323
+ left_margin: 50, # Integer | Left resulting image margin.
324
+ right_margin: 50, # Integer | Right resulting image margin.
325
+ top_margin: 50, # Integer | Top resulting image margin.
326
+ bottom_margin: 50, # Integer | Bottom resulting image margin.
327
+ folder: "remote_folder", # String | The document folder.
328
+ storage: "remote_storage" # String | The document storage.
329
+ }
330
+
331
+ begin
332
+ #Convert the HTML document from the storage by its name to XPS.
333
+ result = api_instance.get_convert_document_to_xps(name, opts)
334
+ p result
335
+ rescue AsposeHtml::ApiError => e
336
+ puts "Exception when calling HtmlApi->get_convert_document_to_xps: #{e}"
337
+ end
338
+ ```
339
+
340
+ ### Parameters
341
+
342
+ Name | Type | Description | Notes
343
+ ------------- | ------------- | ------------- | -------------
344
+ **name** | **String**| Document name. |
345
+ **width** | **Integer**| Resulting image width. | [optional]
346
+ **height** | **Integer**| Resulting image height. | [optional]
347
+ **left_margin** | **Integer**| Left resulting image margin. | [optional]
348
+ **right_margin** | **Integer**| Right resulting image margin. | [optional]
349
+ **top_margin** | **Integer**| Top resulting image margin. | [optional]
350
+ **bottom_margin** | **Integer**| Bottom resulting image margin. | [optional]
351
+ **folder** | **String**| The document folder. | [optional]
352
+ **storage** | **String**| The document storage. | [optional]
353
+
354
+ ### Return type
355
+
356
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
357
+
358
+ ### HTTP request headers
359
+
360
+ - **Content-Type**: application/json
361
+ - **Accept**: multipart/form-data
362
+
363
+
364
+ # **get_convert_document_to_xps_by_url**
365
+ > Hash get_convert_document_to_xps_by_url(source_url, opts)
366
+
367
+ Convert the HTML page from the web by its URL to XPS.
368
+
369
+ ### Example
370
+ ```ruby
371
+ # load the gem
372
+ require 'aspose_html'
373
+
374
+ CONFIG = {
375
+ "basePath":"https://api.aspose.cloud/v1.1",
376
+ "authPath":"https://api.aspose.cloud/oauth2/token",
377
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
378
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
379
+ "debug":true
380
+ }
381
+
382
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
383
+
384
+ source_url = "https://www.gmail.com" # String | Source page URL.
385
+
386
+ opts = {
387
+ width: 800, # Integer | Resulting image width.
388
+ height: 1000, # Integer | Resulting image height.
389
+ left_margin: 50, # Integer | Left resulting image margin.
390
+ right_margin: 50, # Integer | Right resulting image margin.
391
+ top_margin: 50, # Integer | Top resulting image margin.
392
+ bottom_margin: 50, # Integer | Bottom resulting image margin.
393
+ folder: "remote_folder", # String | The document folder.
394
+ storage: "remote_storage" # String | The document storage.
395
+ }
396
+
397
+ begin
398
+ #Convert the HTML page from the web by its URL to XPS.
399
+ result = api_instance.get_convert_document_to_xps_by_url(source_url, opts)
400
+ p result
401
+ rescue AsposeHtml::ApiError => e
402
+ puts "Exception when calling HtmlApi->get_convert_document_to_xps_by_url: #{e}"
403
+ end
404
+ ```
405
+
406
+ ### Parameters
407
+
408
+ Name | Type | Description | Notes
409
+ ------------- | ------------- | ------------- | -------------
410
+ **source_url** | **String**| Source page URL. |
411
+ **width** | **Integer**| Resulting image width. | [optional]
412
+ **height** | **Integer**| Resulting image height. | [optional]
413
+ **left_margin** | **Integer**| Left resulting image margin. | [optional]
414
+ **right_margin** | **Integer**| Right resulting image margin. | [optional]
415
+ **top_margin** | **Integer**| Top resulting image margin. | [optional]
416
+ **bottom_margin** | **Integer**| Bottom resulting image margin. | [optional]
417
+ **folder** | **String**| The document folder. | [optional]
418
+ **storage** | **String**| The document storage. | [optional]
419
+
420
+ ### Return type
421
+
422
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
423
+
424
+ ### HTTP request headers
425
+
426
+ - **Content-Type**: application/json
427
+ - **Accept**: multipart/form-data
428
+
429
+
430
+ # **put_convert_document_in_request_to_image**
431
+ > Hash put_convert_document_in_request_to_image(out_path, out_format, file, opts)
432
+
433
+ Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.
434
+
435
+ ### Example
436
+ ```ruby
437
+ # load the gem
438
+ require 'aspose_html'
439
+
440
+ CONFIG = {
441
+ "basePath":"https://api.aspose.cloud/v1.1",
442
+ "authPath":"https://api.aspose.cloud/oauth2/token",
443
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
444
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
445
+ "debug":true
446
+ }
447
+
448
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
449
+
450
+ out_path = "out_path_example" # String | Full resulting filename (ex. /folder1/folder2/result.jpg)
451
+
452
+ out_format = "out_format_example" # String |
453
+
454
+ file = "/path/to/file.html" # String | File path to be converted.
455
+
456
+ opts = {
457
+ width: 800, # Integer | Resulting document page width in points (1/96 inch).
458
+ height: 1000, # Integer | Resulting document page height in points (1/96 inch).
459
+ left_margin: 10, # Integer | Left resulting document page margin in points (1/96 inch).
460
+ right_margin: 10, # Integer | Right resulting document page margin in points (1/96 inch).
461
+ top_margin: 20, # Integer | Top resulting document page margin in points (1/96 inch).
462
+ bottom_margin: 20, # Integer | Bottom resulting document page margin in points (1/96 inch).
463
+ resolution: 300 # Integer | Resolution of resulting image. Default is 96 dpi.
464
+ }
465
+
466
+ begin
467
+ #Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.
468
+ result = api_instance.put_convert_document_in_request_to_image(out_path, out_format, file, opts)
469
+ p result # See tests
470
+ rescue AsposeHtml::ApiError => e
471
+ puts "Exception when calling ConversionApi->put_convert_document_in_request_to_image: #{e}"
472
+ end
473
+ ```
474
+
475
+ ### Parameters
476
+
477
+ Name | Type | Description | Notes
478
+ ------------- | ------------- | ------------- | -------------
479
+ **out_path** | **String**| Full resulting filename (ex. /folder1/folder2/result.jpg) |
480
+ **out_format** | **String**| |
481
+ **file** | **String**| Path to local file. |
482
+ **width** | **Integer**| Resulting document page width in points (1/96 inch). | [optional]
483
+ **height** | **Integer**| Resulting document page height in points (1/96 inch). | [optional]
484
+ **left_margin** | **Integer**| Left resulting document page margin in points (1/96 inch). | [optional]
485
+ **right_margin** | **Integer**| Right resulting document page margin in points (1/96 inch). | [optional]
486
+ **top_margin** | **Integer**| Top resulting document page margin in points (1/96 inch). | [optional]
487
+ **bottom_margin** | **Integer**| Bottom resulting document page margin in points (1/96 inch). | [optional]
488
+ **resolution** | **Integer**| Resolution of resulting image. Default is 96 dpi. | [optional]
489
+
490
+ ### Return type
491
+
492
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
493
+
494
+ ### HTTP request headers
495
+
496
+ - **Content-Type**: application/octet-stream
497
+ - **Accept**: application/json
498
+
499
+ # **put_convert_document_in_request_to_pdf**
500
+ > Hash put_convert_document_in_request_to_pdf(out_path, file, opts)
501
+
502
+ Converts the HTML document (in request content) to PDF and uploads resulting file to storage.
503
+
504
+ ### Example
505
+ ```ruby
506
+ # load the gem
507
+ require 'aspose_html'
508
+
509
+ CONFIG = {
510
+ "basePath":"https://api.aspose.cloud/v1.1",
511
+ "authPath":"https://api.aspose.cloud/oauth2/token",
512
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
513
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
514
+ "debug":true
515
+ }
516
+
517
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
518
+
519
+ out_path = "out_path_example" # String | Full resulting filename (ex. /folder1/folder2/result.pdf)
520
+
521
+ file = "/path/to/file.html" # String | File path to be converted.
522
+
523
+ opts = {
524
+ width: 800, # Integer | Resulting document page width in points (1/96 inch).
525
+ height: 1000, # Integer | Resulting document page height in points (1/96 inch).
526
+ left_margin: 10, # Integer | Left resulting document page margin in points (1/96 inch).
527
+ right_margin: 10, # Integer | Right resulting document page margin in points (1/96 inch).
528
+ top_margin: 10, # Integer | Top resulting document page margin in points (1/96 inch).
529
+ bottom_margin: 10 # Integer | Bottom resulting document page margin in points (1/96 inch).
530
+ }
531
+
532
+ begin
533
+ #Converts the HTML document (in request content) to PDF and uploads resulting file to storage.
534
+ result = api_instance.put_convert_document_in_request_to_pdf(out_path, file, opts)
535
+ p result # See tests
536
+ rescue AsposeHtml::ApiError => e
537
+ puts "Exception when calling ConversionApi->put_convert_document_in_request_to_pdf: #{e}"
538
+ end
539
+ ```
540
+
541
+ ### Parameters
542
+
543
+ Name | Type | Description | Notes
544
+ ------------- | ------------- | ------------- | -------------
545
+ **out_path** | **String**| Full resulting filename (ex. /folder1/folder2/result.pdf) |
546
+ **file** | **String**| A file to be converted. |
547
+ **width** | **Integer**| Resulting document page width in points (1/96 inch). | [optional]
548
+ **height** | **Integer**| Resulting document page height in points (1/96 inch). | [optional]
549
+ **left_margin** | **Integer**| Left resulting document page margin in points (1/96 inch). | [optional]
550
+ **right_margin** | **Integer**| Right resulting document page margin in points (1/96 inch). | [optional]
551
+ **top_margin** | **Integer**| Top resulting document page margin in points (1/96 inch). | [optional]
552
+ **bottom_margin** | **Integer**| Bottom resulting document page margin in points (1/96 inch). | [optional]
553
+
554
+ ### Return type
555
+
556
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
557
+
558
+ ### HTTP request headers
559
+
560
+ - **Content-Type**: application/octet-stream
561
+ - **Accept**: application/json
562
+
563
+
564
+
565
+ # **put_convert_document_in_request_to_xps**
566
+ > File put_convert_document_in_request_to_xps(out_path, file, opts)
567
+
568
+ Converts the HTML document (in request content) to XPS and uploads resulting file to storage.
569
+
570
+ ### Example
571
+ ```ruby
572
+ require 'aspose_html'
573
+
574
+ CONFIG = {
575
+ "basePath":"https://api.aspose.cloud/v1.1",
576
+ "authPath":"https://api.aspose.cloud/oauth2/token",
577
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
578
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
579
+ "debug":true
580
+ }
581
+
582
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
583
+
584
+ out_path = "out_path_example" # String | Full resulting filename (ex. /folder1/folder2/result.xps)
585
+
586
+ file = "/path/to/file.html" # String | File path to be converted.
587
+
588
+ opts = {
589
+ width: 800, # Integer | Resulting document page width in points (1/96 inch).
590
+ height: 1000, # Integer | Resulting document page height in points (1/96 inch).
591
+ left_margin: 10, # Integer | Left resulting document page margin in points (1/96 inch).
592
+ right_margin: 10, # Integer | Right resulting document page margin in points (1/96 inch).
593
+ top_margin: 10, # Integer | Top resulting document page margin in points (1/96 inch).
594
+ bottom_margin: 10 # Integer | Bottom resulting document page margin in points (1/96 inch).
595
+ }
596
+
597
+ begin
598
+ #Converts the HTML document (in request content) to XPS and uploads resulting file to storage.
599
+ result = api_instance.put_convert_document_in_request_to_xps(out_path, file, opts)
600
+ p result # See tests
601
+ rescue AsposeHtml::ApiError => e
602
+ puts "Exception when calling ConversionApi->put_convert_document_in_request_to_xps: #{e}"
603
+ end
604
+ ```
605
+
606
+ ### Parameters
607
+
608
+ Name | Type | Description | Notes
609
+ ------------- | ------------- | ------------- | -------------
610
+ **out_path** | **String**| Full resulting filename (ex. /folder1/folder2/result.xps) |
611
+ **file** | **String**| A file to be converted. |
612
+ **width** | **Integer**| Resulting document page width in points (1/96 inch). | [optional]
613
+ **height** | **Integer**| Resulting document page height in points (1/96 inch). | [optional]
614
+ **left_margin** | **Integer**| Left resulting document page margin in points (1/96 inch). | [optional]
615
+ **right_margin** | **Integer**| Right resulting document page margin in points (1/96 inch). | [optional]
616
+ **top_margin** | **Integer**| Top resulting document page margin in points (1/96 inch). | [optional]
617
+ **bottom_margin** | **Integer**| Bottom resulting document page margin in points (1/96 inch). | [optional]
618
+
619
+ ### Return type
620
+
621
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
622
+
623
+ ### HTTP request headers
624
+
625
+ - **Content-Type**: application/octet-stream
626
+ - **Accept**: application/json
627
+
628
+
629
+ # **put_convert_document_to_image**
630
+ > File put_convert_document_to_image(name, out_path, out_format, opts)
631
+
632
+ Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.
633
+
634
+ ### Example
635
+ ```ruby
636
+ require 'aspose_html'
637
+
638
+ CONFIG = {
639
+ "basePath":"https://api.aspose.cloud/v1.1",
640
+ "authPath":"https://api.aspose.cloud/oauth2/token",
641
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
642
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
643
+ "debug":true
644
+ }
645
+
646
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
647
+
648
+ name = "name_example" # String | Document name.
649
+
650
+ out_path = "out_path_example" # String | Full resulting filename (ex. /folder1/folder2/result.jpg)
651
+
652
+ out_format = "out_format_example" # String |
653
+
654
+ opts = {
655
+ width: 800, # Integer | Resulting document page width in points (1/96 inch).
656
+ height: 1000, # Integer | Resulting document page height in points (1/96 inch).
657
+ left_margin: 10, # Integer | Left resulting document page margin in points (1/96 inch).
658
+ right_margin: 10, # Integer | Right resulting document page margin in points (1/96 inch).
659
+ top_margin: 10, # Integer | Top resulting document page margin in points (1/96 inch).
660
+ bottom_margin: 10, # Integer | Bottom resulting document page margin in points (1/96 inch).
661
+ resolution: 10, # Integer | Resolution of resulting image. Default is 96 dpi.
662
+ folder: "folder_example", # String | The source document folder.
663
+ storage: "storage_example" # String | The source and resulting document storage.
664
+ }
665
+
666
+ begin
667
+ #Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.
668
+ result = api_instance.put_convert_document_to_image(name, out_path, out_format, opts)
669
+ p result # See tests
670
+ rescue AsposeHtml::ApiError => e
671
+ puts "Exception when calling ConversionApi->put_convert_document_to_image: #{e}"
672
+ end
673
+ ```
674
+
675
+ ### Parameters
676
+
677
+ Name | Type | Description | Notes
678
+ ------------- | ------------- | ------------- | -------------
679
+ **name** | **String**| Document name. |
680
+ **out_path** | **String**| Full resulting filename (ex. /folder1/folder2/result.jpg) |
681
+ **out_format** | **String**| |
682
+ **width** | **Integer**| Resulting document page width in points (1/96 inch). | [optional]
683
+ **height** | **Integer**| Resulting document page height in points (1/96 inch). | [optional]
684
+ **left_margin** | **Integer**| Left resulting document page margin in points (1/96 inch). | [optional]
685
+ **right_margin** | **Integer**| Right resulting document page margin in points (1/96 inch). | [optional]
686
+ **top_margin** | **Integer**| Top resulting document page margin in points (1/96 inch). | [optional]
687
+ **bottom_margin** | **Integer**| Bottom resulting document page margin in points (1/96 inch). | [optional]
688
+ **resolution** | **Integer**| Resolution of resulting image. Default is 96 dpi. | [optional]
689
+ **folder** | **String**| The source document folder. | [optional]
690
+ **storage** | **String**| The source and resulting document storage. | [optional]
691
+
692
+ ### Return type
693
+
694
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
695
+
696
+ ### HTTP request headers
697
+
698
+ - **Content-Type**: application/json
699
+ - **Accept**: application/json
700
+
701
+
702
+
703
+ # **put_convert_document_to_pdf**
704
+ > Hash put_convert_document_to_pdf(name, out_path, opts)
705
+
706
+ Converts the HTML document (located on storage) to PDF and uploads resulting file to storage.
707
+
708
+ ### Example
709
+ ```ruby
710
+ require 'aspose_html'
711
+
712
+ CONFIG = {
713
+ "basePath":"https://api.aspose.cloud/v1.1",
714
+ "authPath":"https://api.aspose.cloud/oauth2/token",
715
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
716
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
717
+ "debug":true
718
+ }
719
+
720
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
721
+
722
+ name = "name_example" # String | Document name.
723
+
724
+ out_path = "out_path_example" # String | Full resulting filename (ex. /folder1/folder2/result.pdf)
725
+
726
+ opts = {
727
+ width: 800, # Integer | Resulting document page width in points (1/96 inch).
728
+ height: 1000, # Integer | Resulting document page height in points (1/96 inch).
729
+ left_margin: 10, # Integer | Left resulting document page margin in points (1/96 inch).
730
+ right_margin: 10, # Integer | Right resulting document page margin in points (1/96 inch).
731
+ top_margin: 10, # Integer | Top resulting document page margin in points (1/96 inch).
732
+ bottom_margin: 10, # Integer | Bottom resulting document page margin in points (1/96 inch).
733
+ folder: "folder_example", # String | The source document folder.
734
+ storage: "storage_example" # String | The source and resulting document storage.
735
+ }
736
+
737
+ begin
738
+ #Converts the HTML document (located on storage) to PDF and uploads resulting file to storage.
739
+ result = api_instance.put_convert_document_to_pdf(name, out_path, opts)
740
+ p result # See tests
741
+ rescue AsposeHtml::ApiError => e
742
+ puts "Exception when calling ConversionApi->put_convert_document_to_pdf: #{e}"
743
+ end
744
+ ```
745
+
746
+ ### Parameters
747
+
748
+ Name | Type | Description | Notes
749
+ ------------- | ------------- | ------------- | -------------
750
+ **name** | **String**| Document name. |
751
+ **out_path** | **String**| Full resulting filename (ex. /folder1/folder2/result.pdf) |
752
+ **width** | **Integer**| Resulting document page width in points (1/96 inch). | [optional]
753
+ **height** | **Integer**| Resulting document page height in points (1/96 inch). | [optional]
754
+ **left_margin** | **Integer**| Left resulting document page margin in points (1/96 inch). | [optional]
755
+ **right_margin** | **Integer**| Right resulting document page margin in points (1/96 inch). | [optional]
756
+ **top_margin** | **Integer**| Top resulting document page margin in points (1/96 inch). | [optional]
757
+ **bottom_margin** | **Integer**| Bottom resulting document page margin in points (1/96 inch). | [optional]
758
+ **folder** | **String**| The source document folder. | [optional]
759
+ **storage** | **String**| The source and resulting document storage. | [optional]
760
+
761
+ ### Return type
762
+
763
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
764
+
765
+ ### HTTP request headers
766
+
767
+ - **Content-Type**: application/json
768
+ - **Accept**: application/json
769
+
770
+
771
+
772
+ # **put_convert_document_to_xps**
773
+ > Hash put_convert_document_to_xps(name, out_path, opts)
774
+
775
+ Converts the HTML document (located on storage) to XPS and uploads resulting file to storage.
776
+
777
+ ### Example
778
+ ```ruby
779
+ require 'aspose_html'
780
+
781
+ CONFIG = {
782
+ "basePath":"https://api.aspose.cloud/v1.1",
783
+ "authPath":"https://api.aspose.cloud/oauth2/token",
784
+ "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
785
+ "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
786
+ "debug":true
787
+ }
788
+
789
+ api_instance = AsposeHtml::HtmlApi.new CONFIG
790
+
791
+ name = "name_example" # String | Document name.
792
+
793
+ out_path = "out_path_example" # String | Full resulting filename (ex. /folder1/folder2/result.xps)
794
+
795
+ opts = {
796
+ width: 600, # Integer | Resulting document page width in points (1/96 inch).
797
+ height: 800, # Integer | Resulting document page height in points (1/96 inch).
798
+ left_margin: 20, # Integer | Left resulting document page margin in points (1/96 inch).
799
+ right_margin: 20, # Integer | Right resulting document page margin in points (1/96 inch).
800
+ top_margin: 20, # Integer | Top resulting document page margin in points (1/96 inch).
801
+ bottom_margin: 20, # Integer | Bottom resulting document page margin in points (1/96 inch).
802
+ folder: "folder_example", # String | The source document folder.
803
+ storage: "storage_example" # String | The source and resulting document storage.
804
+ }
805
+
806
+ begin
807
+ #Converts the HTML document (located on storage) to XPS and uploads resulting file to storage.
808
+ result = api_instance.put_convert_document_to_xps(name, out_path, opts)
809
+ p result # See tests
810
+ rescue AsposeHtml::ApiError => e
811
+ puts "Exception when calling ConversionApi->put_convert_document_to_xps: #{e}"
812
+ end
813
+ ```
814
+
815
+ ### Parameters
816
+
817
+ Name | Type | Description | Notes
818
+ ------------- | ------------- | ------------- | -------------
819
+ **name** | **String**| Document name. |
820
+ **out_path** | **String**| Full resulting filename (ex. /folder1/folder2/result.xps) |
821
+ **width** | **Integer**| Resulting document page width in points (1/96 inch). | [optional]
822
+ **height** | **Integer**| Resulting document page height in points (1/96 inch). | [optional]
823
+ **left_margin** | **Integer**| Left resulting document page margin in points (1/96 inch). | [optional]
824
+ **right_margin** | **Integer**| Right resulting document page margin in points (1/96 inch). | [optional]
825
+ **top_margin** | **Integer**| Top resulting document page margin in points (1/96 inch). | [optional]
826
+ **bottom_margin** | **Integer**| Bottom resulting document page margin in points (1/96 inch). | [optional]
827
+ **folder** | **String**| The source document folder. | [optional]
828
+ **storage** | **String**| The source and resulting document storage. | [optional]
829
+
830
+ ### Return type
831
+
832
+ **[Hash] {file: data, status: _status_code, headers: _headers}**
833
+
834
+ ### HTTP request headers
835
+
836
+ - **Content-Type**: application/json
837
+ - **Accept**: application/json