Skip to content

Commit fa4c8eb

Browse files
Merge branch 'master' into release
2 parents 90f2fb3 + 174204f commit fa4c8eb

File tree

330 files changed

+4194
-691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+4194
-691
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ This repository contains Aspose.Words Cloud SDK for Ruby source code. This SDK a
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 22.6
17+
18+
- Added 'DeleteBookmark' and 'DeleteBookmarkOnline' API methods for delete bookmarks by name from the document.
19+
- Added 'DeleteBookmarks' and 'DeleteBookmarksOnline' API methods for delete all bookmarks from the document.
20+
- Added 'InsertBookmark' and 'InsertBookmarkOnline' API methods for create new bookmarks in the document.
21+
- Support all save formats for 'CreateDocument' operation.
22+
- Support dependsOn feature for batch requests.
23+
24+
## Enhancements in Version 22.5
25+
26+
- Internal API fixes and improvments.
27+
28+
1629
## Enhancements in Version 22.4
1730

1831
- Added ExportShapesAsSvg to HtmlSaveOption.
@@ -200,7 +213,7 @@ To use Aspose Words for Cloud Ruby SDK you need to register an account with [Asp
200213
To install this package do the following:
201214
update your Gemfile
202215
```ruby
203-
gem 'aspose_words_cloud', '~> 22.5'
216+
gem 'aspose_words_cloud', '~> 22.6'
204217
```
205218
or install directly
206219
```bash
15.3 KB
Binary file not shown.

lib/aspose_words_cloud.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
require_relative 'aspose_words_cloud/models/bmp_save_options_data'
3636
require_relative 'aspose_words_cloud/models/bookmark'
3737
require_relative 'aspose_words_cloud/models/bookmark_data'
38+
require_relative 'aspose_words_cloud/models/bookmark_insert'
3839
require_relative 'aspose_words_cloud/models/bookmark_response'
3940
require_relative 'aspose_words_cloud/models/bookmarks'
4041
require_relative 'aspose_words_cloud/models/bookmarks_outline_level_data'
@@ -311,6 +312,10 @@
311312
require_relative 'aspose_words_cloud/models/requests/create_or_update_document_property_online_request'
312313
require_relative 'aspose_words_cloud/models/requests/delete_all_paragraph_tab_stops_request'
313314
require_relative 'aspose_words_cloud/models/requests/delete_all_paragraph_tab_stops_online_request'
315+
require_relative 'aspose_words_cloud/models/requests/delete_bookmark_request'
316+
require_relative 'aspose_words_cloud/models/requests/delete_bookmark_online_request'
317+
require_relative 'aspose_words_cloud/models/requests/delete_bookmarks_request'
318+
require_relative 'aspose_words_cloud/models/requests/delete_bookmarks_online_request'
314319
require_relative 'aspose_words_cloud/models/requests/delete_border_request'
315320
require_relative 'aspose_words_cloud/models/requests/delete_border_online_request'
316321
require_relative 'aspose_words_cloud/models/requests/delete_borders_request'
@@ -480,6 +485,8 @@
480485
require_relative 'aspose_words_cloud/models/requests/get_table_row_online_request'
481486
require_relative 'aspose_words_cloud/models/requests/get_tables_request'
482487
require_relative 'aspose_words_cloud/models/requests/get_tables_online_request'
488+
require_relative 'aspose_words_cloud/models/requests/insert_bookmark_request'
489+
require_relative 'aspose_words_cloud/models/requests/insert_bookmark_online_request'
483490
require_relative 'aspose_words_cloud/models/requests/insert_comment_request'
484491
require_relative 'aspose_words_cloud/models/requests/insert_comment_online_request'
485492
require_relative 'aspose_words_cloud/models/requests/insert_custom_xml_part_request'
@@ -516,6 +523,7 @@
516523
require_relative 'aspose_words_cloud/models/requests/insert_watermark_image_online_request'
517524
require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_request'
518525
require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_online_request'
526+
require_relative 'aspose_words_cloud/models/requests/link_header_footers_to_previous_request'
519527
require_relative 'aspose_words_cloud/models/requests/load_web_document_request'
520528
require_relative 'aspose_words_cloud/models/requests/move_file_request'
521529
require_relative 'aspose_words_cloud/models/requests/move_folder_request'

lib/aspose_words_cloud/api/words_api.rb

Lines changed: 527 additions & 5 deletions
Large diffs are not rendered by default.
Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# ------------------------------------------------------------------------------------
2+
# <copyright company="Aspose" file="bookmark_insert.rb">
3+
# Copyright (c) 2022 Aspose.Words for Cloud
4+
# </copyright>
5+
# <summary>
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
23+
# </summary>
24+
# ------------------------------------------------------------------------------------
25+
26+
require 'date'
27+
28+
module AsposeWordsCloud
29+
30+
# Represents a bookmark to insert.
31+
class BookmarkInsert
32+
# Gets or sets the name of the bookmark.
33+
attr_accessor :name
34+
35+
# Gets or sets text, enclosed in the bookmark.
36+
attr_accessor :text
37+
38+
# Gets or sets the link to end bookmark node.
39+
attr_accessor :end_range
40+
41+
# Gets or sets the link to start bookmark node.
42+
attr_accessor :start_range
43+
# Attribute mapping from ruby-style variable name to JSON key.
44+
def self.attribute_map
45+
{
46+
:'name' => :'Name',
47+
:'text' => :'Text',
48+
:'end_range' => :'EndRange',
49+
:'start_range' => :'StartRange'
50+
}
51+
end
52+
53+
# Attribute type mapping.
54+
def self.swagger_types
55+
{
56+
:'name' => :'String',
57+
:'text' => :'String',
58+
:'end_range' => :'DocumentPosition',
59+
:'start_range' => :'DocumentPosition'
60+
}
61+
end
62+
63+
# Initializes the object
64+
# @param [Hash] attributes Model attributes in the form of hash
65+
def initialize(attributes = {})
66+
return unless attributes.is_a?(Hash)
67+
68+
# convert string to symbol for hash key
69+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
70+
71+
if attributes.key?(:'Name')
72+
self.name = attributes[:'Name']
73+
end
74+
75+
if attributes.key?(:'Text')
76+
self.text = attributes[:'Text']
77+
end
78+
79+
if attributes.key?(:'EndRange')
80+
self.end_range = attributes[:'EndRange']
81+
end
82+
83+
if attributes.key?(:'StartRange')
84+
self.start_range = attributes[:'StartRange']
85+
end
86+
end
87+
88+
# Show invalid properties with the reasons. Usually used together with valid?
89+
# @return Array for valid properies with the reasons
90+
def list_invalid_properties
91+
invalid_properties = []
92+
return invalid_properties
93+
end
94+
95+
# Check to see if the all the properties in the model are valid
96+
# @return true if the model is valid
97+
def valid?
98+
return true
99+
end
100+
101+
# Checks equality by comparing each attribute.
102+
# @param [Object] Object to be compared
103+
def ==(other)
104+
return true if self.equal?(other)
105+
self.class == other.class &&
106+
name == other.name &&
107+
text == other.text &&
108+
end_range == other.end_range &&
109+
start_range == other.start_range
110+
end
111+
112+
# @see the `==` method
113+
# @param [Object] Object to be compared
114+
def eql?(other)
115+
self == other
116+
end
117+
118+
# Calculates hash code according to all attributes.
119+
# @return [Fixnum] Hash code
120+
def hash
121+
[name, text, end_range, start_range].hash
122+
end
123+
124+
# Builds the object from hash
125+
# @param [Hash] attributes Model attributes in the form of hash
126+
# @return [Object] Returns the model itself
127+
def build_from_hash(attributes)
128+
return nil unless attributes.is_a?(Hash)
129+
self.class.swagger_types.each_pair do |key, type|
130+
if type =~ /\AArray<(.*)>/i
131+
# check to ensure the input is an array given that the the attribute
132+
# is documented as an array but the input is not
133+
if attributes[self.class.attribute_map[key]].is_a?(Array)
134+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135+
end
136+
elsif !attributes[self.class.attribute_map[key]].nil?
137+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138+
end
139+
# or else data not found in attributes(hash), not an issue as the data can be optional
140+
end
141+
142+
self
143+
end
144+
145+
# Deserializes the data based on type
146+
# @param string type Data type
147+
# @param string value Value to be deserialized
148+
# @return [Object] Deserialized data
149+
def _deserialize(type, value)
150+
case type.to_sym
151+
when :DateTime
152+
Time.at(/\d/.match(value)[0].to_f).to_datetime
153+
when :Date
154+
Time.at(/\d/.match(value)[0].to_f).to_date
155+
when :String
156+
value.to_s
157+
when :Integer
158+
value.to_i
159+
when :Float
160+
value.to_f
161+
when :BOOLEAN
162+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163+
true
164+
else
165+
false
166+
end
167+
when :Object
168+
# generic object (usually a Hash), return directly
169+
value
170+
when /\AArray<(?<inner_type>.+)>\z/
171+
inner_type = Regexp.last_match[:inner_type]
172+
value.map { |v| _deserialize(inner_type, v) }
173+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174+
k_type = Regexp.last_match[:k_type]
175+
v_type = Regexp.last_match[:v_type]
176+
{}.tap do |hash|
177+
value.each do |k, v|
178+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179+
end
180+
end
181+
else
182+
# model
183+
temp_model = AsposeWordsCloud.const_get(type).new
184+
temp_model.build_from_hash(value)
185+
end
186+
end
187+
188+
# Returns the string representation of the object
189+
# @return [String] String presentation of the object
190+
def to_s
191+
to_hash.to_s
192+
end
193+
194+
# to_body is an alias to to_hash (backward compatibility)
195+
# @return [Hash] Returns the object in the form of hash
196+
def to_body
197+
to_hash
198+
end
199+
200+
# Returns the object in the form of hash
201+
# @return [Hash] Returns the object in the form of hash
202+
def to_hash
203+
hash = {}
204+
self.class.attribute_map.each_pair do |attr, param|
205+
value = self.send(attr)
206+
next if value.nil?
207+
hash[param] = _to_hash(value)
208+
end
209+
hash
210+
end
211+
212+
# Outputs non-array value in the form of hash
213+
# For object, use to_hash. Otherwise, just return the value
214+
# @param [Object] value Any valid value
215+
# @return [Hash] Returns the value in the form of hash
216+
def _to_hash(value)
217+
if value.is_a?(Array)
218+
value.compact.map { |v| _to_hash(v) }
219+
elsif value.is_a?(Hash)
220+
{}.tap do |hash|
221+
value.each { |k, v| hash[k] = _to_hash(v) }
222+
end
223+
elsif value.respond_to? :to_hash
224+
value.to_hash
225+
else
226+
value
227+
end
228+
end
229+
230+
end
231+
end

lib/aspose_words_cloud/models/epub_save_options_data.rb

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,6 @@ class EpubSaveOptionsData
140140
# Gets or sets a value indicating whether to write the roundtrip information when saving to HTML. The default value is true.
141141
attr_accessor :export_roundtrip_information
142142

143-
# Gets or sets the flag, that controls whether Aspose.Words.Drawing.Shape nodes are converted to SVG images when saving to HTML, MHTML or EPUB. Default value is false.
144-
attr_accessor :export_shapes_as_svg
145-
146-
# Gets or sets the flag, that controls how textboxes represented by Aspose.Words.Drawing.Shape are saved to HTML, MHTML or EPUB. The default value is false.
147-
# When set to true, exports textboxes as inline "svg" elements. When false, exports as "image" elements.
148-
attr_accessor :export_text_box_as_svg
149-
150143
# Gets or sets the flag, that controls how text input form fields are saved.
151144
attr_accessor :export_text_input_form_field_as_text
152145

@@ -271,8 +264,6 @@ def self.attribute_map
271264
:'export_page_setup' => :'ExportPageSetup',
272265
:'export_relative_font_size' => :'ExportRelativeFontSize',
273266
:'export_roundtrip_information' => :'ExportRoundtripInformation',
274-
:'export_shapes_as_svg' => :'ExportShapesAsSvg',
275-
:'export_text_box_as_svg' => :'ExportTextBoxAsSvg',
276267
:'export_text_input_form_field_as_text' => :'ExportTextInputFormFieldAsText',
277268
:'export_toc_page_numbers' => :'ExportTocPageNumbers',
278269
:'export_xhtml_transitional' => :'ExportXhtmlTransitional',
@@ -333,8 +324,6 @@ def self.swagger_types
333324
:'export_page_setup' => :'BOOLEAN',
334325
:'export_relative_font_size' => :'BOOLEAN',
335326
:'export_roundtrip_information' => :'BOOLEAN',
336-
:'export_shapes_as_svg' => :'BOOLEAN',
337-
:'export_text_box_as_svg' => :'BOOLEAN',
338327
:'export_text_input_form_field_as_text' => :'BOOLEAN',
339328
:'export_toc_page_numbers' => :'BOOLEAN',
340329
:'export_xhtml_transitional' => :'BOOLEAN',
@@ -504,14 +493,6 @@ def initialize(attributes = {})
504493
self.export_roundtrip_information = attributes[:'ExportRoundtripInformation']
505494
end
506495

507-
if attributes.key?(:'ExportShapesAsSvg')
508-
self.export_shapes_as_svg = attributes[:'ExportShapesAsSvg']
509-
end
510-
511-
if attributes.key?(:'ExportTextBoxAsSvg')
512-
self.export_text_box_as_svg = attributes[:'ExportTextBoxAsSvg']
513-
end
514-
515496
if attributes.key?(:'ExportTextInputFormFieldAsText')
516497
self.export_text_input_form_field_as_text = attributes[:'ExportTextInputFormFieldAsText']
517498
end
@@ -835,8 +816,6 @@ def ==(other)
835816
export_page_setup == other.export_page_setup &&
836817
export_relative_font_size == other.export_relative_font_size &&
837818
export_roundtrip_information == other.export_roundtrip_information &&
838-
export_shapes_as_svg == other.export_shapes_as_svg &&
839-
export_text_box_as_svg == other.export_text_box_as_svg &&
840819
export_text_input_form_field_as_text == other.export_text_input_form_field_as_text &&
841820
export_toc_page_numbers == other.export_toc_page_numbers &&
842821
export_xhtml_transitional == other.export_xhtml_transitional &&
@@ -868,7 +847,7 @@ def eql?(other)
868847
# Calculates hash code according to all attributes.
869848
# @return [Fixnum] Hash code
870849
def hash
871-
[allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, flat_opc_xml_mapping_only, iml_rendering_mode, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, update_sdt_content, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_shapes_as_svg, export_text_box_as_svg, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, epub_navigation_map_level, save_format].hash
850+
[allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, flat_opc_xml_mapping_only, iml_rendering_mode, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, update_sdt_content, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, epub_navigation_map_level, save_format].hash
872851
end
873852

874853
# Builds the object from hash

0 commit comments

Comments
 (0)