aspose_words_cloud 1.0.0

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 (121) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +48 -0
  4. data/aspose_words_cloud.gemspec +26 -0
  5. data/lib/aspose_words_cloud/api/words_api.rb +4414 -0
  6. data/lib/aspose_words_cloud/api_client.rb +335 -0
  7. data/lib/aspose_words_cloud/api_error.rb +24 -0
  8. data/lib/aspose_words_cloud/configuration.rb +166 -0
  9. data/lib/aspose_words_cloud/models/base_object.rb +86 -0
  10. data/lib/aspose_words_cloud/models/base_response.rb +53 -0
  11. data/lib/aspose_words_cloud/models/bookmark.rb +53 -0
  12. data/lib/aspose_words_cloud/models/bookmark_data.rb +45 -0
  13. data/lib/aspose_words_cloud/models/bookmark_response.rb +61 -0
  14. data/lib/aspose_words_cloud/models/bookmarks.rb +47 -0
  15. data/lib/aspose_words_cloud/models/bookmarks_response.rb +61 -0
  16. data/lib/aspose_words_cloud/models/border.rb +77 -0
  17. data/lib/aspose_words_cloud/models/color.rb +61 -0
  18. data/lib/aspose_words_cloud/models/comment.rb +93 -0
  19. data/lib/aspose_words_cloud/models/comment_response.rb +61 -0
  20. data/lib/aspose_words_cloud/models/comments_collection.rb +47 -0
  21. data/lib/aspose_words_cloud/models/comments_response.rb +61 -0
  22. data/lib/aspose_words_cloud/models/document.rb +87 -0
  23. data/lib/aspose_words_cloud/models/document_entry.rb +45 -0
  24. data/lib/aspose_words_cloud/models/document_entry_list.rb +39 -0
  25. data/lib/aspose_words_cloud/models/document_position.rb +45 -0
  26. data/lib/aspose_words_cloud/models/document_properties.rb +47 -0
  27. data/lib/aspose_words_cloud/models/document_properties_response.rb +61 -0
  28. data/lib/aspose_words_cloud/models/document_property.rb +61 -0
  29. data/lib/aspose_words_cloud/models/document_property_response.rb +61 -0
  30. data/lib/aspose_words_cloud/models/document_response.rb +61 -0
  31. data/lib/aspose_words_cloud/models/document_stat_data.rb +63 -0
  32. data/lib/aspose_words_cloud/models/drawing_object.rb +79 -0
  33. data/lib/aspose_words_cloud/models/drawing_object_response.rb +61 -0
  34. data/lib/aspose_words_cloud/models/drawing_objects.rb +47 -0
  35. data/lib/aspose_words_cloud/models/drawing_objects_response.rb +61 -0
  36. data/lib/aspose_words_cloud/models/field.rb +61 -0
  37. data/lib/aspose_words_cloud/models/field_names.rb +47 -0
  38. data/lib/aspose_words_cloud/models/field_names_response.rb +61 -0
  39. data/lib/aspose_words_cloud/models/field_response.rb +61 -0
  40. data/lib/aspose_words_cloud/models/font.rb +381 -0
  41. data/lib/aspose_words_cloud/models/font_response.rb +61 -0
  42. data/lib/aspose_words_cloud/models/form_field.rb +117 -0
  43. data/lib/aspose_words_cloud/models/form_field_response.rb +61 -0
  44. data/lib/aspose_words_cloud/models/hyperlink.rb +53 -0
  45. data/lib/aspose_words_cloud/models/hyperlink_response.rb +61 -0
  46. data/lib/aspose_words_cloud/models/hyperlinks.rb +47 -0
  47. data/lib/aspose_words_cloud/models/hyperlinks_response.rb +61 -0
  48. data/lib/aspose_words_cloud/models/link.rb +61 -0
  49. data/lib/aspose_words_cloud/models/link_element.rb +37 -0
  50. data/lib/aspose_words_cloud/models/load_web_document_data.rb +45 -0
  51. data/lib/aspose_words_cloud/models/metafile_rendering_options_data.rb +53 -0
  52. data/lib/aspose_words_cloud/models/modification_operation_result.rb +45 -0
  53. data/lib/aspose_words_cloud/models/node_link.rb +45 -0
  54. data/lib/aspose_words_cloud/models/page_number.rb +61 -0
  55. data/lib/aspose_words_cloud/models/page_setup.rb +333 -0
  56. data/lib/aspose_words_cloud/models/page_stat_data.rb +53 -0
  57. data/lib/aspose_words_cloud/models/paragraph.rb +55 -0
  58. data/lib/aspose_words_cloud/models/paragraph_link.rb +45 -0
  59. data/lib/aspose_words_cloud/models/paragraph_link_collection.rb +47 -0
  60. data/lib/aspose_words_cloud/models/paragraph_link_collection_response.rb +61 -0
  61. data/lib/aspose_words_cloud/models/paragraph_response.rb +61 -0
  62. data/lib/aspose_words_cloud/models/protection_data.rb +37 -0
  63. data/lib/aspose_words_cloud/models/protection_data_response.rb +69 -0
  64. data/lib/aspose_words_cloud/models/protection_request.rb +53 -0
  65. data/lib/aspose_words_cloud/models/rectangle.rb +61 -0
  66. data/lib/aspose_words_cloud/models/replace_text_request.rb +61 -0
  67. data/lib/aspose_words_cloud/models/replace_text_response.rb +69 -0
  68. data/lib/aspose_words_cloud/models/response_message.rb +45 -0
  69. data/lib/aspose_words_cloud/models/revisions_modification_response.rb +61 -0
  70. data/lib/aspose_words_cloud/models/run.rb +53 -0
  71. data/lib/aspose_words_cloud/models/run_response.rb +61 -0
  72. data/lib/aspose_words_cloud/models/save_options_data.rb +69 -0
  73. data/lib/aspose_words_cloud/models/save_response.rb +61 -0
  74. data/lib/aspose_words_cloud/models/save_result.rb +55 -0
  75. data/lib/aspose_words_cloud/models/search_response.rb +69 -0
  76. data/lib/aspose_words_cloud/models/search_result.rb +45 -0
  77. data/lib/aspose_words_cloud/models/search_results_collection.rb +47 -0
  78. data/lib/aspose_words_cloud/models/section.rb +53 -0
  79. data/lib/aspose_words_cloud/models/section_link.rb +37 -0
  80. data/lib/aspose_words_cloud/models/section_link_collection.rb +47 -0
  81. data/lib/aspose_words_cloud/models/section_link_collection_response.rb +61 -0
  82. data/lib/aspose_words_cloud/models/section_page_setup_response.rb +61 -0
  83. data/lib/aspose_words_cloud/models/section_response.rb +61 -0
  84. data/lib/aspose_words_cloud/models/split_document_response.rb +61 -0
  85. data/lib/aspose_words_cloud/models/split_document_result.rb +55 -0
  86. data/lib/aspose_words_cloud/models/stat_data_response.rb +69 -0
  87. data/lib/aspose_words_cloud/models/story_child_nodes.rb +39 -0
  88. data/lib/aspose_words_cloud/models/text_item.rb +45 -0
  89. data/lib/aspose_words_cloud/models/text_items.rb +47 -0
  90. data/lib/aspose_words_cloud/models/text_items_response.rb +61 -0
  91. data/lib/aspose_words_cloud/models/tiff_save_options_data.rb +189 -0
  92. data/lib/aspose_words_cloud/models/watermark_text.rb +45 -0
  93. data/lib/aspose_words_cloud/version.rb +3 -0
  94. data/lib/aspose_words_cloud.rb +114 -0
  95. data/test/data/AppendWordDocumentsExample-TestFile-Destination.doc +0 -0
  96. data/test/data/AppendWordDocumentsExample-TestFile-Source.doc +0 -0
  97. data/test/data/Customers.txt +6 -0
  98. data/test/data/FormFilled.docx +0 -0
  99. data/test/data/SampleAppendDoc.docx +0 -0
  100. data/test/data/SampleAppendDoc2.docx +0 -0
  101. data/test/data/SampleBlankWatermarkDocument.docx +0 -0
  102. data/test/data/SampleBlankWordDocument.docx +0 -0
  103. data/test/data/SampleExecuteTemplate.doc +0 -0
  104. data/test/data/SampleExecuteTemplate.docx +0 -0
  105. data/test/data/SampleExecuteTemplateData.txt +49 -0
  106. data/test/data/SampleHeaderFooterWordDocument.docx +0 -0
  107. data/test/data/SampleInvoiceTemplate.doc +0 -0
  108. data/test/data/SampleInvoiceTemplateData.txt +24 -0
  109. data/test/data/SampleMailMergeTemplate.docx +0 -0
  110. data/test/data/SampleMailMergeTemplateData.txt +7 -0
  111. data/test/data/SampleMailMergeTemplateImage.doc +0 -0
  112. data/test/data/SampleMailMergeTemplateImageData.txt +12 -0
  113. data/test/data/SampleOlePdfData.docx +0 -0
  114. data/test/data/SampleProtectedBlankWordDocument.docx +0 -0
  115. data/test/data/SampleWordDocument.docx +0 -0
  116. data/test/data/Sample_EmbeddedOLE.docx +0 -0
  117. data/test/data/WordFormatConverterExampleTest.doc +0 -0
  118. data/test/data/aspose-cloud.png +0 -0
  119. data/test/data/header-logo.png +0 -0
  120. data/test/words_tests.rb +773 -0
  121. metadata +256 -0
