Skip to content

Commit ce79cf7

Browse files
Merge branch 'master' into release
2 parents 4148463 + e7f9e57 commit ce79cf7

File tree

9 files changed

+533
-310
lines changed

9 files changed

+533
-310
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ 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 23.5
17+
18+
- Added InsertSection method.
19+
20+
1621
## Enhancements in Version 23.4
1722

1823
- Added new type of RangeEndIdentifier for RangeApi: document:end
@@ -269,7 +274,7 @@ To use Aspose Words for Cloud Ruby SDK you need to register an account with [Asp
269274
To install this package do the following:
270275
update your Gemfile
271276
```ruby
272-
gem 'aspose_words_cloud', '~> 23.4'
277+
gem 'aspose_words_cloud', '~> 23.5'
273278
```
274279
or install directly
275280
```bash

lib/aspose_words_cloud.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124
require_relative 'aspose_words_cloud/models/footnotes_response'
125125
require_relative 'aspose_words_cloud/models/footnotes_stat_data'
126126
require_relative 'aspose_words_cloud/models/footnote_update'
127-
require_relative 'aspose_words_cloud/models/form_field'
128127
require_relative 'aspose_words_cloud/models/form_field_checkbox'
129128
require_relative 'aspose_words_cloud/models/form_field_collection'
130129
require_relative 'aspose_words_cloud/models/form_field_drop_down'
@@ -532,6 +531,8 @@
532531
require_relative 'aspose_words_cloud/models/requests/insert_paragraph_online_request'
533532
require_relative 'aspose_words_cloud/models/requests/insert_run_request'
534533
require_relative 'aspose_words_cloud/models/requests/insert_run_online_request'
534+
require_relative 'aspose_words_cloud/models/requests/insert_section_request'
535+
require_relative 'aspose_words_cloud/models/requests/insert_section_online_request'
535536
require_relative 'aspose_words_cloud/models/requests/insert_structured_document_tag_request'
536537
require_relative 'aspose_words_cloud/models/requests/insert_structured_document_tag_online_request'
537538
require_relative 'aspose_words_cloud/models/requests/insert_style_request'

lib/aspose_words_cloud/api/words_api.rb

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9907,6 +9907,90 @@ def insert_run_online(request)
99079907
[mp_data, status_code, headers]
99089908
end
99099909

9910+
# Inserts a section to the document.
9911+
# @param request InsertSectionRequest
9912+
# @return [nil]
9913+
def insert_section(request)
9914+
begin
9915+
data, _status_code, _headers = insert_section_with_http_info(request)
9916+
rescue ApiError => e
9917+
if e.code == 401
9918+
request_token
9919+
data, _status_code, _headers = insert_section_with_http_info(request)
9920+
else
9921+
raise
9922+
end
9923+
end
9924+
nil
9925+
end
9926+
9927+
# Inserts a section to the document.
9928+
# @param request InsertSectionRequest
9929+
# @return [Array<(nil, Fixnum, Hash)>]
9930+
# nil, response status code and response headers
9931+
private def insert_section_with_http_info(request)
9932+
raise ArgumentError, 'Incorrect request type' unless request.is_a? InsertSectionRequest
9933+
9934+
@api_client.config.logger.debug 'Calling API: WordsApi.insert_section ...' if @api_client.config.debugging
9935+
request_data = request.create_http_request(@api_client)
9936+
9937+
data, status_code, headers = @api_client.call_api(
9938+
request_data[:'method'],
9939+
request_data[:'path'],
9940+
header_params: request_data[:'header_params'],
9941+
query_params: request_data[:'query_params'],
9942+
body: request_data[:'body'])
9943+
if @api_client.config.debugging
9944+
@api_client.config.logger.debug "API called:
9945+
WordsApi#insert_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9946+
end
9947+
9948+
[data, status_code, headers]
9949+
end
9950+
9951+
# Inserts a section to the document.
9952+
# @param request InsertSectionOnlineRequest
9953+
# @return [FILES_COLLECTION]
9954+
def insert_section_online(request)
9955+
begin
9956+
data, _status_code, _headers = insert_section_online_with_http_info(request)
9957+
rescue ApiError => e
9958+
if e.code == 401
9959+
request_token
9960+
data, _status_code, _headers = insert_section_online_with_http_info(request)
9961+
else
9962+
raise
9963+
end
9964+
end
9965+
data
9966+
end
9967+
9968+
# Inserts a section to the document.
9969+
# @param request InsertSectionOnlineRequest
9970+
# @return [Array<(FILES_COLLECTION, Fixnum, Hash)>]
9971+
# FILES_COLLECTION, response status code and response headers
9972+
private def insert_section_online_with_http_info(request)
9973+
raise ArgumentError, 'Incorrect request type' unless request.is_a? InsertSectionOnlineRequest
9974+
9975+
@api_client.config.logger.debug 'Calling API: WordsApi.insert_section_online ...' if @api_client.config.debugging
9976+
request_data = request.create_http_request(@api_client)
9977+
9978+
data, status_code, headers = @api_client.call_api(
9979+
request_data[:'method'],
9980+
request_data[:'path'],
9981+
header_params: request_data[:'header_params'],
9982+
query_params: request_data[:'query_params'],
9983+
body: request_data[:'body'],
9984+
return_type: 'FILES_COLLECTION')
9985+
if @api_client.config.debugging
9986+
@api_client.config.logger.debug "API called:
9987+
WordsApi#insert_section_online\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9988+
end
9989+
9990+
# FILES_COLLECTION #
9991+
[data, status_code, headers]
9992+
end
9993+
99109994
# Inserts a new StructuredDocumentTag (SDT) to the document node.
99119995
# @param request InsertStructuredDocumentTagRequest
99129996
# @return [StructuredDocumentTagResponse]

0 commit comments

Comments
 (0)