@@ -0,0 +1,4414 @@
1
+ require "uri"
2
+
3
+ module AsposeWordsCloud
4
+ class WordsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = nil)
8
+ @api_client = api_client || Configuration.api_client
9
+ end
10
+
11
+ # Convert document from request content to format specified.
12
+ #
13
+ # @param file
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :format Format to convert.
16
+ # @option opts [String] :out_path Path for saving operation result to the local storage.
17
+ # @option opts [String] :replace_resources_host_to Controls wherefrom Aspose.Words loads external resource when importing a document from HTML or MHTML.
18
+ # @return [File]
19
+ def put_convert_document(file, opts = {})
20
+ if Configuration.debugging
21
+ Configuration.logger.debug "Calling API: WordsApi#put_convert_document ..."
22
+ end
23
+
24
+ # verify the required parameter 'file' is set
25
+ fail "Missing the required parameter 'file' when calling put_convert_document" if file.nil?
26
+
27
+ # resource path
28
+ path = "/words/convert".sub('{format}','json')
29
+
30
+ # query parameters
31
+ query_params = {}
32
+ query_params[:'format'] = opts[:'format'] if opts[:'format']
33
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
34
+ query_params[:'replaceResourcesHostTo'] = opts[:'replace_resources_host_to'] if opts[:'replace_resources_host_to']
35
+
36
+ # header parameters
37
+ header_params = {}
38
+
39
+ # HTTP header 'Accept' (if needed)
40
+ _header_accept = ['multipart/form-data']
41
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
42
+
43
+ # HTTP header 'Content-Type'
44
+ _header_content_type = ['multipart/form-data']
45
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
46
+
47
+ # form parameters
48
+ form_params = {}
49
+ form_params["file"] = file
50
+
51
+ # http body (model)
52
+ post_body = nil
53
+
54
+
55
+ auth_names = []
56
+ result = @api_client.call_api(:PUT, path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'File')
63
+ if Configuration.debugging
64
+ Configuration.logger.debug "API called: WordsApi#put_convert_document. Result: #{result.inspect}"
65
+ end
66
+ return result
67
+ end
68
+
69
+ # Execute document mail merge online.
70
+ #
71
+ # @param with_regions With regions flag.
72
+ # @param file
73
+ # @param data
74
+ # @param [Hash] opts the optional parameters
75
+ # @option opts [String] :cleanup Clean up options.
76
+ # @return [File]
77
+ def put_execute_mail_merge_online(with_regions, file, data, opts = {})
78
+ if Configuration.debugging
79
+ Configuration.logger.debug "Calling API: WordsApi#put_execute_mail_merge_online ..."
80
+ end
81
+
82
+ # verify the required parameter 'with_regions' is set
83
+ fail "Missing the required parameter 'with_regions' when calling put_execute_mail_merge_online" if with_regions.nil?
84
+
85
+ # verify the required parameter 'file' is set
86
+ fail "Missing the required parameter 'file' when calling put_execute_mail_merge_online" if file.nil?
87
+
88
+ # verify the required parameter 'data' is set
89
+ fail "Missing the required parameter 'data' when calling put_execute_mail_merge_online" if data.nil?
90
+
91
+ # resource path
92
+ path = "/words/executeMailMerge".sub('{format}','json')
93
+
94
+ # query parameters
95
+ query_params = {}
96
+ query_params[:'withRegions'] = with_regions
97
+ query_params[:'cleanup'] = opts[:'cleanup'] if opts[:'cleanup']
98
+
99
+ # header parameters
100
+ header_params = {}
101
+
102
+ # HTTP header 'Accept' (if needed)
103
+ _header_accept = ['multipart/form-data']
104
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
105
+
106
+ # HTTP header 'Content-Type'
107
+ _header_content_type = ['multipart/form-data']
108
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
109
+
110
+ # form parameters
111
+ form_params = {}
112
+ form_params["file"] = file
113
+ form_params["data"] = data
114
+
115
+ # http body (model)
116
+ post_body = nil
117
+
118
+
119
+ auth_names = []
120
+ result = @api_client.call_api(:PUT, path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'File')
127
+ if Configuration.debugging
128
+ Configuration.logger.debug "API called: WordsApi#put_execute_mail_merge_online. Result: #{result.inspect}"
129
+ end
130
+ return result
131
+ end
132
+
133
+ # Populate document template with data online.
134
+ #
135
+ # @param file
136
+ # @param data
137
+ # @param [Hash] opts the optional parameters
138
+ # @option opts [String] :cleanup Clean up options.
139
+ # @option opts [BOOLEAN] :use_whole_paragraph_as_region Gets or sets a value indicating whether paragraph with TableStart or TableEnd field should be fully included into mail merge region or particular range between TableStart and TableEnd fields. The default value is true.
140
+ # @option opts [BOOLEAN] :with_regions Merge with regions or not. True by default
141
+ # @return [File]
142
+ def put_execute_template_online(file, data, opts = {})
143
+ if Configuration.debugging
144
+ Configuration.logger.debug "Calling API: WordsApi#put_execute_template_online ..."
145
+ end
146
+
147
+ # verify the required parameter 'file' is set
148
+ fail "Missing the required parameter 'file' when calling put_execute_template_online" if file.nil?
149
+
150
+ # verify the required parameter 'data' is set
151
+ fail "Missing the required parameter 'data' when calling put_execute_template_online" if data.nil?
152
+
153
+ # resource path
154
+ path = "/words/executeTemplate".sub('{format}','json')
155
+
156
+ # query parameters
157
+ query_params = {}
158
+ query_params[:'cleanup'] = opts[:'cleanup'] if opts[:'cleanup']
159
+ query_params[:'useWholeParagraphAsRegion'] = opts[:'use_whole_paragraph_as_region'] if opts[:'use_whole_paragraph_as_region']
160
+ query_params[:'withRegions'] = opts[:'with_regions'] if opts[:'with_regions']
161
+
162
+ # header parameters
163
+ header_params = {}
164
+
165
+ # HTTP header 'Accept' (if needed)
166
+ _header_accept = ['multipart/form-data']
167
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
168
+
169
+ # HTTP header 'Content-Type'
170
+ _header_content_type = ['multipart/form-data']
171
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
172
+
173
+ # form parameters
174
+ form_params = {}
175
+ form_params["file"] = file
176
+ form_params["data"] = data
177
+
178
+ # http body (model)
179
+ post_body = nil
180
+
181
+
182
+ auth_names = []
183
+ result = @api_client.call_api(:PUT, path,
184
+ :header_params => header_params,
185
+ :query_params => query_params,
186
+ :form_params => form_params,
187
+ :body => post_body,
188
+ :auth_names => auth_names,
189
+ :return_type => 'File')
190
+ if Configuration.debugging
191
+ Configuration.logger.debug "API called: WordsApi#put_execute_template_online. Result: #{result.inspect}"
192
+ end
193
+ return result
194
+ end
195
+
196
+ # Load new document from web into the file with any supported format of data.
197
+ #
198
+ # @param data
199
+ # @param [Hash] opts the optional parameters
200
+ # @return [SaveResponse]
201
+ def post_load_web_document(data, opts = {})
202
+ if Configuration.debugging
203
+ Configuration.logger.debug "Calling API: WordsApi#post_load_web_document ..."
204
+ end
205
+
206
+ # verify the required parameter 'data' is set
207
+ fail "Missing the required parameter 'data' when calling post_load_web_document" if data.nil?
208
+
209
+ # resource path
210
+ path = "/words/loadWebDocument".sub('{format}','json')
211
+
212
+ # query parameters
213
+ query_params = {}
214
+
215
+ # header parameters
216
+ header_params = {}
217
+
218
+ # HTTP header 'Accept' (if needed)
219
+ _header_accept = ['application/json']
220
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
221
+
222
+ # HTTP header 'Content-Type'
223
+ _header_content_type = ['application/json']
224
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
225
+
226
+ # form parameters
227
+ form_params = {}
228
+
229
+ # http body (model)
230
+ post_body = @api_client.object_to_http_body(data)
231
+
232
+
233
+ auth_names = []
234
+ result = @api_client.call_api(:POST, path,
235
+ :header_params => header_params,
236
+ :query_params => query_params,
237
+ :form_params => form_params,
238
+ :body => post_body,
239
+ :auth_names => auth_names,
240
+ :return_type => 'SaveResponse')
241
+ if Configuration.debugging
242
+ Configuration.logger.debug "API called: WordsApi#post_load_web_document. Result: #{result.inspect}"
243
+ end
244
+ return result
245
+ end
246
+
247
+ # Read document field names.
248
+ #
249
+ # @param [Hash] opts the optional parameters
250
+ # @option opts [BOOLEAN] :use_non_merge_fields
251
+ # @return [FieldNamesResponse]
252
+ def put_document_field_names(opts = {})
253
+ if Configuration.debugging
254
+ Configuration.logger.debug "Calling API: WordsApi#put_document_field_names ..."
255
+ end
256
+
257
+ # resource path
258
+ path = "/words/mailMergeFieldNames".sub('{format}','json')
259
+
260
+ # query parameters
261
+ query_params = {}
262
+ query_params[:'useNonMergeFields'] = opts[:'use_non_merge_fields'] if opts[:'use_non_merge_fields']
263
+
264
+ # header parameters
265
+ header_params = {}
266
+
267
+ # HTTP header 'Accept' (if needed)
268
+ _header_accept = ['application/json']
269
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
270
+
271
+ # HTTP header 'Content-Type'
272
+ _header_content_type = ['application/json']
273
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
274
+
275
+ # form parameters
276
+ form_params = {}
277
+
278
+ # http body (model)
279
+ post_body = nil
280
+
281
+
282
+ auth_names = []
283
+ result = @api_client.call_api(:PUT, path,
284
+ :header_params => header_params,
285
+ :query_params => query_params,
286
+ :form_params => form_params,
287
+ :body => post_body,
288
+ :auth_names => auth_names,
289
+ :return_type => 'FieldNamesResponse')
290
+ if Configuration.debugging
291
+ Configuration.logger.debug "API called: WordsApi#put_document_field_names. Result: #{result.inspect}"
292
+ end
293
+ return result
294
+ end
295
+
296
+ # Run tasks
297
+ #
298
+ # @param file
299
+ # @param [Hash] opts the optional parameters
300
+ # @return [ResponseMessage]
301
+ def post_run_task(file, opts = {})
302
+ if Configuration.debugging
303
+ Configuration.logger.debug "Calling API: WordsApi#post_run_task ..."
304
+ end
305
+
306
+ # verify the required parameter 'file' is set
307
+ fail "Missing the required parameter 'file' when calling post_run_task" if file.nil?
308
+
309
+ # resource path
310
+ path = "/words/tasks".sub('{format}','json')
311
+
312
+ # query parameters
313
+ query_params = {}
314
+
315
+ # header parameters
316
+ header_params = {}
317
+
318
+ # HTTP header 'Accept' (if needed)
319
+ _header_accept = ['application/json']
320
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
321
+
322
+ # HTTP header 'Content-Type'
323
+ _header_content_type = ['multipart/form-data']
324
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
325
+
326
+ # form parameters
327
+ form_params = {}
328
+ form_params["file"] = file
329
+
330
+ # http body (model)
331
+ post_body = nil
332
+
333
+
334
+ auth_names = []
335
+ result = @api_client.call_api(:POST, path,
336
+ :header_params => header_params,
337
+ :query_params => query_params,
338
+ :form_params => form_params,
339
+ :body => post_body,
340
+ :auth_names => auth_names,
341
+ :return_type => 'ResponseMessage')
342
+ if Configuration.debugging
343
+ Configuration.logger.debug "API called: WordsApi#post_run_task. Result: #{result.inspect}"
344
+ end
345
+ return result
346
+ end
347
+
348
+ # Read document common info.
349
+ #
350
+ # @param name The file name.
351
+ # @param [Hash] opts the optional parameters
352
+ # @option opts [String] :storage The document storage.
353
+ # @option opts [String] :folder The document folder.
354
+ # @return [DocumentResponse]
355
+ def get_document(name, opts = {})
356
+ if Configuration.debugging
357
+ Configuration.logger.debug "Calling API: WordsApi#get_document ..."
358
+ end
359
+
360
+ # verify the required parameter 'name' is set
361
+ fail "Missing the required parameter 'name' when calling get_document" if name.nil?
362
+
363
+ # resource path
364
+ path = "/words/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
365
+
366
+ # query parameters
367
+ query_params = {}
368
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
369
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
370
+
371
+ # header parameters
372
+ header_params = {}
373
+
374
+ # HTTP header 'Accept' (if needed)
375
+ _header_accept = ['application/json']
376
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
377
+
378
+ # HTTP header 'Content-Type'
379
+ _header_content_type = ['application/json']
380
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
381
+
382
+ # form parameters
383
+ form_params = {}
384
+
385
+ # http body (model)
386
+ post_body = nil
387
+
388
+
389
+ auth_names = []
390
+ result = @api_client.call_api(:GET, path,
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names,
396
+ :return_type => 'DocumentResponse')
397
+ if Configuration.debugging
398
+ Configuration.logger.debug "API called: WordsApi#get_document. Result: #{result.inspect}"
399
+ end
400
+ return result
401
+ end
402
+
403
+ # Export the document into the specified format.
404
+ #
405
+ # @param name
406
+ # @param format
407
+ # @param [Hash] opts the optional parameters
408
+ # @option opts [String] :storage
409
+ # @option opts [String] :folder
410
+ # @option opts [String] :out_path
411
+ # @return [File]
412
+ def get_document_with_format(name, format, opts = {})
413
+ if Configuration.debugging
414
+ Configuration.logger.debug "Calling API: WordsApi#get_document_with_format ..."
415
+ end
416
+
417
+ # verify the required parameter 'name' is set
418
+ fail "Missing the required parameter 'name' when calling get_document_with_format" if name.nil?
419
+
420
+ # verify the required parameter 'format' is set
421
+ fail "Missing the required parameter 'format' when calling get_document_with_format" if format.nil?
422
+
423
+ # resource path
424
+ path = "/words/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
425
+
426
+ # query parameters
427
+ query_params = {}
428
+ query_params[:'format'] = format
429
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
430
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
431
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
432
+
433
+ # header parameters
434
+ header_params = {}
435
+
436
+ # HTTP header 'Accept' (if needed)
437
+ _header_accept = ['multipart/form-data']
438
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
439
+
440
+ # HTTP header 'Content-Type'
441
+ _header_content_type = ['application/json']
442
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
443
+
444
+ # form parameters
445
+ form_params = {}
446
+
447
+ # http body (model)
448
+ post_body = nil
449
+
450
+
451
+ auth_names = []
452
+ result = @api_client.call_api(:GET, path,
453
+ :header_params => header_params,
454
+ :query_params => query_params,
455
+ :form_params => form_params,
456
+ :body => post_body,
457
+ :auth_names => auth_names,
458
+ :return_type => 'File')
459
+ if Configuration.debugging
460
+ Configuration.logger.debug "API called: WordsApi#get_document_with_format. Result: #{result.inspect}"
461
+ end
462
+ return result
463
+ end
464
+
465
+ # Convert document to destination format with detailed settings and save result to storage.
466
+ #
467
+ # @param name The document name.
468
+ # @param save_options_data Save options.
469
+ # @param [Hash] opts the optional parameters
470
+ # @option opts [String] :storage The document storage.
471
+ # @option opts [String] :folder The document folder.
472
+ # @return [SaveResponse]
473
+ def post_document_save_as(name, save_options_data, opts = {})
474
+ if Configuration.debugging
475
+ Configuration.logger.debug "Calling API: WordsApi#post_document_save_as ..."
476
+ end
477
+
478
+ # verify the required parameter 'name' is set
479
+ fail "Missing the required parameter 'name' when calling post_document_save_as" if name.nil?
480
+
481
+ # verify the required parameter 'save_options_data' is set
482
+ fail "Missing the required parameter 'save_options_data' when calling post_document_save_as" if save_options_data.nil?
483
+
484
+ # resource path
485
+ path = "/words/{name}/SaveAs".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
486
+
487
+ # query parameters
488
+ query_params = {}
489
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
490
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
491
+
492
+ # header parameters
493
+ header_params = {}
494
+
495
+ # HTTP header 'Accept' (if needed)
496
+ _header_accept = ['application/json']
497
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
498
+
499
+ # HTTP header 'Content-Type'
500
+ _header_content_type = ['application/json']
501
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
502
+
503
+ # form parameters
504
+ form_params = {}
505
+
506
+ # http body (model)
507
+ post_body = @api_client.object_to_http_body(save_options_data)
508
+
509
+
510
+ auth_names = []
511
+ result = @api_client.call_api(:POST, path,
512
+ :header_params => header_params,
513
+ :query_params => query_params,
514
+ :form_params => form_params,
515
+ :body => post_body,
516
+ :auth_names => auth_names,
517
+ :return_type => 'SaveResponse')
518
+ if Configuration.debugging
519
+ Configuration.logger.debug "API called: WordsApi#post_document_save_as. Result: #{result.inspect}"
520
+ end
521
+ return result
522
+ end
523
+
524
+ # Convert document to tiff with detailed settings and save result to storage.
525
+ #
526
+ # @param name The document name.
527
+ # @param save_options Tiff save options.
528
+ # @param [Hash] opts the optional parameters
529
+ # @option opts [String] :result_file The resulting file name.
530
+ # @option opts [BOOLEAN] :use_anti_aliasing Use antialiasing flag.
531
+ # @option opts [BOOLEAN] :use_high_quality_rendering Use high quality flag.
532
+ # @option opts [Float] :image_brightness Brightness for the generated images.
533
+ # @option opts [String] :image_color_mode Color mode for the generated images.
534
+ # @option opts [Float] :image_contrast The contrast for the generated images.
535
+ # @option opts [String] :numeral_format The images numeral format.
536
+ # @option opts [Integer] :page_count Number of pages to render.
537
+ # @option opts [Integer] :page_index Page index to start rendering.
538
+ # @option opts [String] :paper_color Background image color.
539
+ # @option opts [String] :pixel_format The pixel format of generated images.
540
+ # @option opts [Float] :resolution The resolution of generated images.
541
+ # @option opts [Float] :scale Zoom factor for generated images.
542
+ # @option opts [String] :tiff_compression The compression tipe.
543
+ # @option opts [String] :dml_rendering_mode Optional, default is Fallback.
544
+ # @option opts [String] :dml_effects_rendering_mode Optional, default is Simplified.
545
+ # @option opts [String] :tiff_binarization_method Optional, Tiff binarization method, possible values are: FloydSteinbergDithering, Threshold.
546
+ # @option opts [String] :storage The document storage.
547
+ # @option opts [String] :folder The document folder.
548
+ # @option opts [BOOLEAN] :zip_output Optional. A value determining zip output or not.
549
+ # @return [SaveResponse]
550
+ def put_document_save_as_tiff(name, save_options, opts = {})
551
+ if Configuration.debugging
552
+ Configuration.logger.debug "Calling API: WordsApi#put_document_save_as_tiff ..."
553
+ end
554
+
555
+ # verify the required parameter 'name' is set
556
+ fail "Missing the required parameter 'name' when calling put_document_save_as_tiff" if name.nil?
557
+
558
+ # verify the required parameter 'save_options' is set
559
+ fail "Missing the required parameter 'save_options' when calling put_document_save_as_tiff" if save_options.nil?
560
+
561
+ # resource path
562
+ path = "/words/{name}/SaveAs/tiff".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
563
+
564
+ # query parameters
565
+ query_params = {}
566
+ query_params[:'resultFile'] = opts[:'result_file'] if opts[:'result_file']
567
+ query_params[:'useAntiAliasing'] = opts[:'use_anti_aliasing'] if opts[:'use_anti_aliasing']
568
+ query_params[:'useHighQualityRendering'] = opts[:'use_high_quality_rendering'] if opts[:'use_high_quality_rendering']
569
+ query_params[:'imageBrightness'] = opts[:'image_brightness'] if opts[:'image_brightness']
570
+ query_params[:'imageColorMode'] = opts[:'image_color_mode'] if opts[:'image_color_mode']
571
+ query_params[:'imageContrast'] = opts[:'image_contrast'] if opts[:'image_contrast']
572
+ query_params[:'numeralFormat'] = opts[:'numeral_format'] if opts[:'numeral_format']
573
+ query_params[:'pageCount'] = opts[:'page_count'] if opts[:'page_count']
574
+ query_params[:'pageIndex'] = opts[:'page_index'] if opts[:'page_index']
575
+ query_params[:'paperColor'] = opts[:'paper_color'] if opts[:'paper_color']
576
+ query_params[:'pixelFormat'] = opts[:'pixel_format'] if opts[:'pixel_format']
577
+ query_params[:'resolution'] = opts[:'resolution'] if opts[:'resolution']
578
+ query_params[:'scale'] = opts[:'scale'] if opts[:'scale']
579
+ query_params[:'tiffCompression'] = opts[:'tiff_compression'] if opts[:'tiff_compression']
580
+ query_params[:'dmlRenderingMode'] = opts[:'dml_rendering_mode'] if opts[:'dml_rendering_mode']
581
+ query_params[:'dmlEffectsRenderingMode'] = opts[:'dml_effects_rendering_mode'] if opts[:'dml_effects_rendering_mode']
582
+ query_params[:'tiffBinarizationMethod'] = opts[:'tiff_binarization_method'] if opts[:'tiff_binarization_method']
583
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
584
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
585
+ query_params[:'zipOutput'] = opts[:'zip_output'] if opts[:'zip_output']
586
+
587
+ # header parameters
588
+ header_params = {}
589
+
590
+ # HTTP header 'Accept' (if needed)
591
+ _header_accept = ['application/json']
592
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
593
+
594
+ # HTTP header 'Content-Type'
595
+ _header_content_type = ['application/json']
596
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
597
+
598
+ # form parameters
599
+ form_params = {}
600
+
601
+ # http body (model)
602
+ post_body = @api_client.object_to_http_body(save_options)
603
+
604
+
605
+ auth_names = []
606
+ result = @api_client.call_api(:PUT, path,
607
+ :header_params => header_params,
608
+ :query_params => query_params,
609
+ :form_params => form_params,
610
+ :body => post_body,
611
+ :auth_names => auth_names,
612
+ :return_type => 'SaveResponse')
613
+ if Configuration.debugging
614
+ Configuration.logger.debug "API called: WordsApi#put_document_save_as_tiff. Result: #{result.inspect}"
615
+ end
616
+ return result
617
+ end
618
+
619
+ # Append documents to original document.
620
+ #
621
+ # @param name Original document name.
622
+ # @param document_list {DocumentEntryList} with a list of documents to append.
623
+ # @param [Hash] opts the optional parameters
624
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
625
+ # @option opts [String] :storage Original document storage.
626
+ # @option opts [String] :folder Original document folder.
627
+ # @return [DocumentResponse]
628
+ def post_append_document(name, document_list, opts = {})
629
+ if Configuration.debugging
630
+ Configuration.logger.debug "Calling API: WordsApi#post_append_document ..."
631
+ end
632
+
633
+ # verify the required parameter 'name' is set
634
+ fail "Missing the required parameter 'name' when calling post_append_document" if name.nil?
635
+
636
+ # verify the required parameter 'document_list' is set
637
+ fail "Missing the required parameter 'document_list' when calling post_append_document" if document_list.nil?
638
+
639
+ # resource path
640
+ path = "/words/{name}/appendDocument".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
641
+
642
+ # query parameters
643
+ query_params = {}
644
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
645
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
646
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
647
+
648
+ # header parameters
649
+ header_params = {}
650
+
651
+ # HTTP header 'Accept' (if needed)
652
+ _header_accept = ['application/json']
653
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
654
+
655
+ # HTTP header 'Content-Type'
656
+ _header_content_type = ['application/json']
657
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
658
+
659
+ # form parameters
660
+ form_params = {}
661
+
662
+ # http body (model)
663
+ post_body = @api_client.object_to_http_body(document_list)
664
+
665
+
666
+ auth_names = []
667
+ result = @api_client.call_api(:POST, path,
668
+ :header_params => header_params,
669
+ :query_params => query_params,
670
+ :form_params => form_params,
671
+ :body => post_body,
672
+ :auth_names => auth_names,
673
+ :return_type => 'DocumentResponse')
674
+ if Configuration.debugging
675
+ Configuration.logger.debug "API called: WordsApi#post_append_document. Result: #{result.inspect}"
676
+ end
677
+ return result
678
+ end
679
+
680
+ # Read document bookmarks common info.
681
+ #
682
+ # @param name The document name.
683
+ # @param [Hash] opts the optional parameters
684
+ # @option opts [String] :storage The document storage.
685
+ # @option opts [String] :folder The document folder.
686
+ # @return [BookmarksResponse]
687
+ def get_document_bookmarks(name, opts = {})
688
+ if Configuration.debugging
689
+ Configuration.logger.debug "Calling API: WordsApi#get_document_bookmarks ..."
690
+ end
691
+
692
+ # verify the required parameter 'name' is set
693
+ fail "Missing the required parameter 'name' when calling get_document_bookmarks" if name.nil?
694
+
695
+ # resource path
696
+ path = "/words/{name}/bookmarks".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
697
+
698
+ # query parameters
699
+ query_params = {}
700
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
701
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
702
+
703
+ # header parameters
704
+ header_params = {}
705
+
706
+ # HTTP header 'Accept' (if needed)
707
+ _header_accept = ['application/json']
708
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
709
+
710
+ # HTTP header 'Content-Type'
711
+ _header_content_type = ['application/json']
712
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
713
+
714
+ # form parameters
715
+ form_params = {}
716
+
717
+ # http body (model)
718
+ post_body = nil
719
+
720
+
721
+ auth_names = []
722
+ result = @api_client.call_api(:GET, path,
723
+ :header_params => header_params,
724
+ :query_params => query_params,
725
+ :form_params => form_params,
726
+ :body => post_body,
727
+ :auth_names => auth_names,
728
+ :return_type => 'BookmarksResponse')
729
+ if Configuration.debugging
730
+ Configuration.logger.debug "API called: WordsApi#get_document_bookmarks. Result: #{result.inspect}"
731
+ end
732
+ return result
733
+ end
734
+
735
+ # Read document bookmark data by its name.
736
+ #
737
+ # @param name The document name.
738
+ # @param bookmark_name The bookmark name.
739
+ # @param [Hash] opts the optional parameters
740
+ # @option opts [String] :storage The document storage.
741
+ # @option opts [String] :folder The document folder.
742
+ # @return [BookmarkResponse]
743
+ def get_document_bookmark_by_name(name, bookmark_name, opts = {})
744
+ if Configuration.debugging
745
+ Configuration.logger.debug "Calling API: WordsApi#get_document_bookmark_by_name ..."
746
+ end
747
+
748
+ # verify the required parameter 'name' is set
749
+ fail "Missing the required parameter 'name' when calling get_document_bookmark_by_name" if name.nil?
750
+
751
+ # verify the required parameter 'bookmark_name' is set
752
+ fail "Missing the required parameter 'bookmark_name' when calling get_document_bookmark_by_name" if bookmark_name.nil?
753
+
754
+ # resource path
755
+ path = "/words/{name}/bookmarks/{bookmarkName}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkName' + '}', bookmark_name.to_s)
756
+
757
+ # query parameters
758
+ query_params = {}
759
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
760
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
761
+
762
+ # header parameters
763
+ header_params = {}
764
+
765
+ # HTTP header 'Accept' (if needed)
766
+ _header_accept = ['application/json']
767
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
768
+
769
+ # HTTP header 'Content-Type'
770
+ _header_content_type = ['application/json']
771
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
772
+
773
+ # form parameters
774
+ form_params = {}
775
+
776
+ # http body (model)
777
+ post_body = nil
778
+
779
+
780
+ auth_names = []
781
+ result = @api_client.call_api(:GET, path,
782
+ :header_params => header_params,
783
+ :query_params => query_params,
784
+ :form_params => form_params,
785
+ :body => post_body,
786
+ :auth_names => auth_names,
787
+ :return_type => 'BookmarkResponse')
788
+ if Configuration.debugging
789
+ Configuration.logger.debug "API called: WordsApi#get_document_bookmark_by_name. Result: #{result.inspect}"
790
+ end
791
+ return result
792
+ end
793
+
794
+ # Update document bookmark.
795
+ #
796
+ # @param name The document name.
797
+ # @param bookmark_name The bookmark name.
798
+ # @param bookmark_data {BookmarkData} with new bookmark data.
799
+ # @param [Hash] opts the optional parameters
800
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
801
+ # @option opts [String] :storage The document storage.
802
+ # @option opts [String] :folder The document folder.
803
+ # @return [BookmarkResponse]
804
+ def post_update_document_bookmark(name, bookmark_name, bookmark_data, opts = {})
805
+ if Configuration.debugging
806
+ Configuration.logger.debug "Calling API: WordsApi#post_update_document_bookmark ..."
807
+ end
808
+
809
+ # verify the required parameter 'name' is set
810
+ fail "Missing the required parameter 'name' when calling post_update_document_bookmark" if name.nil?
811
+
812
+ # verify the required parameter 'bookmark_name' is set
813
+ fail "Missing the required parameter 'bookmark_name' when calling post_update_document_bookmark" if bookmark_name.nil?
814
+
815
+ # verify the required parameter 'bookmark_data' is set
816
+ fail "Missing the required parameter 'bookmark_data' when calling post_update_document_bookmark" if bookmark_data.nil?
817
+
818
+ # resource path
819
+ path = "/words/{name}/bookmarks/{bookmarkName}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkName' + '}', bookmark_name.to_s)
820
+
821
+ # query parameters
822
+ query_params = {}
823
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
824
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
825
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
826
+
827
+ # header parameters
828
+ header_params = {}
829
+
830
+ # HTTP header 'Accept' (if needed)
831
+ _header_accept = ['application/json']
832
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
833
+
834
+ # HTTP header 'Content-Type'
835
+ _header_content_type = ['application/json']
836
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
837
+
838
+ # form parameters
839
+ form_params = {}
840
+
841
+ # http body (model)
842
+ post_body = @api_client.object_to_http_body(bookmark_data)
843
+
844
+
845
+ auth_names = []
846
+ result = @api_client.call_api(:POST, path,
847
+ :header_params => header_params,
848
+ :query_params => query_params,
849
+ :form_params => form_params,
850
+ :body => post_body,
851
+ :auth_names => auth_names,
852
+ :return_type => 'BookmarkResponse')
853
+ if Configuration.debugging
854
+ Configuration.logger.debug "API called: WordsApi#post_update_document_bookmark. Result: #{result.inspect}"
855
+ end
856
+ return result
857
+ end
858
+
859
+ # Get comments from document.
860
+ #
861
+ # @param name The file name.
862
+ # @param [Hash] opts the optional parameters
863
+ # @option opts [String] :storage The document storage.
864
+ # @option opts [String] :folder The document folder.
865
+ # @return [CommentsResponse]
866
+ def get_comments(name, opts = {})
867
+ if Configuration.debugging
868
+ Configuration.logger.debug "Calling API: WordsApi#get_comments ..."
869
+ end
870
+
871
+ # verify the required parameter 'name' is set
872
+ fail "Missing the required parameter 'name' when calling get_comments" if name.nil?
873
+
874
+ # resource path
875
+ path = "/words/{name}/comments".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
876
+
877
+ # query parameters
878
+ query_params = {}
879
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
880
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
881
+
882
+ # header parameters
883
+ header_params = {}
884
+
885
+ # HTTP header 'Accept' (if needed)
886
+ _header_accept = ['application/json']
887
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
888
+
889
+ # HTTP header 'Content-Type'
890
+ _header_content_type = ['application/json']
891
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
892
+
893
+ # form parameters
894
+ form_params = {}
895
+
896
+ # http body (model)
897
+ post_body = nil
898
+
899
+
900
+ auth_names = []
901
+ result = @api_client.call_api(:GET, path,
902
+ :header_params => header_params,
903
+ :query_params => query_params,
904
+ :form_params => form_params,
905
+ :body => post_body,
906
+ :auth_names => auth_names,
907
+ :return_type => 'CommentsResponse')
908
+ if Configuration.debugging
909
+ Configuration.logger.debug "API called: WordsApi#get_comments. Result: #{result.inspect}"
910
+ end
911
+ return result
912
+ end
913
+
914
+ # Adds comment to document, returns inserted comment's data.
915
+ #
916
+ # @param name The document name.
917
+ # @param comment Comment data.
918
+ # @param [Hash] opts the optional parameters
919
+ # @option opts [String] :file_name Destination file name.
920
+ # @option opts [String] :storage The document storage.
921
+ # @option opts [String] :folder The document folder.
922
+ # @return [CommentResponse]
923
+ def put_comment(name, comment, opts = {})
924
+ if Configuration.debugging
925
+ Configuration.logger.debug "Calling API: WordsApi#put_comment ..."
926
+ end
927
+
928
+ # verify the required parameter 'name' is set
929
+ fail "Missing the required parameter 'name' when calling put_comment" if name.nil?
930
+
931
+ # verify the required parameter 'comment' is set
932
+ fail "Missing the required parameter 'comment' when calling put_comment" if comment.nil?
933
+
934
+ # resource path
935
+ path = "/words/{name}/comments".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
936
+
937
+ # query parameters
938
+ query_params = {}
939
+ query_params[:'fileName'] = opts[:'file_name'] if opts[:'file_name']
940
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
941
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
942
+
943
+ # header parameters
944
+ header_params = {}
945
+
946
+ # HTTP header 'Accept' (if needed)
947
+ _header_accept = ['application/json']
948
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
949
+
950
+ # HTTP header 'Content-Type'
951
+ _header_content_type = ['application/json']
952
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
953
+
954
+ # form parameters
955
+ form_params = {}
956
+
957
+ # http body (model)
958
+ post_body = @api_client.object_to_http_body(comment)
959
+
960
+
961
+ auth_names = []
962
+ result = @api_client.call_api(:PUT, path,
963
+ :header_params => header_params,
964
+ :query_params => query_params,
965
+ :form_params => form_params,
966
+ :body => post_body,
967
+ :auth_names => auth_names,
968
+ :return_type => 'CommentResponse')
969
+ if Configuration.debugging
970
+ Configuration.logger.debug "API called: WordsApi#put_comment. Result: #{result.inspect}"
971
+ end
972
+ return result
973
+ end
974
+
975
+ # Get comment from document.
976
+ #
977
+ # @param name The file name.
978
+ # @param comment_index Comment index
979
+ # @param [Hash] opts the optional parameters
980
+ # @option opts [String] :storage The document storage.
981
+ # @option opts [String] :folder The document folder.
982
+ # @return [CommentResponse]
983
+ def get_comment(name, comment_index, opts = {})
984
+ if Configuration.debugging
985
+ Configuration.logger.debug "Calling API: WordsApi#get_comment ..."
986
+ end
987
+
988
+ # verify the required parameter 'name' is set
989
+ fail "Missing the required parameter 'name' when calling get_comment" if name.nil?
990
+
991
+ # verify the required parameter 'comment_index' is set
992
+ fail "Missing the required parameter 'comment_index' when calling get_comment" if comment_index.nil?
993
+
994
+ # resource path
995
+ path = "/words/{name}/comments/{commentIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'commentIndex' + '}', comment_index.to_s)
996
+
997
+ # query parameters
998
+ query_params = {}
999
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1000
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1001
+
1002
+ # header parameters
1003
+ header_params = {}
1004
+
1005
+ # HTTP header 'Accept' (if needed)
1006
+ _header_accept = ['application/json']
1007
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1008
+
1009
+ # HTTP header 'Content-Type'
1010
+ _header_content_type = ['application/json']
1011
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1012
+
1013
+ # form parameters
1014
+ form_params = {}
1015
+
1016
+ # http body (model)
1017
+ post_body = nil
1018
+
1019
+
1020
+ auth_names = []
1021
+ result = @api_client.call_api(:GET, path,
1022
+ :header_params => header_params,
1023
+ :query_params => query_params,
1024
+ :form_params => form_params,
1025
+ :body => post_body,
1026
+ :auth_names => auth_names,
1027
+ :return_type => 'CommentResponse')
1028
+ if Configuration.debugging
1029
+ Configuration.logger.debug "API called: WordsApi#get_comment. Result: #{result.inspect}"
1030
+ end
1031
+ return result
1032
+ end
1033
+
1034
+ # Updates the comment, returns updated comment's data.
1035
+ #
1036
+ # @param name The document name.
1037
+ # @param comment_index Comment index
1038
+ # @param comment Comment data.
1039
+ # @param [Hash] opts the optional parameters
1040
+ # @option opts [String] :file_name Destination file name.
1041
+ # @option opts [String] :storage The document storage.
1042
+ # @option opts [String] :folder The document folder.
1043
+ # @return [CommentResponse]
1044
+ def post_comment(name, comment_index, comment, opts = {})
1045
+ if Configuration.debugging
1046
+ Configuration.logger.debug "Calling API: WordsApi#post_comment ..."
1047
+ end
1048
+
1049
+ # verify the required parameter 'name' is set
1050
+ fail "Missing the required parameter 'name' when calling post_comment" if name.nil?
1051
+
1052
+ # verify the required parameter 'comment_index' is set
1053
+ fail "Missing the required parameter 'comment_index' when calling post_comment" if comment_index.nil?
1054
+
1055
+ # verify the required parameter 'comment' is set
1056
+ fail "Missing the required parameter 'comment' when calling post_comment" if comment.nil?
1057
+
1058
+ # resource path
1059
+ path = "/words/{name}/comments/{commentIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'commentIndex' + '}', comment_index.to_s)
1060
+
1061
+ # query parameters
1062
+ query_params = {}
1063
+ query_params[:'fileName'] = opts[:'file_name'] if opts[:'file_name']
1064
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1065
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1066
+
1067
+ # header parameters
1068
+ header_params = {}
1069
+
1070
+ # HTTP header 'Accept' (if needed)
1071
+ _header_accept = ['application/json']
1072
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1073
+
1074
+ # HTTP header 'Content-Type'
1075
+ _header_content_type = ['application/json']
1076
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1077
+
1078
+ # form parameters
1079
+ form_params = {}
1080
+
1081
+ # http body (model)
1082
+ post_body = @api_client.object_to_http_body(comment)
1083
+
1084
+
1085
+ auth_names = []
1086
+ result = @api_client.call_api(:POST, path,
1087
+ :header_params => header_params,
1088
+ :query_params => query_params,
1089
+ :form_params => form_params,
1090
+ :body => post_body,
1091
+ :auth_names => auth_names,
1092
+ :return_type => 'CommentResponse')
1093
+ if Configuration.debugging
1094
+ Configuration.logger.debug "API called: WordsApi#post_comment. Result: #{result.inspect}"
1095
+ end
1096
+ return result
1097
+ end
1098
+
1099
+ # Remove comment from document.
1100
+ #
1101
+ # @param name The file name.
1102
+ # @param comment_index Comment index
1103
+ # @param [Hash] opts the optional parameters
1104
+ # @option opts [String] :storage The document storage.
1105
+ # @option opts [String] :folder The document folder.
1106
+ # @option opts [String] :file_name Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
1107
+ # @return [BaseResponse]
1108
+ def delete_comment(name, comment_index, opts = {})
1109
+ if Configuration.debugging
1110
+ Configuration.logger.debug "Calling API: WordsApi#delete_comment ..."
1111
+ end
1112
+
1113
+ # verify the required parameter 'name' is set
1114
+ fail "Missing the required parameter 'name' when calling delete_comment" if name.nil?
1115
+
1116
+ # verify the required parameter 'comment_index' is set
1117
+ fail "Missing the required parameter 'comment_index' when calling delete_comment" if comment_index.nil?
1118
+
1119
+ # resource path
1120
+ path = "/words/{name}/comments/{commentIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'commentIndex' + '}', comment_index.to_s)
1121
+
1122
+ # query parameters
1123
+ query_params = {}
1124
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1125
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1126
+ query_params[:'fileName'] = opts[:'file_name'] if opts[:'file_name']
1127
+
1128
+ # header parameters
1129
+ header_params = {}
1130
+
1131
+ # HTTP header 'Accept' (if needed)
1132
+ _header_accept = ['application/json']
1133
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1134
+
1135
+ # HTTP header 'Content-Type'
1136
+ _header_content_type = ['application/json']
1137
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1138
+
1139
+ # form parameters
1140
+ form_params = {}
1141
+
1142
+ # http body (model)
1143
+ post_body = nil
1144
+
1145
+
1146
+ auth_names = []
1147
+ result = @api_client.call_api(:DELETE, path,
1148
+ :header_params => header_params,
1149
+ :query_params => query_params,
1150
+ :form_params => form_params,
1151
+ :body => post_body,
1152
+ :auth_names => auth_names,
1153
+ :return_type => 'BaseResponse')
1154
+ if Configuration.debugging
1155
+ Configuration.logger.debug "API called: WordsApi#delete_comment. Result: #{result.inspect}"
1156
+ end
1157
+ return result
1158
+ end
1159
+
1160
+ # Read document properties info.
1161
+ #
1162
+ # @param name The document's name.
1163
+ # @param [Hash] opts the optional parameters
1164
+ # @option opts [String] :storage The document's storage.
1165
+ # @option opts [String] :folder The document's folder.
1166
+ # @return [DocumentPropertiesResponse]
1167
+ def get_document_properties(name, opts = {})
1168
+ if Configuration.debugging
1169
+ Configuration.logger.debug "Calling API: WordsApi#get_document_properties ..."
1170
+ end
1171
+
1172
+ # verify the required parameter 'name' is set
1173
+ fail "Missing the required parameter 'name' when calling get_document_properties" if name.nil?
1174
+
1175
+ # resource path
1176
+ path = "/words/{name}/documentProperties".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1177
+
1178
+ # query parameters
1179
+ query_params = {}
1180
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1181
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1182
+
1183
+ # header parameters
1184
+ header_params = {}
1185
+
1186
+ # HTTP header 'Accept' (if needed)
1187
+ _header_accept = ['application/json']
1188
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1189
+
1190
+ # HTTP header 'Content-Type'
1191
+ _header_content_type = ['application/json']
1192
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1193
+
1194
+ # form parameters
1195
+ form_params = {}
1196
+
1197
+ # http body (model)
1198
+ post_body = nil
1199
+
1200
+
1201
+ auth_names = []
1202
+ result = @api_client.call_api(:GET, path,
1203
+ :header_params => header_params,
1204
+ :query_params => query_params,
1205
+ :form_params => form_params,
1206
+ :body => post_body,
1207
+ :auth_names => auth_names,
1208
+ :return_type => 'DocumentPropertiesResponse')
1209
+ if Configuration.debugging
1210
+ Configuration.logger.debug "API called: WordsApi#get_document_properties. Result: #{result.inspect}"
1211
+ end
1212
+ return result
1213
+ end
1214
+
1215
+ # Read document property info by the property name.
1216
+ #
1217
+ # @param name The document name.
1218
+ # @param property_name The property name.
1219
+ # @param [Hash] opts the optional parameters
1220
+ # @option opts [String] :storage The document storage.
1221
+ # @option opts [String] :folder The document folder.
1222
+ # @return [DocumentPropertyResponse]
1223
+ def get_document_property(name, property_name, opts = {})
1224
+ if Configuration.debugging
1225
+ Configuration.logger.debug "Calling API: WordsApi#get_document_property ..."
1226
+ end
1227
+
1228
+ # verify the required parameter 'name' is set
1229
+ fail "Missing the required parameter 'name' when calling get_document_property" if name.nil?
1230
+
1231
+ # verify the required parameter 'property_name' is set
1232
+ fail "Missing the required parameter 'property_name' when calling get_document_property" if property_name.nil?
1233
+
1234
+ # resource path
1235
+ path = "/words/{name}/documentProperties/{propertyName}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)
1236
+
1237
+ # query parameters
1238
+ query_params = {}
1239
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1240
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1241
+
1242
+ # header parameters
1243
+ header_params = {}
1244
+
1245
+ # HTTP header 'Accept' (if needed)
1246
+ _header_accept = ['application/json']
1247
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1248
+
1249
+ # HTTP header 'Content-Type'
1250
+ _header_content_type = ['application/json']
1251
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1252
+
1253
+ # form parameters
1254
+ form_params = {}
1255
+
1256
+ # http body (model)
1257
+ post_body = nil
1258
+
1259
+
1260
+ auth_names = []
1261
+ result = @api_client.call_api(:GET, path,
1262
+ :header_params => header_params,
1263
+ :query_params => query_params,
1264
+ :form_params => form_params,
1265
+ :body => post_body,
1266
+ :auth_names => auth_names,
1267
+ :return_type => 'DocumentPropertyResponse')
1268
+ if Configuration.debugging
1269
+ Configuration.logger.debug "API called: WordsApi#get_document_property. Result: #{result.inspect}"
1270
+ end
1271
+ return result
1272
+ end
1273
+
1274
+ # Add new or update existing document property.
1275
+ #
1276
+ # @param name The document name.
1277
+ # @param property_name The property name.
1278
+ # @param property The property with new value.
1279
+ # @param [Hash] opts the optional parameters
1280
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
1281
+ # @option opts [String] :storage Document's storage.
1282
+ # @option opts [String] :folder Document's folder.
1283
+ # @return [DocumentPropertyResponse]
1284
+ def put_update_document_property(name, property_name, property, opts = {})
1285
+ if Configuration.debugging
1286
+ Configuration.logger.debug "Calling API: WordsApi#put_update_document_property ..."
1287
+ end
1288
+
1289
+ # verify the required parameter 'name' is set
1290
+ fail "Missing the required parameter 'name' when calling put_update_document_property" if name.nil?
1291
+
1292
+ # verify the required parameter 'property_name' is set
1293
+ fail "Missing the required parameter 'property_name' when calling put_update_document_property" if property_name.nil?
1294
+
1295
+ # verify the required parameter 'property' is set
1296
+ fail "Missing the required parameter 'property' when calling put_update_document_property" if property.nil?
1297
+
1298
+ # resource path
1299
+ path = "/words/{name}/documentProperties/{propertyName}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)
1300
+
1301
+ # query parameters
1302
+ query_params = {}
1303
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
1304
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1305
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1306
+
1307
+ # header parameters
1308
+ header_params = {}
1309
+
1310
+ # HTTP header 'Accept' (if needed)
1311
+ _header_accept = ['application/json']
1312
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1313
+
1314
+ # HTTP header 'Content-Type'
1315
+ _header_content_type = ['application/json']
1316
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1317
+
1318
+ # form parameters
1319
+ form_params = {}
1320
+
1321
+ # http body (model)
1322
+ post_body = @api_client.object_to_http_body(property)
1323
+
1324
+
1325
+ auth_names = []
1326
+ result = @api_client.call_api(:PUT, path,
1327
+ :header_params => header_params,
1328
+ :query_params => query_params,
1329
+ :form_params => form_params,
1330
+ :body => post_body,
1331
+ :auth_names => auth_names,
1332
+ :return_type => 'DocumentPropertyResponse')
1333
+ if Configuration.debugging
1334
+ Configuration.logger.debug "API called: WordsApi#put_update_document_property. Result: #{result.inspect}"
1335
+ end
1336
+ return result
1337
+ end
1338
+
1339
+ # Delete document property.
1340
+ #
1341
+ # @param name The document name.
1342
+ # @param property_name The property name.
1343
+ # @param [Hash] opts the optional parameters
1344
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
1345
+ # @option opts [String] :storage Document's storage.
1346
+ # @option opts [String] :folder Document's folder.
1347
+ # @return [BaseResponse]
1348
+ def delete_document_property(name, property_name, opts = {})
1349
+ if Configuration.debugging
1350
+ Configuration.logger.debug "Calling API: WordsApi#delete_document_property ..."
1351
+ end
1352
+
1353
+ # verify the required parameter 'name' is set
1354
+ fail "Missing the required parameter 'name' when calling delete_document_property" if name.nil?
1355
+
1356
+ # verify the required parameter 'property_name' is set
1357
+ fail "Missing the required parameter 'property_name' when calling delete_document_property" if property_name.nil?
1358
+
1359
+ # resource path
1360
+ path = "/words/{name}/documentProperties/{propertyName}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)
1361
+
1362
+ # query parameters
1363
+ query_params = {}
1364
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
1365
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1366
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1367
+
1368
+ # header parameters
1369
+ header_params = {}
1370
+
1371
+ # HTTP header 'Accept' (if needed)
1372
+ _header_accept = ['application/json']
1373
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1374
+
1375
+ # HTTP header 'Content-Type'
1376
+ _header_content_type = ['application/json']
1377
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1378
+
1379
+ # form parameters
1380
+ form_params = {}
1381
+
1382
+ # http body (model)
1383
+ post_body = nil
1384
+
1385
+
1386
+ auth_names = []
1387
+ result = @api_client.call_api(:DELETE, path,
1388
+ :header_params => header_params,
1389
+ :query_params => query_params,
1390
+ :form_params => form_params,
1391
+ :body => post_body,
1392
+ :auth_names => auth_names,
1393
+ :return_type => 'BaseResponse')
1394
+ if Configuration.debugging
1395
+ Configuration.logger.debug "API called: WordsApi#delete_document_property. Result: #{result.inspect}"
1396
+ end
1397
+ return result
1398
+ end
1399
+
1400
+ # Read document drawing objects common info.
1401
+ #
1402
+ # @param name The document name.
1403
+ # @param [Hash] opts the optional parameters
1404
+ # @option opts [String] :storage The document storage.
1405
+ # @option opts [String] :folder The document folder.
1406
+ # @return [DrawingObjectsResponse]
1407
+ def get_document_drawing_objects(name, opts = {})
1408
+ if Configuration.debugging
1409
+ Configuration.logger.debug "Calling API: WordsApi#get_document_drawing_objects ..."
1410
+ end
1411
+
1412
+ # verify the required parameter 'name' is set
1413
+ fail "Missing the required parameter 'name' when calling get_document_drawing_objects" if name.nil?
1414
+
1415
+ # resource path
1416
+ path = "/words/{name}/drawingObjects".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1417
+
1418
+ # query parameters
1419
+ query_params = {}
1420
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1421
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1422
+
1423
+ # header parameters
1424
+ header_params = {}
1425
+
1426
+ # HTTP header 'Accept' (if needed)
1427
+ _header_accept = ['application/json']
1428
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1429
+
1430
+ # HTTP header 'Content-Type'
1431
+ _header_content_type = ['application/json']
1432
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1433
+
1434
+ # form parameters
1435
+ form_params = {}
1436
+
1437
+ # http body (model)
1438
+ post_body = nil
1439
+
1440
+
1441
+ auth_names = []
1442
+ result = @api_client.call_api(:GET, path,
1443
+ :header_params => header_params,
1444
+ :query_params => query_params,
1445
+ :form_params => form_params,
1446
+ :body => post_body,
1447
+ :auth_names => auth_names,
1448
+ :return_type => 'DrawingObjectsResponse')
1449
+ if Configuration.debugging
1450
+ Configuration.logger.debug "API called: WordsApi#get_document_drawing_objects. Result: #{result.inspect}"
1451
+ end
1452
+ return result
1453
+ end
1454
+
1455
+ # Read document drawing object common info by its index
1456
+ #
1457
+ # @param name The document name.
1458
+ # @param object_index The drawing object index.
1459
+ # @param [Hash] opts the optional parameters
1460
+ # @option opts [String] :storage The document storage.
1461
+ # @option opts [String] :folder The document folder full path.
1462
+ # @return [DrawingObjectResponse]
1463
+ def get_document_drawing_object_by_index(name, object_index, opts = {})
1464
+ if Configuration.debugging
1465
+ Configuration.logger.debug "Calling API: WordsApi#get_document_drawing_object_by_index ..."
1466
+ end
1467
+
1468
+ # verify the required parameter 'name' is set
1469
+ fail "Missing the required parameter 'name' when calling get_document_drawing_object_by_index" if name.nil?
1470
+
1471
+ # verify the required parameter 'object_index' is set
1472
+ fail "Missing the required parameter 'object_index' when calling get_document_drawing_object_by_index" if object_index.nil?
1473
+
1474
+ # resource path
1475
+ path = "/words/{name}/drawingObjects/{objectIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'objectIndex' + '}', object_index.to_s)
1476
+
1477
+ # query parameters
1478
+ query_params = {}
1479
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1480
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1481
+
1482
+ # header parameters
1483
+ header_params = {}
1484
+
1485
+ # HTTP header 'Accept' (if needed)
1486
+ _header_accept = ['application/json']
1487
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1488
+
1489
+ # HTTP header 'Content-Type'
1490
+ _header_content_type = ['application/json']
1491
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1492
+
1493
+ # form parameters
1494
+ form_params = {}
1495
+
1496
+ # http body (model)
1497
+ post_body = nil
1498
+
1499
+
1500
+ auth_names = []
1501
+ result = @api_client.call_api(:GET, path,
1502
+ :header_params => header_params,
1503
+ :query_params => query_params,
1504
+ :form_params => form_params,
1505
+ :body => post_body,
1506
+ :auth_names => auth_names,
1507
+ :return_type => 'DrawingObjectResponse')
1508
+ if Configuration.debugging
1509
+ Configuration.logger.debug "API called: WordsApi#get_document_drawing_object_by_index. Result: #{result.inspect}"
1510
+ end
1511
+ return result
1512
+ end
1513
+
1514
+ # Read document drawing object common info by its index or convert to format specified.
1515
+ #
1516
+ # @param name
1517
+ # @param object_index
1518
+ # @param format
1519
+ # @param [Hash] opts the optional parameters
1520
+ # @option opts [String] :storage
1521
+ # @option opts [String] :folder
1522
+ # @return [File]
1523
+ def get_document_drawing_object_by_index_with_format(name, object_index, format, opts = {})
1524
+ if Configuration.debugging
1525
+ Configuration.logger.debug "Calling API: WordsApi#get_document_drawing_object_by_index_with_format ..."
1526
+ end
1527
+
1528
+ # verify the required parameter 'name' is set
1529
+ fail "Missing the required parameter 'name' when calling get_document_drawing_object_by_index_with_format" if name.nil?
1530
+
1531
+ # verify the required parameter 'object_index' is set
1532
+ fail "Missing the required parameter 'object_index' when calling get_document_drawing_object_by_index_with_format" if object_index.nil?
1533
+
1534
+ # verify the required parameter 'format' is set
1535
+ fail "Missing the required parameter 'format' when calling get_document_drawing_object_by_index_with_format" if format.nil?
1536
+
1537
+ # resource path
1538
+ path = "/words/{name}/drawingObjects/{objectIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'objectIndex' + '}', object_index.to_s)
1539
+
1540
+ # query parameters
1541
+ query_params = {}
1542
+ query_params[:'format'] = format
1543
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1544
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1545
+
1546
+ # header parameters
1547
+ header_params = {}
1548
+
1549
+ # HTTP header 'Accept' (if needed)
1550
+ _header_accept = ['multipart/form-data']
1551
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1552
+
1553
+ # HTTP header 'Content-Type'
1554
+ _header_content_type = ['application/json']
1555
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1556
+
1557
+ # form parameters
1558
+ form_params = {}
1559
+
1560
+ # http body (model)
1561
+ post_body = nil
1562
+
1563
+
1564
+ auth_names = []
1565
+ result = @api_client.call_api(:GET, path,
1566
+ :header_params => header_params,
1567
+ :query_params => query_params,
1568
+ :form_params => form_params,
1569
+ :body => post_body,
1570
+ :auth_names => auth_names,
1571
+ :return_type => 'File')
1572
+ if Configuration.debugging
1573
+ Configuration.logger.debug "API called: WordsApi#get_document_drawing_object_by_index_with_format. Result: #{result.inspect}"
1574
+ end
1575
+ return result
1576
+ end
1577
+
1578
+ # Read drawing object image data.
1579
+ #
1580
+ # @param name The document name.
1581
+ # @param object_index The drawing object index.
1582
+ # @param [Hash] opts the optional parameters
1583
+ # @option opts [String] :storage The document storage.
1584
+ # @option opts [String] :folder The document folder.
1585
+ # @return [File]
1586
+ def get_document_drawing_object_image_data(name, object_index, opts = {})
1587
+ if Configuration.debugging
1588
+ Configuration.logger.debug "Calling API: WordsApi#get_document_drawing_object_image_data ..."
1589
+ end
1590
+
1591
+ # verify the required parameter 'name' is set
1592
+ fail "Missing the required parameter 'name' when calling get_document_drawing_object_image_data" if name.nil?
1593
+
1594
+ # verify the required parameter 'object_index' is set
1595
+ fail "Missing the required parameter 'object_index' when calling get_document_drawing_object_image_data" if object_index.nil?
1596
+
1597
+ # resource path
1598
+ path = "/words/{name}/drawingObjects/{objectIndex}/imageData".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'objectIndex' + '}', object_index.to_s)
1599
+
1600
+ # query parameters
1601
+ query_params = {}
1602
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1603
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1604
+
1605
+ # header parameters
1606
+ header_params = {}
1607
+
1608
+ # HTTP header 'Accept' (if needed)
1609
+ _header_accept = ['multipart/form-data']
1610
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1611
+
1612
+ # HTTP header 'Content-Type'
1613
+ _header_content_type = ['application/json']
1614
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1615
+
1616
+ # form parameters
1617
+ form_params = {}
1618
+
1619
+ # http body (model)
1620
+ post_body = nil
1621
+
1622
+
1623
+ auth_names = []
1624
+ result = @api_client.call_api(:GET, path,
1625
+ :header_params => header_params,
1626
+ :query_params => query_params,
1627
+ :form_params => form_params,
1628
+ :body => post_body,
1629
+ :auth_names => auth_names,
1630
+ :return_type => 'File')
1631
+ if Configuration.debugging
1632
+ Configuration.logger.debug "API called: WordsApi#get_document_drawing_object_image_data. Result: #{result.inspect}"
1633
+ end
1634
+ return result
1635
+ end
1636
+
1637
+ # Get drawing object OLE data.
1638
+ #
1639
+ # @param name The document name.
1640
+ # @param object_index The object index.
1641
+ # @param [Hash] opts the optional parameters
1642
+ # @option opts [String] :storage The document storage.
1643
+ # @option opts [String] :folder The document folder.
1644
+ # @return [File]
1645
+ def get_document_drawing_object_ole_data(name, object_index, opts = {})
1646
+ if Configuration.debugging
1647
+ Configuration.logger.debug "Calling API: WordsApi#get_document_drawing_object_ole_data ..."
1648
+ end
1649
+
1650
+ # verify the required parameter 'name' is set
1651
+ fail "Missing the required parameter 'name' when calling get_document_drawing_object_ole_data" if name.nil?
1652
+
1653
+ # verify the required parameter 'object_index' is set
1654
+ fail "Missing the required parameter 'object_index' when calling get_document_drawing_object_ole_data" if object_index.nil?
1655
+
1656
+ # resource path
1657
+ path = "/words/{name}/drawingObjects/{objectIndex}/oleData".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'objectIndex' + '}', object_index.to_s)
1658
+
1659
+ # query parameters
1660
+ query_params = {}
1661
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1662
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1663
+
1664
+ # header parameters
1665
+ header_params = {}
1666
+
1667
+ # HTTP header 'Accept' (if needed)
1668
+ _header_accept = ['multipart/form-data']
1669
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1670
+
1671
+ # HTTP header 'Content-Type'
1672
+ _header_content_type = ['application/json']
1673
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1674
+
1675
+ # form parameters
1676
+ form_params = {}
1677
+
1678
+ # http body (model)
1679
+ post_body = nil
1680
+
1681
+
1682
+ auth_names = []
1683
+ result = @api_client.call_api(:GET, path,
1684
+ :header_params => header_params,
1685
+ :query_params => query_params,
1686
+ :form_params => form_params,
1687
+ :body => post_body,
1688
+ :auth_names => auth_names,
1689
+ :return_type => 'File')
1690
+ if Configuration.debugging
1691
+ Configuration.logger.debug "API called: WordsApi#get_document_drawing_object_ole_data. Result: #{result.inspect}"
1692
+ end
1693
+ return result
1694
+ end
1695
+
1696
+ # Execute document mail merge operation.
1697
+ #
1698
+ # @param name The document name.
1699
+ # @param with_regions With regions flag.
1700
+ # @param file
1701
+ # @param [Hash] opts the optional parameters
1702
+ # @option opts [String] :mail_merge_data_file Mail merge data.
1703
+ # @option opts [String] :cleanup Clean up options.
1704
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
1705
+ # @option opts [String] :storage The document storage.
1706
+ # @option opts [String] :folder The document folder.
1707
+ # @option opts [BOOLEAN] :use_whole_paragraph_as_region Gets or sets a value indicating whether paragraph with TableStart or TableEnd field should be fully included into mail merge region or particular range between TableStart and TableEnd fields. The default value is true.
1708
+ # @return [DocumentResponse]
1709
+ def post_document_execute_mail_merge(name, with_regions, file, opts = {})
1710
+ if Configuration.debugging
1711
+ Configuration.logger.debug "Calling API: WordsApi#post_document_execute_mail_merge ..."
1712
+ end
1713
+
1714
+ # verify the required parameter 'name' is set
1715
+ fail "Missing the required parameter 'name' when calling post_document_execute_mail_merge" if name.nil?
1716
+
1717
+ # verify the required parameter 'with_regions' is set
1718
+ fail "Missing the required parameter 'with_regions' when calling post_document_execute_mail_merge" if with_regions.nil?
1719
+
1720
+ # verify the required parameter 'file' is set
1721
+ fail "Missing the required parameter 'file' when calling post_document_execute_mail_merge" if file.nil?
1722
+
1723
+ # resource path
1724
+ path = "/words/{name}/executeMailMerge/{withRegions}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'withRegions' + '}', with_regions.to_s)
1725
+
1726
+ # query parameters
1727
+ query_params = {}
1728
+ query_params[:'mailMergeDataFile'] = opts[:'mail_merge_data_file'] if opts[:'mail_merge_data_file']
1729
+ query_params[:'cleanup'] = opts[:'cleanup'] if opts[:'cleanup']
1730
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
1731
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1732
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1733
+ query_params[:'useWholeParagraphAsRegion'] = opts[:'use_whole_paragraph_as_region'] if opts[:'use_whole_paragraph_as_region']
1734
+
1735
+ # header parameters
1736
+ header_params = {}
1737
+
1738
+ # HTTP header 'Accept' (if needed)
1739
+ _header_accept = ['application/json']
1740
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1741
+
1742
+ # HTTP header 'Content-Type'
1743
+ _header_content_type = ['multipart/form-data']
1744
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1745
+
1746
+ # form parameters
1747
+ form_params = {}
1748
+ form_params["file"] = file
1749
+
1750
+ # http body (model)
1751
+ post_body = nil
1752
+
1753
+
1754
+ auth_names = []
1755
+ result = @api_client.call_api(:POST, path,
1756
+ :header_params => header_params,
1757
+ :query_params => query_params,
1758
+ :form_params => form_params,
1759
+ :body => post_body,
1760
+ :auth_names => auth_names,
1761
+ :return_type => 'DocumentResponse')
1762
+ if Configuration.debugging
1763
+ Configuration.logger.debug "API called: WordsApi#post_document_execute_mail_merge. Result: #{result.inspect}"
1764
+ end
1765
+ return result
1766
+ end
1767
+
1768
+ # Populate document template with data.
1769
+ #
1770
+ # @param name The template document name.
1771
+ # @param file
1772
+ # @param [Hash] opts the optional parameters
1773
+ # @option opts [String] :cleanup Clean up options.
1774
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
1775
+ # @option opts [String] :storage The document storage.
1776
+ # @option opts [String] :folder The document folder.
1777
+ # @option opts [BOOLEAN] :use_whole_paragraph_as_region Gets or sets a value indicating whether paragraph with TableStart or TableEnd field should be fully included into mail merge region or particular range between TableStart and TableEnd fields. The default value is true.
1778
+ # @option opts [BOOLEAN] :with_regions Merge with regions or not. True by default
1779
+ # @return [DocumentResponse]
1780
+ def post_execute_template(name, file, opts = {})
1781
+ if Configuration.debugging
1782
+ Configuration.logger.debug "Calling API: WordsApi#post_execute_template ..."
1783
+ end
1784
+
1785
+ # verify the required parameter 'name' is set
1786
+ fail "Missing the required parameter 'name' when calling post_execute_template" if name.nil?
1787
+
1788
+ # verify the required parameter 'file' is set
1789
+ fail "Missing the required parameter 'file' when calling post_execute_template" if file.nil?
1790
+
1791
+ # resource path
1792
+ path = "/words/{name}/executeTemplate".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1793
+
1794
+ # query parameters
1795
+ query_params = {}
1796
+ query_params[:'cleanup'] = opts[:'cleanup'] if opts[:'cleanup']
1797
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
1798
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1799
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1800
+ query_params[:'useWholeParagraphAsRegion'] = opts[:'use_whole_paragraph_as_region'] if opts[:'use_whole_paragraph_as_region']
1801
+ query_params[:'withRegions'] = opts[:'with_regions'] if opts[:'with_regions']
1802
+
1803
+ # header parameters
1804
+ header_params = {}
1805
+
1806
+ # HTTP header 'Accept' (if needed)
1807
+ _header_accept = ['application/json']
1808
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1809
+
1810
+ # HTTP header 'Content-Type'
1811
+ _header_content_type = ['multipart/form-data']
1812
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1813
+
1814
+ # form parameters
1815
+ form_params = {}
1816
+ form_params["file"] = file
1817
+
1818
+ # http body (model)
1819
+ post_body = nil
1820
+
1821
+ auth_names = []
1822
+ result = @api_client.call_api(:POST, path,
1823
+ :header_params => header_params,
1824
+ :query_params => query_params,
1825
+ :form_params => form_params,
1826
+ :body => post_body,
1827
+ :auth_names => auth_names,
1828
+ :return_type => 'DocumentResponse')
1829
+ if Configuration.debugging
1830
+ Configuration.logger.debug "API called: WordsApi#post_execute_template. Result: #{result.inspect}"
1831
+ end
1832
+ return result
1833
+ end
1834
+
1835
+ # Remove fields from document.
1836
+ #
1837
+ # @param name The file name.
1838
+ # @param [Hash] opts the optional parameters
1839
+ # @option opts [String] :storage The document storage.
1840
+ # @option opts [String] :folder The document folder.
1841
+ # @return [BaseResponse]
1842
+ def delete_document_fields(name, opts = {})
1843
+ if Configuration.debugging
1844
+ Configuration.logger.debug "Calling API: WordsApi#delete_document_fields ..."
1845
+ end
1846
+
1847
+ # verify the required parameter 'name' is set
1848
+ fail "Missing the required parameter 'name' when calling delete_document_fields" if name.nil?
1849
+
1850
+ # resource path
1851
+ path = "/words/{name}/fields".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1852
+
1853
+ # query parameters
1854
+ query_params = {}
1855
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1856
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1857
+
1858
+ # header parameters
1859
+ header_params = {}
1860
+
1861
+ # HTTP header 'Accept' (if needed)
1862
+ _header_accept = ['application/json']
1863
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1864
+
1865
+ # HTTP header 'Content-Type'
1866
+ _header_content_type = ['application/json']
1867
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1868
+
1869
+ # form parameters
1870
+ form_params = {}
1871
+
1872
+ # http body (model)
1873
+ post_body = nil
1874
+
1875
+
1876
+ auth_names = []
1877
+ result = @api_client.call_api(:DELETE, path,
1878
+ :header_params => header_params,
1879
+ :query_params => query_params,
1880
+ :form_params => form_params,
1881
+ :body => post_body,
1882
+ :auth_names => auth_names,
1883
+ :return_type => 'BaseResponse')
1884
+ if Configuration.debugging
1885
+ Configuration.logger.debug "API called: WordsApi#delete_document_fields. Result: #{result.inspect}"
1886
+ end
1887
+ return result
1888
+ end
1889
+
1890
+ # Delete document headers and footers.
1891
+ #
1892
+ # @param name The document name.
1893
+ # @param [Hash] opts the optional parameters
1894
+ # @option opts [String] :headers_footers_types List of types of headers and footers.
1895
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
1896
+ # @option opts [String] :storage The document storage.
1897
+ # @option opts [String] :folder The document folder.
1898
+ # @return [BaseResponse]
1899
+ def delete_headers_footers(name, opts = {})
1900
+ if Configuration.debugging
1901
+ Configuration.logger.debug "Calling API: WordsApi#delete_headers_footers ..."
1902
+ end
1903
+
1904
+ # verify the required parameter 'name' is set
1905
+ fail "Missing the required parameter 'name' when calling delete_headers_footers" if name.nil?
1906
+
1907
+ # resource path
1908
+ path = "/words/{name}/headersfooters".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1909
+
1910
+ # query parameters
1911
+ query_params = {}
1912
+ query_params[:'headersFootersTypes'] = opts[:'headers_footers_types'] if opts[:'headers_footers_types']
1913
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
1914
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1915
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1916
+
1917
+ # header parameters
1918
+ header_params = {}
1919
+
1920
+ # HTTP header 'Accept' (if needed)
1921
+ _header_accept = ['application/json']
1922
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1923
+
1924
+ # HTTP header 'Content-Type'
1925
+ _header_content_type = ['application/json']
1926
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1927
+
1928
+ # form parameters
1929
+ form_params = {}
1930
+
1931
+ # http body (model)
1932
+ post_body = nil
1933
+
1934
+
1935
+ auth_names = []
1936
+ result = @api_client.call_api(:DELETE, path,
1937
+ :header_params => header_params,
1938
+ :query_params => query_params,
1939
+ :form_params => form_params,
1940
+ :body => post_body,
1941
+ :auth_names => auth_names,
1942
+ :return_type => 'BaseResponse')
1943
+ if Configuration.debugging
1944
+ Configuration.logger.debug "API called: WordsApi#delete_headers_footers. Result: #{result.inspect}"
1945
+ end
1946
+ return result
1947
+ end
1948
+
1949
+ # Read document hyperlinks common info.
1950
+ #
1951
+ # @param name The document name.
1952
+ # @param [Hash] opts the optional parameters
1953
+ # @option opts [String] :storage The document storage.
1954
+ # @option opts [String] :folder The document folder.
1955
+ # @return [HyperlinksResponse]
1956
+ def get_document_hyperlinks(name, opts = {})
1957
+ if Configuration.debugging
1958
+ Configuration.logger.debug "Calling API: WordsApi#get_document_hyperlinks ..."
1959
+ end
1960
+
1961
+ # verify the required parameter 'name' is set
1962
+ fail "Missing the required parameter 'name' when calling get_document_hyperlinks" if name.nil?
1963
+
1964
+ # resource path
1965
+ path = "/words/{name}/hyperlinks".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1966
+
1967
+ # query parameters
1968
+ query_params = {}
1969
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1970
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1971
+
1972
+ # header parameters
1973
+ header_params = {}
1974
+
1975
+ # HTTP header 'Accept' (if needed)
1976
+ _header_accept = ['application/json']
1977
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1978
+
1979
+ # HTTP header 'Content-Type'
1980
+ _header_content_type = ['application/json']
1981
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1982
+
1983
+ # form parameters
1984
+ form_params = {}
1985
+
1986
+ # http body (model)
1987
+ post_body = nil
1988
+
1989
+
1990
+ auth_names = []
1991
+ result = @api_client.call_api(:GET, path,
1992
+ :header_params => header_params,
1993
+ :query_params => query_params,
1994
+ :form_params => form_params,
1995
+ :body => post_body,
1996
+ :auth_names => auth_names,
1997
+ :return_type => 'HyperlinksResponse')
1998
+ if Configuration.debugging
1999
+ Configuration.logger.debug "API called: WordsApi#get_document_hyperlinks. Result: #{result.inspect}"
2000
+ end
2001
+ return result
2002
+ end
2003
+
2004
+ # Read document hyperlink by its index.
2005
+ #
2006
+ # @param name The document name.
2007
+ # @param hyperlink_index The hyperlink index.
2008
+ # @param [Hash] opts the optional parameters
2009
+ # @option opts [String] :storage The document storage.
2010
+ # @option opts [String] :folder The document folder.
2011
+ # @return [HyperlinkResponse]
2012
+ def get_document_hyperlink_by_index(name, hyperlink_index, opts = {})
2013
+ if Configuration.debugging
2014
+ Configuration.logger.debug "Calling API: WordsApi#get_document_hyperlink_by_index ..."
2015
+ end
2016
+
2017
+ # verify the required parameter 'name' is set
2018
+ fail "Missing the required parameter 'name' when calling get_document_hyperlink_by_index" if name.nil?
2019
+
2020
+ # verify the required parameter 'hyperlink_index' is set
2021
+ fail "Missing the required parameter 'hyperlink_index' when calling get_document_hyperlink_by_index" if hyperlink_index.nil?
2022
+
2023
+ # resource path
2024
+ path = "/words/{name}/hyperlinks/{hyperlinkIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'hyperlinkIndex' + '}', hyperlink_index.to_s)
2025
+
2026
+ # query parameters
2027
+ query_params = {}
2028
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2029
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2030
+
2031
+ # header parameters
2032
+ header_params = {}
2033
+
2034
+ # HTTP header 'Accept' (if needed)
2035
+ _header_accept = ['application/json']
2036
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2037
+
2038
+ # HTTP header 'Content-Type'
2039
+ _header_content_type = ['application/json']
2040
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2041
+
2042
+ # form parameters
2043
+ form_params = {}
2044
+
2045
+ # http body (model)
2046
+ post_body = nil
2047
+
2048
+
2049
+ auth_names = []
2050
+ result = @api_client.call_api(:GET, path,
2051
+ :header_params => header_params,
2052
+ :query_params => query_params,
2053
+ :form_params => form_params,
2054
+ :body => post_body,
2055
+ :auth_names => auth_names,
2056
+ :return_type => 'HyperlinkResponse')
2057
+ if Configuration.debugging
2058
+ Configuration.logger.debug "API called: WordsApi#get_document_hyperlink_by_index. Result: #{result.inspect}"
2059
+ end
2060
+ return result
2061
+ end
2062
+
2063
+ # Insert document page numbers.
2064
+ #
2065
+ # @param name A document name.
2066
+ # @param page_number {PageNumber} with the page numbers settings.
2067
+ # @param [Hash] opts the optional parameters
2068
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2069
+ # @option opts [String] :storage The document storage.
2070
+ # @option opts [String] :folder The document folder.
2071
+ # @return [DocumentResponse]
2072
+ def post_insert_page_numbers(name, page_number, opts = {})
2073
+ if Configuration.debugging
2074
+ Configuration.logger.debug "Calling API: WordsApi#post_insert_page_numbers ..."
2075
+ end
2076
+
2077
+ # verify the required parameter 'name' is set
2078
+ fail "Missing the required parameter 'name' when calling post_insert_page_numbers" if name.nil?
2079
+
2080
+ # verify the required parameter 'page_number' is set
2081
+ fail "Missing the required parameter 'page_number' when calling post_insert_page_numbers" if page_number.nil?
2082
+
2083
+ # resource path
2084
+ path = "/words/{name}/insertPageNumbers".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2085
+
2086
+ # query parameters
2087
+ query_params = {}
2088
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2089
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2090
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2091
+
2092
+ # header parameters
2093
+ header_params = {}
2094
+
2095
+ # HTTP header 'Accept' (if needed)
2096
+ _header_accept = ['application/json']
2097
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2098
+
2099
+ # HTTP header 'Content-Type'
2100
+ _header_content_type = ['application/json']
2101
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2102
+
2103
+ # form parameters
2104
+ form_params = {}
2105
+
2106
+ # http body (model)
2107
+ post_body = @api_client.object_to_http_body(page_number)
2108
+
2109
+
2110
+ auth_names = []
2111
+ result = @api_client.call_api(:POST, path,
2112
+ :header_params => header_params,
2113
+ :query_params => query_params,
2114
+ :form_params => form_params,
2115
+ :body => post_body,
2116
+ :auth_names => auth_names,
2117
+ :return_type => 'DocumentResponse')
2118
+ if Configuration.debugging
2119
+ Configuration.logger.debug "API called: WordsApi#post_insert_page_numbers. Result: #{result.inspect}"
2120
+ end
2121
+ return result
2122
+ end
2123
+
2124
+ # Insert document watermark image.
2125
+ #
2126
+ # @param name The document name.
2127
+ # @param [Hash] opts the optional parameters
2128
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2129
+ # @option opts [Float] :rotation_angle The watermark rotation angle.
2130
+ # @option opts [String] :image The image file server full name. If the name is empty the image is expected in request content.
2131
+ # @option opts [String] :storage The document storage.
2132
+ # @option opts [String] :folder The document folder.
2133
+ # @return [DocumentResponse]
2134
+ def post_insert_watermark_image(name, opts = {})
2135
+ if Configuration.debugging
2136
+ Configuration.logger.debug "Calling API: WordsApi#post_insert_watermark_image ..."
2137
+ end
2138
+
2139
+ # verify the required parameter 'name' is set
2140
+ fail "Missing the required parameter 'name' when calling post_insert_watermark_image" if name.nil?
2141
+
2142
+ # resource path
2143
+ path = "/words/{name}/insertWatermarkImage".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2144
+
2145
+ # query parameters
2146
+ query_params = {}
2147
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2148
+ query_params[:'rotationAngle'] = opts[:'rotation_angle'] if opts[:'rotation_angle']
2149
+ query_params[:'image'] = opts[:'image'] if opts[:'image']
2150
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2151
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2152
+
2153
+ # header parameters
2154
+ header_params = {}
2155
+
2156
+ # HTTP header 'Accept' (if needed)
2157
+ _header_accept = ['application/json']
2158
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2159
+
2160
+ # HTTP header 'Content-Type'
2161
+ _header_content_type = ['application/json']
2162
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2163
+
2164
+ # form parameters
2165
+ form_params = {}
2166
+
2167
+ # http body (model)
2168
+ post_body = nil
2169
+
2170
+
2171
+ auth_names = []
2172
+ result = @api_client.call_api(:POST, path,
2173
+ :header_params => header_params,
2174
+ :query_params => query_params,
2175
+ :form_params => form_params,
2176
+ :body => post_body,
2177
+ :auth_names => auth_names,
2178
+ :return_type => 'DocumentResponse')
2179
+ if Configuration.debugging
2180
+ Configuration.logger.debug "API called: WordsApi#post_insert_watermark_image. Result: #{result.inspect}"
2181
+ end
2182
+ return result
2183
+ end
2184
+
2185
+ # Insert document watermark text.
2186
+ #
2187
+ # @param name The document name.
2188
+ # @param watermark_text {WatermarkText} with the watermark data.If the parameter is provided the query string parameters are ignored.
2189
+ # @param [Hash] opts the optional parameters
2190
+ # @option opts [String] :text The text to insert.
2191
+ # @option opts [Float] :rotation_angle The text rotation angle.
2192
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2193
+ # @option opts [String] :storage The document storage.
2194
+ # @option opts [String] :folder The document folder.
2195
+ # @return [DocumentResponse]
2196
+ def post_insert_watermark_text(name, watermark_text, opts = {})
2197
+ if Configuration.debugging
2198
+ Configuration.logger.debug "Calling API: WordsApi#post_insert_watermark_text ..."
2199
+ end
2200
+
2201
+ # verify the required parameter 'name' is set
2202
+ fail "Missing the required parameter 'name' when calling post_insert_watermark_text" if name.nil?
2203
+
2204
+ # verify the required parameter 'watermark_text' is set
2205
+ fail "Missing the required parameter 'watermark_text' when calling post_insert_watermark_text" if watermark_text.nil?
2206
+
2207
+ # resource path
2208
+ path = "/words/{name}/insertWatermarkText".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2209
+
2210
+ # query parameters
2211
+ query_params = {}
2212
+ query_params[:'text'] = opts[:'text'] if opts[:'text']
2213
+ query_params[:'rotationAngle'] = opts[:'rotation_angle'] if opts[:'rotation_angle']
2214
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2215
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2216
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2217
+
2218
+ # header parameters
2219
+ header_params = {}
2220
+
2221
+ # HTTP header 'Accept' (if needed)
2222
+ _header_accept = ['application/json']
2223
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2224
+
2225
+ # HTTP header 'Content-Type'
2226
+ _header_content_type = ['application/json']
2227
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2228
+
2229
+ # form parameters
2230
+ form_params = {}
2231
+
2232
+ # http body (model)
2233
+ post_body = @api_client.object_to_http_body(watermark_text)
2234
+
2235
+
2236
+ auth_names = []
2237
+ result = @api_client.call_api(:POST, path,
2238
+ :header_params => header_params,
2239
+ :query_params => query_params,
2240
+ :form_params => form_params,
2241
+ :body => post_body,
2242
+ :auth_names => auth_names,
2243
+ :return_type => 'DocumentResponse')
2244
+ if Configuration.debugging
2245
+ Configuration.logger.debug "API called: WordsApi#post_insert_watermark_text. Result: #{result.inspect}"
2246
+ end
2247
+ return result
2248
+ end
2249
+
2250
+ # Remove macros from document.
2251
+ #
2252
+ # @param name The file name.
2253
+ # @param [Hash] opts the optional parameters
2254
+ # @option opts [String] :storage The document storage.
2255
+ # @option opts [String] :folder The document folder.
2256
+ # @return [BaseResponse]
2257
+ def delete_document_macros(name, opts = {})
2258
+ if Configuration.debugging
2259
+ Configuration.logger.debug "Calling API: WordsApi#delete_document_macros ..."
2260
+ end
2261
+
2262
+ # verify the required parameter 'name' is set
2263
+ fail "Missing the required parameter 'name' when calling delete_document_macros" if name.nil?
2264
+
2265
+ # resource path
2266
+ path = "/words/{name}/macros".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2267
+
2268
+ # query parameters
2269
+ query_params = {}
2270
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2271
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2272
+
2273
+ # header parameters
2274
+ header_params = {}
2275
+
2276
+ # HTTP header 'Accept' (if needed)
2277
+ _header_accept = ['application/json']
2278
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2279
+
2280
+ # HTTP header 'Content-Type'
2281
+ _header_content_type = ['application/json']
2282
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2283
+
2284
+ # form parameters
2285
+ form_params = {}
2286
+
2287
+ # http body (model)
2288
+ post_body = nil
2289
+
2290
+
2291
+ auth_names = []
2292
+ result = @api_client.call_api(:DELETE, path,
2293
+ :header_params => header_params,
2294
+ :query_params => query_params,
2295
+ :form_params => form_params,
2296
+ :body => post_body,
2297
+ :auth_names => auth_names,
2298
+ :return_type => 'BaseResponse')
2299
+ if Configuration.debugging
2300
+ Configuration.logger.debug "API called: WordsApi#delete_document_macros. Result: #{result.inspect}"
2301
+ end
2302
+ return result
2303
+ end
2304
+
2305
+ # Read document field names.
2306
+ #
2307
+ # @param name The document name.
2308
+ # @param [Hash] opts the optional parameters
2309
+ # @option opts [BOOLEAN] :use_non_merge_fields
2310
+ # @option opts [String] :storage The document storage.
2311
+ # @option opts [String] :folder The document folder.
2312
+ # @return [FieldNamesResponse]
2313
+ def get_document_field_names(name, opts = {})
2314
+ if Configuration.debugging
2315
+ Configuration.logger.debug "Calling API: WordsApi#get_document_field_names ..."
2316
+ end
2317
+
2318
+ # verify the required parameter 'name' is set
2319
+ fail "Missing the required parameter 'name' when calling get_document_field_names" if name.nil?
2320
+
2321
+ # resource path
2322
+ path = "/words/{name}/mailMergeFieldNames".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2323
+
2324
+ # query parameters
2325
+ query_params = {}
2326
+ query_params[:'useNonMergeFields'] = opts[:'use_non_merge_fields'] if opts[:'use_non_merge_fields']
2327
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2328
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2329
+
2330
+ # header parameters
2331
+ header_params = {}
2332
+
2333
+ # HTTP header 'Accept' (if needed)
2334
+ _header_accept = ['application/json']
2335
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2336
+
2337
+ # HTTP header 'Content-Type'
2338
+ _header_content_type = ['application/json']
2339
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2340
+
2341
+ # form parameters
2342
+ form_params = {}
2343
+
2344
+ # http body (model)
2345
+ post_body = nil
2346
+
2347
+
2348
+ auth_names = []
2349
+ result = @api_client.call_api(:GET, path,
2350
+ :header_params => header_params,
2351
+ :query_params => query_params,
2352
+ :form_params => form_params,
2353
+ :body => post_body,
2354
+ :auth_names => auth_names,
2355
+ :return_type => 'FieldNamesResponse')
2356
+ if Configuration.debugging
2357
+ Configuration.logger.debug "API called: WordsApi#get_document_field_names. Result: #{result.inspect}"
2358
+ end
2359
+ return result
2360
+ end
2361
+
2362
+ # Return a list of paragraphs that are contained in the document.
2363
+ #
2364
+ # @param name The document name.
2365
+ # @param [Hash] opts the optional parameters
2366
+ # @option opts [String] :storage The document storage.
2367
+ # @option opts [String] :folder The document folder.
2368
+ # @return [ParagraphLinkCollectionResponse]
2369
+ def get_document_paragraphs(name, opts = {})
2370
+ if Configuration.debugging
2371
+ Configuration.logger.debug "Calling API: WordsApi#get_document_paragraphs ..."
2372
+ end
2373
+
2374
+ # verify the required parameter 'name' is set
2375
+ fail "Missing the required parameter 'name' when calling get_document_paragraphs" if name.nil?
2376
+
2377
+ # resource path
2378
+ path = "/words/{name}/paragraphs".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2379
+
2380
+ # query parameters
2381
+ query_params = {}
2382
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2383
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2384
+
2385
+ # header parameters
2386
+ header_params = {}
2387
+
2388
+ # HTTP header 'Accept' (if needed)
2389
+ _header_accept = ['application/json']
2390
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2391
+
2392
+ # HTTP header 'Content-Type'
2393
+ _header_content_type = ['application/json']
2394
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2395
+
2396
+ # form parameters
2397
+ form_params = {}
2398
+
2399
+ # http body (model)
2400
+ post_body = nil
2401
+
2402
+
2403
+ auth_names = []
2404
+ result = @api_client.call_api(:GET, path,
2405
+ :header_params => header_params,
2406
+ :query_params => query_params,
2407
+ :form_params => form_params,
2408
+ :body => post_body,
2409
+ :auth_names => auth_names,
2410
+ :return_type => 'ParagraphLinkCollectionResponse')
2411
+ if Configuration.debugging
2412
+ Configuration.logger.debug "API called: WordsApi#get_document_paragraphs. Result: #{result.inspect}"
2413
+ end
2414
+ return result
2415
+ end
2416
+
2417
+ # This resource represents one of the paragraphs contained in the document.
2418
+ #
2419
+ # @param name The document name.
2420
+ # @param index Paragraph index
2421
+ # @param [Hash] opts the optional parameters
2422
+ # @option opts [String] :storage The document storage.
2423
+ # @option opts [String] :folder The document folder.
2424
+ # @return [ParagraphResponse]
2425
+ def get_document_paragraph(name, index, opts = {})
2426
+ if Configuration.debugging
2427
+ Configuration.logger.debug "Calling API: WordsApi#get_document_paragraph ..."
2428
+ end
2429
+
2430
+ # verify the required parameter 'name' is set
2431
+ fail "Missing the required parameter 'name' when calling get_document_paragraph" if name.nil?
2432
+
2433
+ # verify the required parameter 'index' is set
2434
+ fail "Missing the required parameter 'index' when calling get_document_paragraph" if index.nil?
2435
+
2436
+ # resource path
2437
+ path = "/words/{name}/paragraphs/{index}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'index' + '}', index.to_s)
2438
+
2439
+ # query parameters
2440
+ query_params = {}
2441
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2442
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2443
+
2444
+ # header parameters
2445
+ header_params = {}
2446
+
2447
+ # HTTP header 'Accept' (if needed)
2448
+ _header_accept = ['application/json']
2449
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2450
+
2451
+ # HTTP header 'Content-Type'
2452
+ _header_content_type = ['application/json']
2453
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2454
+
2455
+ # form parameters
2456
+ form_params = {}
2457
+
2458
+ # http body (model)
2459
+ post_body = nil
2460
+
2461
+
2462
+ auth_names = []
2463
+ result = @api_client.call_api(:GET, path,
2464
+ :header_params => header_params,
2465
+ :query_params => query_params,
2466
+ :form_params => form_params,
2467
+ :body => post_body,
2468
+ :auth_names => auth_names,
2469
+ :return_type => 'ParagraphResponse')
2470
+ if Configuration.debugging
2471
+ Configuration.logger.debug "API called: WordsApi#get_document_paragraph. Result: #{result.inspect}"
2472
+ end
2473
+ return result
2474
+ end
2475
+
2476
+ # Remove fields from paragraph.
2477
+ #
2478
+ # @param name The file name.
2479
+ # @param index Paragraph index
2480
+ # @param [Hash] opts the optional parameters
2481
+ # @option opts [String] :storage The document storage.
2482
+ # @option opts [String] :folder The document folder.
2483
+ # @return [BaseResponse]
2484
+ def delete_paragraph_fields(name, index, opts = {})
2485
+ if Configuration.debugging
2486
+ Configuration.logger.debug "Calling API: WordsApi#delete_paragraph_fields ..."
2487
+ end
2488
+
2489
+ # verify the required parameter 'name' is set
2490
+ fail "Missing the required parameter 'name' when calling delete_paragraph_fields" if name.nil?
2491
+
2492
+ # verify the required parameter 'index' is set
2493
+ fail "Missing the required parameter 'index' when calling delete_paragraph_fields" if index.nil?
2494
+
2495
+ # resource path
2496
+ path = "/words/{name}/paragraphs/{index}/fields".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'index' + '}', index.to_s)
2497
+
2498
+ # query parameters
2499
+ query_params = {}
2500
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2501
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2502
+
2503
+ # header parameters
2504
+ header_params = {}
2505
+
2506
+ # HTTP header 'Accept' (if needed)
2507
+ _header_accept = ['application/json']
2508
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2509
+
2510
+ # HTTP header 'Content-Type'
2511
+ _header_content_type = ['application/json']
2512
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2513
+
2514
+ # form parameters
2515
+ form_params = {}
2516
+
2517
+ # http body (model)
2518
+ post_body = nil
2519
+
2520
+
2521
+ auth_names = []
2522
+ result = @api_client.call_api(:DELETE, path,
2523
+ :header_params => header_params,
2524
+ :query_params => query_params,
2525
+ :form_params => form_params,
2526
+ :body => post_body,
2527
+ :auth_names => auth_names,
2528
+ :return_type => 'BaseResponse')
2529
+ if Configuration.debugging
2530
+ Configuration.logger.debug "API called: WordsApi#delete_paragraph_fields. Result: #{result.inspect}"
2531
+ end
2532
+ return result
2533
+ end
2534
+
2535
+ # This resource represents one of the paragraphs contained in the document.
2536
+ #
2537
+ # @param name The document name.
2538
+ # @param index Paragraph index
2539
+ # @param run_index Run index
2540
+ # @param [Hash] opts the optional parameters
2541
+ # @option opts [String] :storage The document storage.
2542
+ # @option opts [String] :folder The document folder.
2543
+ # @return [RunResponse]
2544
+ def get_document_paragraph_run(name, index, run_index, opts = {})
2545
+ if Configuration.debugging
2546
+ Configuration.logger.debug "Calling API: WordsApi#get_document_paragraph_run ..."
2547
+ end
2548
+
2549
+ # verify the required parameter 'name' is set
2550
+ fail "Missing the required parameter 'name' when calling get_document_paragraph_run" if name.nil?
2551
+
2552
+ # verify the required parameter 'index' is set
2553
+ fail "Missing the required parameter 'index' when calling get_document_paragraph_run" if index.nil?
2554
+
2555
+ # verify the required parameter 'run_index' is set
2556
+ fail "Missing the required parameter 'run_index' when calling get_document_paragraph_run" if run_index.nil?
2557
+
2558
+ # resource path
2559
+ path = "/words/{name}/paragraphs/{index}/runs/{runIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'index' + '}', index.to_s).sub('{' + 'runIndex' + '}', run_index.to_s)
2560
+
2561
+ # query parameters
2562
+ query_params = {}
2563
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2564
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2565
+
2566
+ # header parameters
2567
+ header_params = {}
2568
+
2569
+ # HTTP header 'Accept' (if needed)
2570
+ _header_accept = ['application/json']
2571
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2572
+
2573
+ # HTTP header 'Content-Type'
2574
+ _header_content_type = ['application/json']
2575
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2576
+
2577
+ # form parameters
2578
+ form_params = {}
2579
+
2580
+ # http body (model)
2581
+ post_body = nil
2582
+
2583
+
2584
+ auth_names = []
2585
+ result = @api_client.call_api(:GET, path,
2586
+ :header_params => header_params,
2587
+ :query_params => query_params,
2588
+ :form_params => form_params,
2589
+ :body => post_body,
2590
+ :auth_names => auth_names,
2591
+ :return_type => 'RunResponse')
2592
+ if Configuration.debugging
2593
+ Configuration.logger.debug "API called: WordsApi#get_document_paragraph_run. Result: #{result.inspect}"
2594
+ end
2595
+ return result
2596
+ end
2597
+
2598
+ # This resource represents one of the paragraphs contained in the document.
2599
+ #
2600
+ # @param name The document name.
2601
+ # @param index Paragraph index
2602
+ # @param run_index Run index
2603
+ # @param [Hash] opts the optional parameters
2604
+ # @option opts [String] :storage The document storage.
2605
+ # @option opts [String] :folder The document folder.
2606
+ # @return [FontResponse]
2607
+ def get_document_paragraph_run_font(name, index, run_index, opts = {})
2608
+ if Configuration.debugging
2609
+ Configuration.logger.debug "Calling API: WordsApi#get_document_paragraph_run_font ..."
2610
+ end
2611
+
2612
+ # verify the required parameter 'name' is set
2613
+ fail "Missing the required parameter 'name' when calling get_document_paragraph_run_font" if name.nil?
2614
+
2615
+ # verify the required parameter 'index' is set
2616
+ fail "Missing the required parameter 'index' when calling get_document_paragraph_run_font" if index.nil?
2617
+
2618
+ # verify the required parameter 'run_index' is set
2619
+ fail "Missing the required parameter 'run_index' when calling get_document_paragraph_run_font" if run_index.nil?
2620
+
2621
+ # resource path
2622
+ path = "/words/{name}/paragraphs/{index}/runs/{runIndex}/font".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'index' + '}', index.to_s).sub('{' + 'runIndex' + '}', run_index.to_s)
2623
+
2624
+ # query parameters
2625
+ query_params = {}
2626
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2627
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2628
+
2629
+ # header parameters
2630
+ header_params = {}
2631
+
2632
+ # HTTP header 'Accept' (if needed)
2633
+ _header_accept = ['application/json']
2634
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2635
+
2636
+ # HTTP header 'Content-Type'
2637
+ _header_content_type = ['application/json']
2638
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2639
+
2640
+ # form parameters
2641
+ form_params = {}
2642
+
2643
+ # http body (model)
2644
+ post_body = nil
2645
+
2646
+
2647
+ auth_names = []
2648
+ result = @api_client.call_api(:GET, path,
2649
+ :header_params => header_params,
2650
+ :query_params => query_params,
2651
+ :form_params => form_params,
2652
+ :body => post_body,
2653
+ :auth_names => auth_names,
2654
+ :return_type => 'FontResponse')
2655
+ if Configuration.debugging
2656
+ Configuration.logger.debug "API called: WordsApi#get_document_paragraph_run_font. Result: #{result.inspect}"
2657
+ end
2658
+ return result
2659
+ end
2660
+
2661
+ # This resource represents one of the paragraphs contained in the document.
2662
+ #
2663
+ # @param name The document name.
2664
+ # @param index Paragraph index
2665
+ # @param run_index Run index
2666
+ # @param font Font object
2667
+ # @param [Hash] opts the optional parameters
2668
+ # @option opts [String] :storage The document storage.
2669
+ # @option opts [String] :folder The document folder.
2670
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2671
+ # @return [FontResponse]
2672
+ def post_document_paragraph_run_font(name, index, run_index, font, opts = {})
2673
+ if Configuration.debugging
2674
+ Configuration.logger.debug "Calling API: WordsApi#post_document_paragraph_run_font ..."
2675
+ end
2676
+
2677
+ # verify the required parameter 'name' is set
2678
+ fail "Missing the required parameter 'name' when calling post_document_paragraph_run_font" if name.nil?
2679
+
2680
+ # verify the required parameter 'index' is set
2681
+ fail "Missing the required parameter 'index' when calling post_document_paragraph_run_font" if index.nil?
2682
+
2683
+ # verify the required parameter 'run_index' is set
2684
+ fail "Missing the required parameter 'run_index' when calling post_document_paragraph_run_font" if run_index.nil?
2685
+
2686
+ # verify the required parameter 'font' is set
2687
+ fail "Missing the required parameter 'font' when calling post_document_paragraph_run_font" if font.nil?
2688
+
2689
+ # resource path
2690
+ path = "/words/{name}/paragraphs/{index}/runs/{runIndex}/font".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'index' + '}', index.to_s).sub('{' + 'runIndex' + '}', run_index.to_s)
2691
+
2692
+ # query parameters
2693
+ query_params = {}
2694
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2695
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2696
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2697
+
2698
+ # header parameters
2699
+ header_params = {}
2700
+
2701
+ # HTTP header 'Accept' (if needed)
2702
+ _header_accept = ['application/json']
2703
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2704
+
2705
+ # HTTP header 'Content-Type'
2706
+ _header_content_type = ['application/json']
2707
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2708
+
2709
+ # form parameters
2710
+ form_params = {}
2711
+
2712
+ # http body (model)
2713
+ post_body = @api_client.object_to_http_body(font)
2714
+
2715
+
2716
+ auth_names = []
2717
+ result = @api_client.call_api(:POST, path,
2718
+ :header_params => header_params,
2719
+ :query_params => query_params,
2720
+ :form_params => form_params,
2721
+ :body => post_body,
2722
+ :auth_names => auth_names,
2723
+ :return_type => 'FontResponse')
2724
+ if Configuration.debugging
2725
+ Configuration.logger.debug "API called: WordsApi#post_document_paragraph_run_font. Result: #{result.inspect}"
2726
+ end
2727
+ return result
2728
+ end
2729
+
2730
+ # Read document protection common info.
2731
+ #
2732
+ # @param name The document name.
2733
+ # @param [Hash] opts the optional parameters
2734
+ # @option opts [String] :storage The document storage.
2735
+ # @option opts [String] :folder The document folder.
2736
+ # @return [ProtectionDataResponse]
2737
+ def get_document_protection(name, opts = {})
2738
+ if Configuration.debugging
2739
+ Configuration.logger.debug "Calling API: WordsApi#get_document_protection ..."
2740
+ end
2741
+
2742
+ # verify the required parameter 'name' is set
2743
+ fail "Missing the required parameter 'name' when calling get_document_protection" if name.nil?
2744
+
2745
+ # resource path
2746
+ path = "/words/{name}/protection".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2747
+
2748
+ # query parameters
2749
+ query_params = {}
2750
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2751
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2752
+
2753
+ # header parameters
2754
+ header_params = {}
2755
+
2756
+ # HTTP header 'Accept' (if needed)
2757
+ _header_accept = ['application/json']
2758
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2759
+
2760
+ # HTTP header 'Content-Type'
2761
+ _header_content_type = ['application/json']
2762
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2763
+
2764
+ # form parameters
2765
+ form_params = {}
2766
+
2767
+ # http body (model)
2768
+ post_body = nil
2769
+
2770
+
2771
+ auth_names = []
2772
+ result = @api_client.call_api(:GET, path,
2773
+ :header_params => header_params,
2774
+ :query_params => query_params,
2775
+ :form_params => form_params,
2776
+ :body => post_body,
2777
+ :auth_names => auth_names,
2778
+ :return_type => 'ProtectionDataResponse')
2779
+ if Configuration.debugging
2780
+ Configuration.logger.debug "API called: WordsApi#get_document_protection. Result: #{result.inspect}"
2781
+ end
2782
+ return result
2783
+ end
2784
+
2785
+ # Protect document.
2786
+ #
2787
+ # @param name The document name.
2788
+ # @param protection_request {ProtectionRequest} with protection settings.
2789
+ # @param [Hash] opts the optional parameters
2790
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2791
+ # @option opts [String] :storage The document storage.
2792
+ # @option opts [String] :folder The document folder.
2793
+ # @return [ProtectionDataResponse]
2794
+ def put_protect_document(name, protection_request, opts = {})
2795
+ if Configuration.debugging
2796
+ Configuration.logger.debug "Calling API: WordsApi#put_protect_document ..."
2797
+ end
2798
+
2799
+ # verify the required parameter 'name' is set
2800
+ fail "Missing the required parameter 'name' when calling put_protect_document" if name.nil?
2801
+
2802
+ # verify the required parameter 'protection_request' is set
2803
+ fail "Missing the required parameter 'protection_request' when calling put_protect_document" if protection_request.nil?
2804
+
2805
+ # resource path
2806
+ path = "/words/{name}/protection".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2807
+
2808
+ # query parameters
2809
+ query_params = {}
2810
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2811
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2812
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2813
+
2814
+ # header parameters
2815
+ header_params = {}
2816
+
2817
+ # HTTP header 'Accept' (if needed)
2818
+ _header_accept = ['application/json']
2819
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2820
+
2821
+ # HTTP header 'Content-Type'
2822
+ _header_content_type = ['application/json']
2823
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2824
+
2825
+ # form parameters
2826
+ form_params = {}
2827
+
2828
+ # http body (model)
2829
+ post_body = @api_client.object_to_http_body(protection_request)
2830
+
2831
+
2832
+ auth_names = []
2833
+ result = @api_client.call_api(:PUT, path,
2834
+ :header_params => header_params,
2835
+ :query_params => query_params,
2836
+ :form_params => form_params,
2837
+ :body => post_body,
2838
+ :auth_names => auth_names,
2839
+ :return_type => 'ProtectionDataResponse')
2840
+ if Configuration.debugging
2841
+ Configuration.logger.debug "API called: WordsApi#put_protect_document. Result: #{result.inspect}"
2842
+ end
2843
+ return result
2844
+ end
2845
+
2846
+ # Change document protection.
2847
+ #
2848
+ # @param name The document name.
2849
+ # @param protection_request {ProtectionRequest} with protection settings.
2850
+ # @param [Hash] opts the optional parameters
2851
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2852
+ # @option opts [String] :storage The document storage.
2853
+ # @option opts [String] :folder The document folder.
2854
+ # @return [ProtectionDataResponse]
2855
+ def post_change_document_protection(name, protection_request, opts = {})
2856
+ if Configuration.debugging
2857
+ Configuration.logger.debug "Calling API: WordsApi#post_change_document_protection ..."
2858
+ end
2859
+
2860
+ # verify the required parameter 'name' is set
2861
+ fail "Missing the required parameter 'name' when calling post_change_document_protection" if name.nil?
2862
+
2863
+ # verify the required parameter 'protection_request' is set
2864
+ fail "Missing the required parameter 'protection_request' when calling post_change_document_protection" if protection_request.nil?
2865
+
2866
+ # resource path
2867
+ path = "/words/{name}/protection".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2868
+
2869
+ # query parameters
2870
+ query_params = {}
2871
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2872
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2873
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2874
+
2875
+ # header parameters
2876
+ header_params = {}
2877
+
2878
+ # HTTP header 'Accept' (if needed)
2879
+ _header_accept = ['application/json']
2880
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2881
+
2882
+ # HTTP header 'Content-Type'
2883
+ _header_content_type = ['application/json']
2884
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2885
+
2886
+ # form parameters
2887
+ form_params = {}
2888
+
2889
+ # http body (model)
2890
+ post_body = @api_client.object_to_http_body(protection_request)
2891
+
2892
+
2893
+ auth_names = []
2894
+ result = @api_client.call_api(:POST, path,
2895
+ :header_params => header_params,
2896
+ :query_params => query_params,
2897
+ :form_params => form_params,
2898
+ :body => post_body,
2899
+ :auth_names => auth_names,
2900
+ :return_type => 'ProtectionDataResponse')
2901
+ if Configuration.debugging
2902
+ Configuration.logger.debug "API called: WordsApi#post_change_document_protection. Result: #{result.inspect}"
2903
+ end
2904
+ return result
2905
+ end
2906
+
2907
+ # Unprotect document.
2908
+ #
2909
+ # @param name The document name.
2910
+ # @param protection_request {ProtectionRequest} with protection settings.
2911
+ # @param [Hash] opts the optional parameters
2912
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2913
+ # @option opts [String] :storage The document storage.
2914
+ # @option opts [String] :folder The document folder.
2915
+ # @return [ProtectionDataResponse]
2916
+ def delete_unprotect_document(name, protection_request, opts = {})
2917
+ if Configuration.debugging
2918
+ Configuration.logger.debug "Calling API: WordsApi#delete_unprotect_document ..."
2919
+ end
2920
+
2921
+ # verify the required parameter 'name' is set
2922
+ fail "Missing the required parameter 'name' when calling delete_unprotect_document" if name.nil?
2923
+
2924
+ # verify the required parameter 'protection_request' is set
2925
+ fail "Missing the required parameter 'protection_request' when calling delete_unprotect_document" if protection_request.nil?
2926
+
2927
+ # resource path
2928
+ path = "/words/{name}/protection".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2929
+
2930
+ # query parameters
2931
+ query_params = {}
2932
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2933
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2934
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2935
+
2936
+ # header parameters
2937
+ header_params = {}
2938
+
2939
+ # HTTP header 'Accept' (if needed)
2940
+ _header_accept = ['application/json']
2941
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
2942
+
2943
+ # HTTP header 'Content-Type'
2944
+ _header_content_type = ['application/json']
2945
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
2946
+
2947
+ # form parameters
2948
+ form_params = {}
2949
+
2950
+ # http body (model)
2951
+ post_body = @api_client.object_to_http_body(protection_request)
2952
+
2953
+
2954
+ auth_names = []
2955
+ result = @api_client.call_api(:DELETE, path,
2956
+ :header_params => header_params,
2957
+ :query_params => query_params,
2958
+ :form_params => form_params,
2959
+ :body => post_body,
2960
+ :auth_names => auth_names,
2961
+ :return_type => 'ProtectionDataResponse')
2962
+ if Configuration.debugging
2963
+ Configuration.logger.debug "API called: WordsApi#delete_unprotect_document. Result: #{result.inspect}"
2964
+ end
2965
+ return result
2966
+ end
2967
+
2968
+ # Replace document text.
2969
+ #
2970
+ # @param name The document name.
2971
+ # @param replace_text {ReplaceTextResponse} with the replace operation settings.
2972
+ # @param [Hash] opts the optional parameters
2973
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
2974
+ # @option opts [String] :storage The document storage.
2975
+ # @option opts [String] :folder The document folder.
2976
+ # @return [ReplaceTextResponse]
2977
+ def post_replace_text(name, replace_text, opts = {})
2978
+ if Configuration.debugging
2979
+ Configuration.logger.debug "Calling API: WordsApi#post_replace_text ..."
2980
+ end
2981
+
2982
+ # verify the required parameter 'name' is set
2983
+ fail "Missing the required parameter 'name' when calling post_replace_text" if name.nil?
2984
+
2985
+ # verify the required parameter 'replace_text' is set
2986
+ fail "Missing the required parameter 'replace_text' when calling post_replace_text" if replace_text.nil?
2987
+
2988
+ # resource path
2989
+ path = "/words/{name}/replaceText".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
2990
+
2991
+ # query parameters
2992
+ query_params = {}
2993
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
2994
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
2995
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
2996
+
2997
+ # header parameters
2998
+ header_params = {}
2999
+
3000
+ # HTTP header 'Accept' (if needed)
3001
+ _header_accept = ['application/json']
3002
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3003
+
3004
+ # HTTP header 'Content-Type'
3005
+ _header_content_type = ['application/json']
3006
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3007
+
3008
+ # form parameters
3009
+ form_params = {}
3010
+
3011
+ # http body (model)
3012
+ post_body = @api_client.object_to_http_body(replace_text)
3013
+
3014
+
3015
+ auth_names = []
3016
+ result = @api_client.call_api(:POST, path,
3017
+ :header_params => header_params,
3018
+ :query_params => query_params,
3019
+ :form_params => form_params,
3020
+ :body => post_body,
3021
+ :auth_names => auth_names,
3022
+ :return_type => 'ReplaceTextResponse')
3023
+ if Configuration.debugging
3024
+ Configuration.logger.debug "API called: WordsApi#post_replace_text. Result: #{result.inspect}"
3025
+ end
3026
+ return result
3027
+ end
3028
+
3029
+ # Accept all revisions in document
3030
+ #
3031
+ # @param name The document name.
3032
+ # @param [Hash] opts the optional parameters
3033
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
3034
+ # @option opts [String] :storage The document storage.
3035
+ # @option opts [String] :folder The document folder.
3036
+ # @return [RevisionsModificationResponse]
3037
+ def accept_all_revisions(name, opts = {})
3038
+ if Configuration.debugging
3039
+ Configuration.logger.debug "Calling API: WordsApi#accept_all_revisions ..."
3040
+ end
3041
+
3042
+ # verify the required parameter 'name' is set
3043
+ fail "Missing the required parameter 'name' when calling accept_all_revisions" if name.nil?
3044
+
3045
+ # resource path
3046
+ path = "/words/{name}/revisions/acceptAll".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
3047
+
3048
+ # query parameters
3049
+ query_params = {}
3050
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
3051
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3052
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3053
+
3054
+ # header parameters
3055
+ header_params = {}
3056
+
3057
+ # HTTP header 'Accept' (if needed)
3058
+ _header_accept = ['application/json']
3059
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3060
+
3061
+ # HTTP header 'Content-Type'
3062
+ _header_content_type = ['application/json']
3063
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3064
+
3065
+ # form parameters
3066
+ form_params = {}
3067
+
3068
+ # http body (model)
3069
+ post_body = nil
3070
+
3071
+
3072
+ auth_names = []
3073
+ result = @api_client.call_api(:POST, path,
3074
+ :header_params => header_params,
3075
+ :query_params => query_params,
3076
+ :form_params => form_params,
3077
+ :body => post_body,
3078
+ :auth_names => auth_names,
3079
+ :return_type => 'RevisionsModificationResponse')
3080
+ if Configuration.debugging
3081
+ Configuration.logger.debug "API called: WordsApi#accept_all_revisions. Result: #{result.inspect}"
3082
+ end
3083
+ return result
3084
+ end
3085
+
3086
+ # Reject all revisions in document
3087
+ #
3088
+ # @param name The document name.
3089
+ # @param [Hash] opts the optional parameters
3090
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
3091
+ # @option opts [String] :storage The document storage.
3092
+ # @option opts [String] :folder The document folder.
3093
+ # @return [RevisionsModificationResponse]
3094
+ def reject_all_revisions(name, opts = {})
3095
+ if Configuration.debugging
3096
+ Configuration.logger.debug "Calling API: WordsApi#reject_all_revisions ..."
3097
+ end
3098
+
3099
+ # verify the required parameter 'name' is set
3100
+ fail "Missing the required parameter 'name' when calling reject_all_revisions" if name.nil?
3101
+
3102
+ # resource path
3103
+ path = "/words/{name}/revisions/rejectAll".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
3104
+
3105
+ # query parameters
3106
+ query_params = {}
3107
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
3108
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3109
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3110
+
3111
+ # header parameters
3112
+ header_params = {}
3113
+
3114
+ # HTTP header 'Accept' (if needed)
3115
+ _header_accept = ['application/json']
3116
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3117
+
3118
+ # HTTP header 'Content-Type'
3119
+ _header_content_type = ['application/json']
3120
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3121
+
3122
+ # form parameters
3123
+ form_params = {}
3124
+
3125
+ # http body (model)
3126
+ post_body = nil
3127
+
3128
+
3129
+ auth_names = []
3130
+ result = @api_client.call_api(:POST, path,
3131
+ :header_params => header_params,
3132
+ :query_params => query_params,
3133
+ :form_params => form_params,
3134
+ :body => post_body,
3135
+ :auth_names => auth_names,
3136
+ :return_type => 'RevisionsModificationResponse')
3137
+ if Configuration.debugging
3138
+ Configuration.logger.debug "API called: WordsApi#reject_all_revisions. Result: #{result.inspect}"
3139
+ end
3140
+ return result
3141
+ end
3142
+
3143
+ #
3144
+ #
3145
+ # @param name
3146
+ # @param pattern
3147
+ # @param [Hash] opts the optional parameters
3148
+ # @option opts [String] :storage
3149
+ # @option opts [String] :folder
3150
+ # @return [SearchResponse]
3151
+ def get_words_search(name, pattern, opts = {})
3152
+ if Configuration.debugging
3153
+ Configuration.logger.debug "Calling API: WordsApi#get_words_search ..."
3154
+ end
3155
+
3156
+ # verify the required parameter 'name' is set
3157
+ fail "Missing the required parameter 'name' when calling get_words_search" if name.nil?
3158
+
3159
+ # verify the required parameter 'pattern' is set
3160
+ fail "Missing the required parameter 'pattern' when calling get_words_search" if pattern.nil?
3161
+
3162
+ # resource path
3163
+ path = "/words/{name}/search".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
3164
+
3165
+ # query parameters
3166
+ query_params = {}
3167
+ query_params[:'pattern'] = pattern
3168
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3169
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3170
+
3171
+ # header parameters
3172
+ header_params = {}
3173
+
3174
+ # HTTP header 'Accept' (if needed)
3175
+ _header_accept = ['application/json']
3176
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3177
+
3178
+ # HTTP header 'Content-Type'
3179
+ _header_content_type = ['application/json']
3180
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3181
+
3182
+ # form parameters
3183
+ form_params = {}
3184
+
3185
+ # http body (model)
3186
+ post_body = nil
3187
+
3188
+
3189
+ auth_names = []
3190
+ result = @api_client.call_api(:GET, path,
3191
+ :header_params => header_params,
3192
+ :query_params => query_params,
3193
+ :form_params => form_params,
3194
+ :body => post_body,
3195
+ :auth_names => auth_names,
3196
+ :return_type => 'SearchResponse')
3197
+ if Configuration.debugging
3198
+ Configuration.logger.debug "API called: WordsApi#get_words_search. Result: #{result.inspect}"
3199
+ end
3200
+ return result
3201
+ end
3202
+
3203
+ # Return a list of sections that are contained in the document.
3204
+ #
3205
+ # @param name The document name.
3206
+ # @param [Hash] opts the optional parameters
3207
+ # @option opts [String] :storage The document storage.
3208
+ # @option opts [String] :folder The document folder.
3209
+ # @return [SectionLinkCollectionResponse]
3210
+ def get_sections(name, opts = {})
3211
+ if Configuration.debugging
3212
+ Configuration.logger.debug "Calling API: WordsApi#get_sections ..."
3213
+ end
3214
+
3215
+ # verify the required parameter 'name' is set
3216
+ fail "Missing the required parameter 'name' when calling get_sections" if name.nil?
3217
+
3218
+ # resource path
3219
+ path = "/words/{name}/sections".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
3220
+
3221
+ # query parameters
3222
+ query_params = {}
3223
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3224
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3225
+
3226
+ # header parameters
3227
+ header_params = {}
3228
+
3229
+ # HTTP header 'Accept' (if needed)
3230
+ _header_accept = ['application/json']
3231
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3232
+
3233
+ # HTTP header 'Content-Type'
3234
+ _header_content_type = ['application/json']
3235
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3236
+
3237
+ # form parameters
3238
+ form_params = {}
3239
+
3240
+ # http body (model)
3241
+ post_body = nil
3242
+
3243
+
3244
+ auth_names = []
3245
+ result = @api_client.call_api(:GET, path,
3246
+ :header_params => header_params,
3247
+ :query_params => query_params,
3248
+ :form_params => form_params,
3249
+ :body => post_body,
3250
+ :auth_names => auth_names,
3251
+ :return_type => 'SectionLinkCollectionResponse')
3252
+ if Configuration.debugging
3253
+ Configuration.logger.debug "API called: WordsApi#get_sections. Result: #{result.inspect}"
3254
+ end
3255
+ return result
3256
+ end
3257
+
3258
+ # Get document section by index.
3259
+ #
3260
+ # @param name The document name.
3261
+ # @param section_index Section index
3262
+ # @param [Hash] opts the optional parameters
3263
+ # @option opts [String] :storage The document storage.
3264
+ # @option opts [String] :folder The document folder.
3265
+ # @return [SectionResponse]
3266
+ def get_section(name, section_index, opts = {})
3267
+ if Configuration.debugging
3268
+ Configuration.logger.debug "Calling API: WordsApi#get_section ..."
3269
+ end
3270
+
3271
+ # verify the required parameter 'name' is set
3272
+ fail "Missing the required parameter 'name' when calling get_section" if name.nil?
3273
+
3274
+ # verify the required parameter 'section_index' is set
3275
+ fail "Missing the required parameter 'section_index' when calling get_section" if section_index.nil?
3276
+
3277
+ # resource path
3278
+ path = "/words/{name}/sections/{sectionIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s)
3279
+
3280
+ # query parameters
3281
+ query_params = {}
3282
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3283
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3284
+
3285
+ # header parameters
3286
+ header_params = {}
3287
+
3288
+ # HTTP header 'Accept' (if needed)
3289
+ _header_accept = ['application/json']
3290
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3291
+
3292
+ # HTTP header 'Content-Type'
3293
+ _header_content_type = ['application/json']
3294
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3295
+
3296
+ # form parameters
3297
+ form_params = {}
3298
+
3299
+ # http body (model)
3300
+ post_body = nil
3301
+
3302
+
3303
+ auth_names = []
3304
+ result = @api_client.call_api(:GET, path,
3305
+ :header_params => header_params,
3306
+ :query_params => query_params,
3307
+ :form_params => form_params,
3308
+ :body => post_body,
3309
+ :auth_names => auth_names,
3310
+ :return_type => 'SectionResponse')
3311
+ if Configuration.debugging
3312
+ Configuration.logger.debug "API called: WordsApi#get_section. Result: #{result.inspect}"
3313
+ end
3314
+ return result
3315
+ end
3316
+
3317
+ # Remove fields from section.
3318
+ #
3319
+ # @param name The file name.
3320
+ # @param section_index Section index
3321
+ # @param [Hash] opts the optional parameters
3322
+ # @option opts [String] :storage The document storage.
3323
+ # @option opts [String] :folder The document folder.
3324
+ # @return [BaseResponse]
3325
+ def delete_section_fields(name, section_index, opts = {})
3326
+ if Configuration.debugging
3327
+ Configuration.logger.debug "Calling API: WordsApi#delete_section_fields ..."
3328
+ end
3329
+
3330
+ # verify the required parameter 'name' is set
3331
+ fail "Missing the required parameter 'name' when calling delete_section_fields" if name.nil?
3332
+
3333
+ # verify the required parameter 'section_index' is set
3334
+ fail "Missing the required parameter 'section_index' when calling delete_section_fields" if section_index.nil?
3335
+
3336
+ # resource path
3337
+ path = "/words/{name}/sections/{sectionIndex}/fields".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s)
3338
+
3339
+ # query parameters
3340
+ query_params = {}
3341
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3342
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3343
+
3344
+ # header parameters
3345
+ header_params = {}
3346
+
3347
+ # HTTP header 'Accept' (if needed)
3348
+ _header_accept = ['application/json']
3349
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3350
+
3351
+ # HTTP header 'Content-Type'
3352
+ _header_content_type = ['application/json']
3353
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3354
+
3355
+ # form parameters
3356
+ form_params = {}
3357
+
3358
+ # http body (model)
3359
+ post_body = nil
3360
+
3361
+
3362
+ auth_names = []
3363
+ result = @api_client.call_api(:DELETE, path,
3364
+ :header_params => header_params,
3365
+ :query_params => query_params,
3366
+ :form_params => form_params,
3367
+ :body => post_body,
3368
+ :auth_names => auth_names,
3369
+ :return_type => 'BaseResponse')
3370
+ if Configuration.debugging
3371
+ Configuration.logger.debug "API called: WordsApi#delete_section_fields. Result: #{result.inspect}"
3372
+ end
3373
+ return result
3374
+ end
3375
+
3376
+ # Get page setup of section.
3377
+ #
3378
+ # @param name The document name.
3379
+ # @param section_index Section index
3380
+ # @param [Hash] opts the optional parameters
3381
+ # @option opts [String] :storage The document storage.
3382
+ # @option opts [String] :folder The document folder.
3383
+ # @return [SectionPageSetupResponse]
3384
+ def get_section_page_setup(name, section_index, opts = {})
3385
+ if Configuration.debugging
3386
+ Configuration.logger.debug "Calling API: WordsApi#get_section_page_setup ..."
3387
+ end
3388
+
3389
+ # verify the required parameter 'name' is set
3390
+ fail "Missing the required parameter 'name' when calling get_section_page_setup" if name.nil?
3391
+
3392
+ # verify the required parameter 'section_index' is set
3393
+ fail "Missing the required parameter 'section_index' when calling get_section_page_setup" if section_index.nil?
3394
+
3395
+ # resource path
3396
+ path = "/words/{name}/sections/{sectionIndex}/pageSetup".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s)
3397
+
3398
+ # query parameters
3399
+ query_params = {}
3400
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3401
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3402
+
3403
+ # header parameters
3404
+ header_params = {}
3405
+
3406
+ # HTTP header 'Accept' (if needed)
3407
+ _header_accept = ['application/json']
3408
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3409
+
3410
+ # HTTP header 'Content-Type'
3411
+ _header_content_type = ['application/json']
3412
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3413
+
3414
+ # form parameters
3415
+ form_params = {}
3416
+
3417
+ # http body (model)
3418
+ post_body = nil
3419
+
3420
+
3421
+ auth_names = []
3422
+ result = @api_client.call_api(:GET, path,
3423
+ :header_params => header_params,
3424
+ :query_params => query_params,
3425
+ :form_params => form_params,
3426
+ :body => post_body,
3427
+ :auth_names => auth_names,
3428
+ :return_type => 'SectionPageSetupResponse')
3429
+ if Configuration.debugging
3430
+ Configuration.logger.debug "API called: WordsApi#get_section_page_setup. Result: #{result.inspect}"
3431
+ end
3432
+ return result
3433
+ end
3434
+
3435
+ # Update page setup of section.
3436
+ #
3437
+ # @param name The document name.
3438
+ # @param section_index Section index
3439
+ # @param page_setup Page setup properties
3440
+ # @param [Hash] opts the optional parameters
3441
+ # @option opts [String] :storage The document storage.
3442
+ # @option opts [String] :folder The document folder.
3443
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
3444
+ # @return [SectionPageSetupResponse]
3445
+ def update_section_page_setup(name, section_index, page_setup, opts = {})
3446
+ if Configuration.debugging
3447
+ Configuration.logger.debug "Calling API: WordsApi#update_section_page_setup ..."
3448
+ end
3449
+
3450
+ # verify the required parameter 'name' is set
3451
+ fail "Missing the required parameter 'name' when calling update_section_page_setup" if name.nil?
3452
+
3453
+ # verify the required parameter 'section_index' is set
3454
+ fail "Missing the required parameter 'section_index' when calling update_section_page_setup" if section_index.nil?
3455
+
3456
+ # verify the required parameter 'page_setup' is set
3457
+ fail "Missing the required parameter 'page_setup' when calling update_section_page_setup" if page_setup.nil?
3458
+
3459
+ # resource path
3460
+ path = "/words/{name}/sections/{sectionIndex}/pageSetup".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s)
3461
+
3462
+ # query parameters
3463
+ query_params = {}
3464
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3465
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3466
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
3467
+
3468
+ # header parameters
3469
+ header_params = {}
3470
+
3471
+ # HTTP header 'Accept' (if needed)
3472
+ _header_accept = ['application/json']
3473
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3474
+
3475
+ # HTTP header 'Content-Type'
3476
+ _header_content_type = ['application/json']
3477
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3478
+
3479
+ # form parameters
3480
+ form_params = {}
3481
+
3482
+ # http body (model)
3483
+ post_body = @api_client.object_to_http_body(page_setup)
3484
+
3485
+
3486
+ auth_names = []
3487
+ result = @api_client.call_api(:POST, path,
3488
+ :header_params => header_params,
3489
+ :query_params => query_params,
3490
+ :form_params => form_params,
3491
+ :body => post_body,
3492
+ :auth_names => auth_names,
3493
+ :return_type => 'SectionPageSetupResponse')
3494
+ if Configuration.debugging
3495
+ Configuration.logger.debug "API called: WordsApi#update_section_page_setup. Result: #{result.inspect}"
3496
+ end
3497
+ return result
3498
+ end
3499
+
3500
+ #
3501
+ #
3502
+ # @param name
3503
+ # @param section_index
3504
+ # @param paragraph_index
3505
+ # @param field
3506
+ # @param [Hash] opts the optional parameters
3507
+ # @option opts [String] :insert_before_node
3508
+ # @option opts [String] :dest_file_name
3509
+ # @option opts [String] :storage
3510
+ # @option opts [String] :folder
3511
+ # @return [FieldResponse]
3512
+ def put_field(name, section_index, paragraph_index, field, opts = {})
3513
+ if Configuration.debugging
3514
+ Configuration.logger.debug "Calling API: WordsApi#put_field ..."
3515
+ end
3516
+
3517
+ # verify the required parameter 'name' is set
3518
+ fail "Missing the required parameter 'name' when calling put_field" if name.nil?
3519
+
3520
+ # verify the required parameter 'section_index' is set
3521
+ fail "Missing the required parameter 'section_index' when calling put_field" if section_index.nil?
3522
+
3523
+ # verify the required parameter 'paragraph_index' is set
3524
+ fail "Missing the required parameter 'paragraph_index' when calling put_field" if paragraph_index.nil?
3525
+
3526
+ # verify the required parameter 'field' is set
3527
+ fail "Missing the required parameter 'field' when calling put_field" if field.nil?
3528
+
3529
+ # resource path
3530
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/fields".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s)
3531
+
3532
+ # query parameters
3533
+ query_params = {}
3534
+ query_params[:'insertBeforeNode'] = opts[:'insert_before_node'] if opts[:'insert_before_node']
3535
+ query_params[:'destFileName'] = opts[:'dest_file_name'] if opts[:'dest_file_name']
3536
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3537
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3538
+
3539
+ # header parameters
3540
+ header_params = {}
3541
+
3542
+ # HTTP header 'Accept' (if needed)
3543
+ _header_accept = ['application/json']
3544
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3545
+
3546
+ # HTTP header 'Content-Type'
3547
+ _header_content_type = ['application/json']
3548
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3549
+
3550
+ # form parameters
3551
+ form_params = {}
3552
+
3553
+ # http body (model)
3554
+ post_body = @api_client.object_to_http_body(field)
3555
+
3556
+
3557
+ auth_names = []
3558
+ result = @api_client.call_api(:PUT, path,
3559
+ :header_params => header_params,
3560
+ :query_params => query_params,
3561
+ :form_params => form_params,
3562
+ :body => post_body,
3563
+ :auth_names => auth_names,
3564
+ :return_type => 'FieldResponse')
3565
+ if Configuration.debugging
3566
+ Configuration.logger.debug "API called: WordsApi#put_field. Result: #{result.inspect}"
3567
+ end
3568
+ return result
3569
+ end
3570
+
3571
+ #
3572
+ #
3573
+ # @param name
3574
+ # @param section_index
3575
+ # @param paragraph_index
3576
+ # @param field_index
3577
+ # @param [Hash] opts the optional parameters
3578
+ # @option opts [String] :storage
3579
+ # @option opts [String] :folder
3580
+ # @return [FieldResponse]
3581
+ def get_field(name, section_index, paragraph_index, field_index, opts = {})
3582
+ if Configuration.debugging
3583
+ Configuration.logger.debug "Calling API: WordsApi#get_field ..."
3584
+ end
3585
+
3586
+ # verify the required parameter 'name' is set
3587
+ fail "Missing the required parameter 'name' when calling get_field" if name.nil?
3588
+
3589
+ # verify the required parameter 'section_index' is set
3590
+ fail "Missing the required parameter 'section_index' when calling get_field" if section_index.nil?
3591
+
3592
+ # verify the required parameter 'paragraph_index' is set
3593
+ fail "Missing the required parameter 'paragraph_index' when calling get_field" if paragraph_index.nil?
3594
+
3595
+ # verify the required parameter 'field_index' is set
3596
+ fail "Missing the required parameter 'field_index' when calling get_field" if field_index.nil?
3597
+
3598
+ # resource path
3599
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/fields/{fieldIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s).sub('{' + 'fieldIndex' + '}', field_index.to_s)
3600
+
3601
+ # query parameters
3602
+ query_params = {}
3603
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3604
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3605
+
3606
+ # header parameters
3607
+ header_params = {}
3608
+
3609
+ # HTTP header 'Accept' (if needed)
3610
+ _header_accept = ['application/json']
3611
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3612
+
3613
+ # HTTP header 'Content-Type'
3614
+ _header_content_type = ['application/json']
3615
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3616
+
3617
+ # form parameters
3618
+ form_params = {}
3619
+
3620
+ # http body (model)
3621
+ post_body = nil
3622
+
3623
+
3624
+ auth_names = []
3625
+ result = @api_client.call_api(:GET, path,
3626
+ :header_params => header_params,
3627
+ :query_params => query_params,
3628
+ :form_params => form_params,
3629
+ :body => post_body,
3630
+ :auth_names => auth_names,
3631
+ :return_type => 'FieldResponse')
3632
+ if Configuration.debugging
3633
+ Configuration.logger.debug "API called: WordsApi#get_field. Result: #{result.inspect}"
3634
+ end
3635
+ return result
3636
+ end
3637
+
3638
+ #
3639
+ #
3640
+ # @param name
3641
+ # @param section_index
3642
+ # @param paragraph_index
3643
+ # @param field_index
3644
+ # @param field
3645
+ # @param [Hash] opts the optional parameters
3646
+ # @option opts [String] :dest_file_name
3647
+ # @option opts [String] :storage
3648
+ # @option opts [String] :folder
3649
+ # @return [FieldResponse]
3650
+ def post_field(name, section_index, paragraph_index, field_index, field, opts = {})
3651
+ if Configuration.debugging
3652
+ Configuration.logger.debug "Calling API: WordsApi#post_field ..."
3653
+ end
3654
+
3655
+ # verify the required parameter 'name' is set
3656
+ fail "Missing the required parameter 'name' when calling post_field" if name.nil?
3657
+
3658
+ # verify the required parameter 'section_index' is set
3659
+ fail "Missing the required parameter 'section_index' when calling post_field" if section_index.nil?
3660
+
3661
+ # verify the required parameter 'paragraph_index' is set
3662
+ fail "Missing the required parameter 'paragraph_index' when calling post_field" if paragraph_index.nil?
3663
+
3664
+ # verify the required parameter 'field_index' is set
3665
+ fail "Missing the required parameter 'field_index' when calling post_field" if field_index.nil?
3666
+
3667
+ # verify the required parameter 'field' is set
3668
+ fail "Missing the required parameter 'field' when calling post_field" if field.nil?
3669
+
3670
+ # resource path
3671
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/fields/{fieldIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s).sub('{' + 'fieldIndex' + '}', field_index.to_s)
3672
+
3673
+ # query parameters
3674
+ query_params = {}
3675
+ query_params[:'destFileName'] = opts[:'dest_file_name'] if opts[:'dest_file_name']
3676
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3677
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3678
+
3679
+ # header parameters
3680
+ header_params = {}
3681
+
3682
+ # HTTP header 'Accept' (if needed)
3683
+ _header_accept = ['application/json']
3684
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3685
+
3686
+ # HTTP header 'Content-Type'
3687
+ _header_content_type = ['application/json']
3688
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3689
+
3690
+ # form parameters
3691
+ form_params = {}
3692
+
3693
+ # http body (model)
3694
+ post_body = @api_client.object_to_http_body(field)
3695
+
3696
+
3697
+ auth_names = []
3698
+ result = @api_client.call_api(:POST, path,
3699
+ :header_params => header_params,
3700
+ :query_params => query_params,
3701
+ :form_params => form_params,
3702
+ :body => post_body,
3703
+ :auth_names => auth_names,
3704
+ :return_type => 'FieldResponse')
3705
+ if Configuration.debugging
3706
+ Configuration.logger.debug "API called: WordsApi#post_field. Result: #{result.inspect}"
3707
+ end
3708
+ return result
3709
+ end
3710
+
3711
+ # Adds form field to paragraph, returns added form field's data.
3712
+ #
3713
+ # @param name The document name.
3714
+ # @param section_index Section index.
3715
+ # @param paragraph_index Paragraph index.
3716
+ # @param form_field From field data.
3717
+ # @param [Hash] opts the optional parameters
3718
+ # @option opts [String] :insert_before_node Form field will be inserted before node with index.
3719
+ # @option opts [String] :dest_file_name Destination file name.
3720
+ # @option opts [String] :storage The document storage.
3721
+ # @option opts [String] :folder The document folder.
3722
+ # @return [FormFieldResponse]
3723
+ def put_form_field(name, section_index, paragraph_index, form_field, opts = {})
3724
+ if Configuration.debugging
3725
+ Configuration.logger.debug "Calling API: WordsApi#put_form_field ..."
3726
+ end
3727
+
3728
+ # verify the required parameter 'name' is set
3729
+ fail "Missing the required parameter 'name' when calling put_form_field" if name.nil?
3730
+
3731
+ # verify the required parameter 'section_index' is set
3732
+ fail "Missing the required parameter 'section_index' when calling put_form_field" if section_index.nil?
3733
+
3734
+ # verify the required parameter 'paragraph_index' is set
3735
+ fail "Missing the required parameter 'paragraph_index' when calling put_form_field" if paragraph_index.nil?
3736
+
3737
+ # verify the required parameter 'form_field' is set
3738
+ fail "Missing the required parameter 'form_field' when calling put_form_field" if form_field.nil?
3739
+
3740
+ # resource path
3741
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/formfields".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s)
3742
+
3743
+ # query parameters
3744
+ query_params = {}
3745
+ query_params[:'insertBeforeNode'] = opts[:'insert_before_node'] if opts[:'insert_before_node']
3746
+ query_params[:'destFileName'] = opts[:'dest_file_name'] if opts[:'dest_file_name']
3747
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3748
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3749
+
3750
+ # header parameters
3751
+ header_params = {}
3752
+
3753
+ # HTTP header 'Accept' (if needed)
3754
+ _header_accept = ['application/json']
3755
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3756
+
3757
+ # HTTP header 'Content-Type'
3758
+ _header_content_type = ['application/json']
3759
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3760
+
3761
+ # form parameters
3762
+ form_params = {}
3763
+
3764
+ # http body (model)
3765
+ post_body = @api_client.object_to_http_body(form_field)
3766
+
3767
+
3768
+ auth_names = []
3769
+ result = @api_client.call_api(:PUT, path,
3770
+ :header_params => header_params,
3771
+ :query_params => query_params,
3772
+ :form_params => form_params,
3773
+ :body => post_body,
3774
+ :auth_names => auth_names,
3775
+ :return_type => 'FormFieldResponse')
3776
+ if Configuration.debugging
3777
+ Configuration.logger.debug "API called: WordsApi#put_form_field. Result: #{result.inspect}"
3778
+ end
3779
+ return result
3780
+ end
3781
+
3782
+ # Returns representation of an one of the form field.
3783
+ #
3784
+ # @param name The document name.
3785
+ # @param section_index Section index.
3786
+ # @param paragraph_index Paragraph index.
3787
+ # @param formfield_index Form field index.
3788
+ # @param [Hash] opts the optional parameters
3789
+ # @option opts [String] :storage The document storage.
3790
+ # @option opts [String] :folder The document folder.
3791
+ # @return [FormFieldResponse]
3792
+ def get_form_field(name, section_index, paragraph_index, formfield_index, opts = {})
3793
+ if Configuration.debugging
3794
+ Configuration.logger.debug "Calling API: WordsApi#get_form_field ..."
3795
+ end
3796
+
3797
+ # verify the required parameter 'name' is set
3798
+ fail "Missing the required parameter 'name' when calling get_form_field" if name.nil?
3799
+
3800
+ # verify the required parameter 'section_index' is set
3801
+ fail "Missing the required parameter 'section_index' when calling get_form_field" if section_index.nil?
3802
+
3803
+ # verify the required parameter 'paragraph_index' is set
3804
+ fail "Missing the required parameter 'paragraph_index' when calling get_form_field" if paragraph_index.nil?
3805
+
3806
+ # verify the required parameter 'formfield_index' is set
3807
+ fail "Missing the required parameter 'formfield_index' when calling get_form_field" if formfield_index.nil?
3808
+
3809
+ # resource path
3810
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/formfields/{formfieldIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s).sub('{' + 'formfieldIndex' + '}', formfield_index.to_s)
3811
+
3812
+ # query parameters
3813
+ query_params = {}
3814
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3815
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3816
+
3817
+ # header parameters
3818
+ header_params = {}
3819
+
3820
+ # HTTP header 'Accept' (if needed)
3821
+ _header_accept = ['application/json']
3822
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3823
+
3824
+ # HTTP header 'Content-Type'
3825
+ _header_content_type = ['application/json']
3826
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3827
+
3828
+ # form parameters
3829
+ form_params = {}
3830
+
3831
+ # http body (model)
3832
+ post_body = nil
3833
+
3834
+
3835
+ auth_names = []
3836
+ result = @api_client.call_api(:GET, path,
3837
+ :header_params => header_params,
3838
+ :query_params => query_params,
3839
+ :form_params => form_params,
3840
+ :body => post_body,
3841
+ :auth_names => auth_names,
3842
+ :return_type => 'FormFieldResponse')
3843
+ if Configuration.debugging
3844
+ Configuration.logger.debug "API called: WordsApi#get_form_field. Result: #{result.inspect}"
3845
+ end
3846
+ return result
3847
+ end
3848
+
3849
+ # Updates form field's properties, returns updated form field's data.
3850
+ #
3851
+ # @param name The document name.
3852
+ # @param section_index Section index.
3853
+ # @param paragraph_index Paragraph index.
3854
+ # @param formfield_index Form field index.
3855
+ # @param form_field From field data.
3856
+ # @param [Hash] opts the optional parameters
3857
+ # @option opts [String] :dest_file_name Destination file name.
3858
+ # @option opts [String] :storage The document storage.
3859
+ # @option opts [String] :folder The document folder.
3860
+ # @return [FormFieldResponse]
3861
+ def post_form_field(name, section_index, paragraph_index, formfield_index, form_field, opts = {})
3862
+ if Configuration.debugging
3863
+ Configuration.logger.debug "Calling API: WordsApi#post_form_field ..."
3864
+ end
3865
+
3866
+ # verify the required parameter 'name' is set
3867
+ fail "Missing the required parameter 'name' when calling post_form_field" if name.nil?
3868
+
3869
+ # verify the required parameter 'section_index' is set
3870
+ fail "Missing the required parameter 'section_index' when calling post_form_field" if section_index.nil?
3871
+
3872
+ # verify the required parameter 'paragraph_index' is set
3873
+ fail "Missing the required parameter 'paragraph_index' when calling post_form_field" if paragraph_index.nil?
3874
+
3875
+ # verify the required parameter 'formfield_index' is set
3876
+ fail "Missing the required parameter 'formfield_index' when calling post_form_field" if formfield_index.nil?
3877
+
3878
+ # verify the required parameter 'form_field' is set
3879
+ fail "Missing the required parameter 'form_field' when calling post_form_field" if form_field.nil?
3880
+
3881
+ # resource path
3882
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/formfields/{formfieldIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s).sub('{' + 'formfieldIndex' + '}', formfield_index.to_s)
3883
+
3884
+ # query parameters
3885
+ query_params = {}
3886
+ query_params[:'destFileName'] = opts[:'dest_file_name'] if opts[:'dest_file_name']
3887
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3888
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3889
+
3890
+ # header parameters
3891
+ header_params = {}
3892
+
3893
+ # HTTP header 'Accept' (if needed)
3894
+ _header_accept = ['application/json']
3895
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3896
+
3897
+ # HTTP header 'Content-Type'
3898
+ _header_content_type = ['application/json']
3899
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3900
+
3901
+ # form parameters
3902
+ form_params = {}
3903
+
3904
+ # http body (model)
3905
+ post_body = @api_client.object_to_http_body(form_field)
3906
+
3907
+
3908
+ auth_names = []
3909
+ result = @api_client.call_api(:POST, path,
3910
+ :header_params => header_params,
3911
+ :query_params => query_params,
3912
+ :form_params => form_params,
3913
+ :body => post_body,
3914
+ :auth_names => auth_names,
3915
+ :return_type => 'FormFieldResponse')
3916
+ if Configuration.debugging
3917
+ Configuration.logger.debug "API called: WordsApi#post_form_field. Result: #{result.inspect}"
3918
+ end
3919
+ return result
3920
+ end
3921
+
3922
+ # Removes form field from document.
3923
+ #
3924
+ # @param name The document name.
3925
+ # @param section_index Section index.
3926
+ # @param paragraph_index Paragraph index.
3927
+ # @param formfield_index Form field index.
3928
+ # @param [Hash] opts the optional parameters
3929
+ # @option opts [String] :dest_file_name Destination file name.
3930
+ # @option opts [String] :storage The document storage.
3931
+ # @option opts [String] :folder The document folder.
3932
+ # @return [BaseResponse]
3933
+ def delete_form_field(name, section_index, paragraph_index, formfield_index, opts = {})
3934
+ if Configuration.debugging
3935
+ Configuration.logger.debug "Calling API: WordsApi#delete_form_field ..."
3936
+ end
3937
+
3938
+ # verify the required parameter 'name' is set
3939
+ fail "Missing the required parameter 'name' when calling delete_form_field" if name.nil?
3940
+
3941
+ # verify the required parameter 'section_index' is set
3942
+ fail "Missing the required parameter 'section_index' when calling delete_form_field" if section_index.nil?
3943
+
3944
+ # verify the required parameter 'paragraph_index' is set
3945
+ fail "Missing the required parameter 'paragraph_index' when calling delete_form_field" if paragraph_index.nil?
3946
+
3947
+ # verify the required parameter 'formfield_index' is set
3948
+ fail "Missing the required parameter 'formfield_index' when calling delete_form_field" if formfield_index.nil?
3949
+
3950
+ # resource path
3951
+ path = "/words/{name}/sections/{sectionIndex}/paragraphs/{paragraphIndex}/formfields/{formfieldIndex}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'sectionIndex' + '}', section_index.to_s).sub('{' + 'paragraphIndex' + '}', paragraph_index.to_s).sub('{' + 'formfieldIndex' + '}', formfield_index.to_s)
3952
+
3953
+ # query parameters
3954
+ query_params = {}
3955
+ query_params[:'destFileName'] = opts[:'dest_file_name'] if opts[:'dest_file_name']
3956
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
3957
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
3958
+
3959
+ # header parameters
3960
+ header_params = {}
3961
+
3962
+ # HTTP header 'Accept' (if needed)
3963
+ _header_accept = ['application/json']
3964
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
3965
+
3966
+ # HTTP header 'Content-Type'
3967
+ _header_content_type = ['application/json']
3968
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
3969
+
3970
+ # form parameters
3971
+ form_params = {}
3972
+
3973
+ # http body (model)
3974
+ post_body = nil
3975
+
3976
+
3977
+ auth_names = []
3978
+ result = @api_client.call_api(:DELETE, path,
3979
+ :header_params => header_params,
3980
+ :query_params => query_params,
3981
+ :form_params => form_params,
3982
+ :body => post_body,
3983
+ :auth_names => auth_names,
3984
+ :return_type => 'BaseResponse')
3985
+ if Configuration.debugging
3986
+ Configuration.logger.debug "API called: WordsApi#delete_form_field. Result: #{result.inspect}"
3987
+ end
3988
+ return result
3989
+ end
3990
+
3991
+ # Split document.
3992
+ #
3993
+ # @param name Original document name.
3994
+ # @param [Hash] opts the optional parameters
3995
+ # @option opts [String] :format Format to split.
3996
+ # @option opts [Integer] :from Start page.
3997
+ # @option opts [Integer] :to End page.
3998
+ # @option opts [BOOLEAN] :zip_output ZipOutput or not.
3999
+ # @option opts [String] :storage The document storage.
4000
+ # @option opts [String] :folder The document folder.
4001
+ # @return [SplitDocumentResponse]
4002
+ def post_split_document(name, opts = {})
4003
+ if Configuration.debugging
4004
+ Configuration.logger.debug "Calling API: WordsApi#post_split_document ..."
4005
+ end
4006
+
4007
+ # verify the required parameter 'name' is set
4008
+ fail "Missing the required parameter 'name' when calling post_split_document" if name.nil?
4009
+
4010
+ # resource path
4011
+ path = "/words/{name}/split".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4012
+
4013
+ # query parameters
4014
+ query_params = {}
4015
+ query_params[:'format'] = opts[:'format'] if opts[:'format']
4016
+ query_params[:'from'] = opts[:'from'] if opts[:'from']
4017
+ query_params[:'to'] = opts[:'to'] if opts[:'to']
4018
+ query_params[:'zipOutput'] = opts[:'zip_output'] if opts[:'zip_output']
4019
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4020
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4021
+
4022
+ # header parameters
4023
+ header_params = {}
4024
+
4025
+ # HTTP header 'Accept' (if needed)
4026
+ _header_accept = ['application/json']
4027
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4028
+
4029
+ # HTTP header 'Content-Type'
4030
+ _header_content_type = ['application/json']
4031
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4032
+
4033
+ # form parameters
4034
+ form_params = {}
4035
+
4036
+ # http body (model)
4037
+ post_body = nil
4038
+
4039
+
4040
+ auth_names = []
4041
+ result = @api_client.call_api(:POST, path,
4042
+ :header_params => header_params,
4043
+ :query_params => query_params,
4044
+ :form_params => form_params,
4045
+ :body => post_body,
4046
+ :auth_names => auth_names,
4047
+ :return_type => 'SplitDocumentResponse')
4048
+ if Configuration.debugging
4049
+ Configuration.logger.debug "API called: WordsApi#post_split_document. Result: #{result.inspect}"
4050
+ end
4051
+ return result
4052
+ end
4053
+
4054
+ # Read document statistics.
4055
+ #
4056
+ # @param name The document name.
4057
+ # @param [Hash] opts the optional parameters
4058
+ # @option opts [BOOLEAN] :include_comments Support including/excluding comments from the WordCount. Default value is \"true\".
4059
+ # @option opts [BOOLEAN] :include_footnotes Support including/excluding footnotes from the WordCount. Default value is \"false\".
4060
+ # @option opts [BOOLEAN] :include_text_in_shapes Support including/excluding shape's text from the WordCount. Default value is \"false\"
4061
+ # @option opts [String] :storage The document storage.
4062
+ # @option opts [String] :folder The document folder.
4063
+ # @return [StatDataResponse]
4064
+ def get_document_statistics(name, opts = {})
4065
+ if Configuration.debugging
4066
+ Configuration.logger.debug "Calling API: WordsApi#get_document_statistics ..."
4067
+ end
4068
+
4069
+ # verify the required parameter 'name' is set
4070
+ fail "Missing the required parameter 'name' when calling get_document_statistics" if name.nil?
4071
+
4072
+ # resource path
4073
+ path = "/words/{name}/statistics".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4074
+
4075
+ # query parameters
4076
+ query_params = {}
4077
+ query_params[:'includeComments'] = opts[:'include_comments'] if opts[:'include_comments']
4078
+ query_params[:'includeFootnotes'] = opts[:'include_footnotes'] if opts[:'include_footnotes']
4079
+ query_params[:'includeTextInShapes'] = opts[:'include_text_in_shapes'] if opts[:'include_text_in_shapes']
4080
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4081
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4082
+
4083
+ # header parameters
4084
+ header_params = {}
4085
+
4086
+ # HTTP header 'Accept' (if needed)
4087
+ _header_accept = ['application/json']
4088
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4089
+
4090
+ # HTTP header 'Content-Type'
4091
+ _header_content_type = ['application/json']
4092
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4093
+
4094
+ # form parameters
4095
+ form_params = {}
4096
+
4097
+ # http body (model)
4098
+ post_body = nil
4099
+
4100
+
4101
+ auth_names = []
4102
+ result = @api_client.call_api(:GET, path,
4103
+ :header_params => header_params,
4104
+ :query_params => query_params,
4105
+ :form_params => form_params,
4106
+ :body => post_body,
4107
+ :auth_names => auth_names,
4108
+ :return_type => 'StatDataResponse')
4109
+ if Configuration.debugging
4110
+ Configuration.logger.debug "API called: WordsApi#get_document_statistics. Result: #{result.inspect}"
4111
+ end
4112
+ return result
4113
+ end
4114
+
4115
+ # Read document text items.
4116
+ #
4117
+ # @param name The document name.
4118
+ # @param [Hash] opts the optional parameters
4119
+ # @option opts [String] :storage Document's storage.
4120
+ # @option opts [String] :folder Document's folder.
4121
+ # @return [TextItemsResponse]
4122
+ def get_document_text_items(name, opts = {})
4123
+ if Configuration.debugging
4124
+ Configuration.logger.debug "Calling API: WordsApi#get_document_text_items ..."
4125
+ end
4126
+
4127
+ # verify the required parameter 'name' is set
4128
+ fail "Missing the required parameter 'name' when calling get_document_text_items" if name.nil?
4129
+
4130
+ # resource path
4131
+ path = "/words/{name}/textItems".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4132
+
4133
+ # query parameters
4134
+ query_params = {}
4135
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4136
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4137
+
4138
+ # header parameters
4139
+ header_params = {}
4140
+
4141
+ # HTTP header 'Accept' (if needed)
4142
+ _header_accept = ['application/json']
4143
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4144
+
4145
+ # HTTP header 'Content-Type'
4146
+ _header_content_type = ['application/json']
4147
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4148
+
4149
+ # form parameters
4150
+ form_params = {}
4151
+
4152
+ # http body (model)
4153
+ post_body = nil
4154
+
4155
+
4156
+ auth_names = []
4157
+ result = @api_client.call_api(:GET, path,
4158
+ :header_params => header_params,
4159
+ :query_params => query_params,
4160
+ :form_params => form_params,
4161
+ :body => post_body,
4162
+ :auth_names => auth_names,
4163
+ :return_type => 'TextItemsResponse')
4164
+ if Configuration.debugging
4165
+ Configuration.logger.debug "API called: WordsApi#get_document_text_items. Result: #{result.inspect}"
4166
+ end
4167
+ return result
4168
+ end
4169
+
4170
+ # Update (reevaluate) fields in document.
4171
+ #
4172
+ # @param name The document name.
4173
+ # @param [Hash] opts the optional parameters
4174
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
4175
+ # @option opts [String] :storage The document storage.
4176
+ # @option opts [String] :folder The document folder.
4177
+ # @return [DocumentResponse]
4178
+ def post_update_document_fields(name, opts = {})
4179
+ if Configuration.debugging
4180
+ Configuration.logger.debug "Calling API: WordsApi#post_update_document_fields ..."
4181
+ end
4182
+
4183
+ # verify the required parameter 'name' is set
4184
+ fail "Missing the required parameter 'name' when calling post_update_document_fields" if name.nil?
4185
+
4186
+ # resource path
4187
+ path = "/words/{name}/updateFields".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4188
+
4189
+ # query parameters
4190
+ query_params = {}
4191
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
4192
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4193
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4194
+
4195
+ # header parameters
4196
+ header_params = {}
4197
+
4198
+ # HTTP header 'Accept' (if needed)
4199
+ _header_accept = ['application/json']
4200
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4201
+
4202
+ # HTTP header 'Content-Type'
4203
+ _header_content_type = ['application/json']
4204
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4205
+
4206
+ # form parameters
4207
+ form_params = {}
4208
+
4209
+ # http body (model)
4210
+ post_body = nil
4211
+
4212
+
4213
+ auth_names = []
4214
+ result = @api_client.call_api(:POST, path,
4215
+ :header_params => header_params,
4216
+ :query_params => query_params,
4217
+ :form_params => form_params,
4218
+ :body => post_body,
4219
+ :auth_names => auth_names,
4220
+ :return_type => 'DocumentResponse')
4221
+ if Configuration.debugging
4222
+ Configuration.logger.debug "API called: WordsApi#post_update_document_fields. Result: #{result.inspect}"
4223
+ end
4224
+ return result
4225
+ end
4226
+
4227
+ # Delete watermark (for deleting last watermark from the document).
4228
+ #
4229
+ # @param name The document name.
4230
+ # @param [Hash] opts the optional parameters
4231
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
4232
+ # @option opts [String] :storage The document storage.
4233
+ # @option opts [String] :folder The document folder.
4234
+ # @return [DocumentResponse]
4235
+ def delete_document_watermark(name, opts = {})
4236
+ if Configuration.debugging
4237
+ Configuration.logger.debug "Calling API: WordsApi#delete_document_watermark ..."
4238
+ end
4239
+
4240
+ # verify the required parameter 'name' is set
4241
+ fail "Missing the required parameter 'name' when calling delete_document_watermark" if name.nil?
4242
+
4243
+ # resource path
4244
+ path = "/words/{name}/watermark".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4245
+
4246
+ # query parameters
4247
+ query_params = {}
4248
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
4249
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4250
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4251
+
4252
+ # header parameters
4253
+ header_params = {}
4254
+
4255
+ # HTTP header 'Accept' (if needed)
4256
+ _header_accept = ['application/json']
4257
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4258
+
4259
+ # HTTP header 'Content-Type'
4260
+ _header_content_type = ['application/json']
4261
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4262
+
4263
+ # form parameters
4264
+ form_params = {}
4265
+
4266
+ # http body (model)
4267
+ post_body = nil
4268
+
4269
+
4270
+ auth_names = []
4271
+ result = @api_client.call_api(:DELETE, path,
4272
+ :header_params => header_params,
4273
+ :query_params => query_params,
4274
+ :form_params => form_params,
4275
+ :body => post_body,
4276
+ :auth_names => auth_names,
4277
+ :return_type => 'DocumentResponse')
4278
+ if Configuration.debugging
4279
+ Configuration.logger.debug "API called: WordsApi#delete_document_watermark. Result: #{result.inspect}"
4280
+ end
4281
+ return result
4282
+ end
4283
+
4284
+ # Insert document watermark image.
4285
+ #
4286
+ # @param name The document name.
4287
+ # @param [Hash] opts the optional parameters
4288
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
4289
+ # @option opts [Float] :rotation_angle The watermark rotation angle.
4290
+ # @option opts [String] :image The image file server full name. If the name is empty the image is expected in request content.
4291
+ # @option opts [String] :storage The document storage.
4292
+ # @option opts [String] :folder The document folder.
4293
+ # @return [DocumentResponse]
4294
+ def post_insert_document_watermark_image(name, opts = {})
4295
+ if Configuration.debugging
4296
+ Configuration.logger.debug "Calling API: WordsApi#post_insert_document_watermark_image ..."
4297
+ end
4298
+
4299
+ # verify the required parameter 'name' is set
4300
+ fail "Missing the required parameter 'name' when calling post_insert_document_watermark_image" if name.nil?
4301
+
4302
+ # resource path
4303
+ path = "/words/{name}/watermark/insertImage".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4304
+
4305
+ # query parameters
4306
+ query_params = {}
4307
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
4308
+ query_params[:'rotationAngle'] = opts[:'rotation_angle'] if opts[:'rotation_angle']
4309
+ query_params[:'image'] = opts[:'image'] if opts[:'image']
4310
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4311
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4312
+
4313
+ # header parameters
4314
+ header_params = {}
4315
+
4316
+ # HTTP header 'Accept' (if needed)
4317
+ _header_accept = ['application/json']
4318
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4319
+
4320
+ # HTTP header 'Content-Type'
4321
+ _header_content_type = ['application/json']
4322
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4323
+
4324
+ # form parameters
4325
+ form_params = {}
4326
+
4327
+ # http body (model)
4328
+ post_body = nil
4329
+
4330
+
4331
+ auth_names = []
4332
+ result = @api_client.call_api(:POST, path,
4333
+ :header_params => header_params,
4334
+ :query_params => query_params,
4335
+ :form_params => form_params,
4336
+ :body => post_body,
4337
+ :auth_names => auth_names,
4338
+ :return_type => 'DocumentResponse')
4339
+ if Configuration.debugging
4340
+ Configuration.logger.debug "API called: WordsApi#post_insert_document_watermark_image. Result: #{result.inspect}"
4341
+ end
4342
+ return result
4343
+ end
4344
+
4345
+ # Insert document watermark text.
4346
+ #
4347
+ # @param name The document name.
4348
+ # @param watermark_text {WatermarkText} with the watermark data.If the parameter is provided the query string parameters are ignored.
4349
+ # @param [Hash] opts the optional parameters
4350
+ # @option opts [String] :filename Result name of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document
4351
+ # @option opts [String] :text The text to insert.
4352
+ # @option opts [Float] :rotation_angle The text rotation angle.
4353
+ # @option opts [String] :storage The document storage.
4354
+ # @option opts [String] :folder The document folder.
4355
+ # @return [DocumentResponse]
4356
+ def post_insert_document_watermark_text(name, watermark_text, opts = {})
4357
+ if Configuration.debugging
4358
+ Configuration.logger.debug "Calling API: WordsApi#post_insert_document_watermark_text ..."
4359
+ end
4360
+
4361
+ # verify the required parameter 'name' is set
4362
+ fail "Missing the required parameter 'name' when calling post_insert_document_watermark_text" if name.nil?
4363
+
4364
+ # verify the required parameter 'watermark_text' is set
4365
+ fail "Missing the required parameter 'watermark_text' when calling post_insert_document_watermark_text" if watermark_text.nil?
4366
+
4367
+ # resource path
4368
+ path = "/words/{name}/watermark/insertText".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
4369
+
4370
+ # query parameters
4371
+ query_params = {}
4372
+ query_params[:'filename'] = opts[:'filename'] if opts[:'filename']
4373
+ query_params[:'text'] = opts[:'text'] if opts[:'text']
4374
+ query_params[:'rotationAngle'] = opts[:'rotation_angle'] if opts[:'rotation_angle']
4375
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
4376
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
4377
+
4378
+ # header parameters
4379
+ header_params = {}
4380
+
4381
+ # HTTP header 'Accept' (if needed)
4382
+ _header_accept = ['application/json']
4383
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
4384
+
4385
+ # HTTP header 'Content-Type'
4386
+ _header_content_type = ['application/json']
4387
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
4388
+
4389
+ # form parameters
4390
+ form_params = {}
4391
+
4392
+ # http body (model)
4393
+ post_body = @api_client.object_to_http_body(watermark_text)
4394
+
4395
+
4396
+ auth_names = []
4397
+ result = @api_client.call_api(:POST, path,
4398
+ :header_params => header_params,
4399
+ :query_params => query_params,
4400
+ :form_params => form_params,
4401
+ :body => post_body,
4402
+ :auth_names => auth_names,
4403
+ :return_type => 'DocumentResponse')
4404
+ if Configuration.debugging
4405
+ Configuration.logger.debug "API called: WordsApi#post_insert_document_watermark_text. Result: #{result.inspect}"
4406
+ end
4407
+ return result
4408
+ end
4409
+ end
4410
+ end
4411
+
4412
+
4413
+
4414
+