groupdocs_annotation_cloud 19.5 → 22.2
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.
- checksums.yaml +4 -4
- data/lib/groupdocs_annotation_cloud/api/annotate_api.rb +107 -263
- data/lib/groupdocs_annotation_cloud/api/file_api.rb +7 -7
- data/lib/groupdocs_annotation_cloud/api/folder_api.rb +7 -7
- data/lib/groupdocs_annotation_cloud/api/info_api.rb +11 -22
- data/lib/groupdocs_annotation_cloud/api/license_api.rb +169 -0
- data/lib/groupdocs_annotation_cloud/api/preview_api.rb +23 -90
- data/lib/groupdocs_annotation_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_annotation_cloud/api_client.rb +1 -1
- data/lib/groupdocs_annotation_cloud/api_error.rb +18 -5
- data/lib/groupdocs_annotation_cloud/configuration.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/{row_info.rb → annotate_options.rb} +65 -72
- data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +184 -61
- data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +41 -26
- data/lib/groupdocs_annotation_cloud/models/consumption_result.rb +234 -0
- data/lib/groupdocs_annotation_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/document_info.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/error.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/file_info.rb +244 -0
- data/lib/groupdocs_annotation_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/format.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/link.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/link_element.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_image.rb +2 -2
- data/lib/groupdocs_annotation_cloud/models/page_images.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_info.rb +5 -32
- data/lib/groupdocs_annotation_cloud/models/point.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/preview_options.rb +364 -0
- data/lib/groupdocs_annotation_cloud/models/rectangle.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/remove_options.rb +236 -0
- data/lib/groupdocs_annotation_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_annotation_cloud/version.rb +2 -2
- data/lib/groupdocs_annotation_cloud.rb +7 -2
- metadata +8 -17
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="folder.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -174,7 +174,7 @@ module GroupDocsAnnotationCloud
|
|
174
174
|
|
175
175
|
# http body (model)
|
176
176
|
post_body = nil
|
177
|
-
data, status_code, headers = @api_client.call_api(:
|
177
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
178
178
|
header_params: header_params,
|
179
179
|
query_params: query_params,
|
180
180
|
form_params: form_params,
|
@@ -430,7 +430,7 @@ end
|
|
430
430
|
#
|
431
431
|
# --------------------------------------------------------------------------------------------------------------------
|
432
432
|
# <copyright company="Aspose Pty Ltd" file="copy_folder_request.rb">
|
433
|
-
# Copyright (c) 2003-
|
433
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
434
434
|
# </copyright>
|
435
435
|
# <summary>
|
436
436
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -487,7 +487,7 @@ end
|
|
487
487
|
#
|
488
488
|
# --------------------------------------------------------------------------------------------------------------------
|
489
489
|
# <copyright company="Aspose Pty Ltd" file="create_folder_request.rb">
|
490
|
-
# Copyright (c) 2003-
|
490
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
491
491
|
# </copyright>
|
492
492
|
# <summary>
|
493
493
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -536,7 +536,7 @@ end
|
|
536
536
|
#
|
537
537
|
# --------------------------------------------------------------------------------------------------------------------
|
538
538
|
# <copyright company="Aspose Pty Ltd" file="delete_folder_request.rb">
|
539
|
-
# Copyright (c) 2003-
|
539
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
540
540
|
# </copyright>
|
541
541
|
# <summary>
|
542
542
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -589,7 +589,7 @@ end
|
|
589
589
|
#
|
590
590
|
# --------------------------------------------------------------------------------------------------------------------
|
591
591
|
# <copyright company="Aspose Pty Ltd" file="get_files_list_request.rb">
|
592
|
-
# Copyright (c) 2003-
|
592
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
593
593
|
# </copyright>
|
594
594
|
# <summary>
|
595
595
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -638,7 +638,7 @@ end
|
|
638
638
|
#
|
639
639
|
# --------------------------------------------------------------------------------------------------------------------
|
640
640
|
# <copyright company="Aspose Pty Ltd" file="move_folder_request.rb">
|
641
|
-
# Copyright (c) 2003-
|
641
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
642
642
|
# </copyright>
|
643
643
|
# <summary>
|
644
644
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="info.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -82,20 +82,13 @@ module GroupDocsAnnotationCloud
|
|
82
82
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetInfoRequest
|
83
83
|
|
84
84
|
@api_client.config.logger.debug 'Calling API: InfoApi.get_info ...' if @api_client.config.debugging
|
85
|
-
# verify the required parameter '
|
86
|
-
raise ArgumentError, 'Missing the required parameter
|
85
|
+
# verify the required parameter 'file_info' is set
|
86
|
+
raise ArgumentError, 'Missing the required parameter file_info when calling InfoApi.get_info' if @api_client.config.client_side_validation && request.file_info.nil?
|
87
87
|
# resource path
|
88
88
|
local_var_path = '/annotation/info'
|
89
89
|
|
90
90
|
# query parameters
|
91
91
|
query_params = {}
|
92
|
-
query_params[downcase_first_letter('filePath')] = request.file_path
|
93
|
-
|
94
|
-
if local_var_path.include? ('{' + downcase_first_letter('password') + '}')
|
95
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('password') + '}', request.password.to_s)
|
96
|
-
else
|
97
|
-
query_params[downcase_first_letter('password')] = request.password unless request.password.nil?
|
98
|
-
end
|
99
92
|
|
100
93
|
# header parameters
|
101
94
|
header_params = {}
|
@@ -108,8 +101,8 @@ module GroupDocsAnnotationCloud
|
|
108
101
|
form_params = {}
|
109
102
|
|
110
103
|
# http body (model)
|
111
|
-
post_body =
|
112
|
-
data, status_code, headers = @api_client.call_api(:
|
104
|
+
post_body = @api_client.object_to_http_body(request.file_info)
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
113
106
|
header_params: header_params,
|
114
107
|
query_params: query_params,
|
115
108
|
form_params: form_params,
|
@@ -229,7 +222,7 @@ end
|
|
229
222
|
#
|
230
223
|
# --------------------------------------------------------------------------------------------------------------------
|
231
224
|
# <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
|
232
|
-
# Copyright (c) 2003-
|
225
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
233
226
|
# </copyright>
|
234
227
|
# <summary>
|
235
228
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -260,18 +253,14 @@ module GroupDocsAnnotationCloud
|
|
260
253
|
#
|
261
254
|
class GetInfoRequest
|
262
255
|
|
263
|
-
# Document path in storage
|
264
|
-
attr_accessor :
|
265
|
-
# Source document password
|
266
|
-
attr_accessor :password
|
256
|
+
# Document path in storage and password
|
257
|
+
attr_accessor :file_info
|
267
258
|
|
268
259
|
#
|
269
260
|
# Initializes a new instance.
|
270
|
-
# @param
|
271
|
-
|
272
|
-
|
273
|
-
self.file_path = file_path
|
274
|
-
self.password = password
|
261
|
+
# @param file_info Document path in storage and password
|
262
|
+
def initialize(file_info)
|
263
|
+
self.file_info = file_info
|
275
264
|
end
|
276
265
|
end
|
277
266
|
end
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# -----------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose Pty Ltd" file="license.rb">
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# -----------------------------------------------------------------------------------
|
25
|
+
|
26
|
+
require 'uri'
|
27
|
+
require 'date'
|
28
|
+
|
29
|
+
module GroupDocsAnnotationCloud
|
30
|
+
#
|
31
|
+
# GroupDocs.Annotation Cloud API
|
32
|
+
#
|
33
|
+
class LicenseApi
|
34
|
+
attr_accessor :config
|
35
|
+
|
36
|
+
#make LicenseApi.new private
|
37
|
+
private_class_method :new
|
38
|
+
|
39
|
+
# Initializes new instance of LicenseApi
|
40
|
+
#
|
41
|
+
# @param [config] Configuration
|
42
|
+
# @return [LicenseApi] New instance of LicenseApi
|
43
|
+
def initialize(config)
|
44
|
+
@config = config
|
45
|
+
@api_client = ApiClient.new(config)
|
46
|
+
@access_token = nil
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes new instance of LicenseApi
|
50
|
+
#
|
51
|
+
# @param [app_sid] Application identifier (App SID)
|
52
|
+
# @param [app_key] Application private key (App Key)
|
53
|
+
# @return [LicenseApi] New instance of LicenseApi
|
54
|
+
def self.from_keys(app_sid, app_key)
|
55
|
+
config = Configuration.new(app_sid, app_key)
|
56
|
+
return new(config)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes new instance of LicenseApi
|
60
|
+
#
|
61
|
+
# @param [config] Configuration
|
62
|
+
# @return [LicenseApi] New instance of LicenseApi
|
63
|
+
def self.from_config(config)
|
64
|
+
return new(config)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Get license consumption
|
68
|
+
#
|
69
|
+
# @return [ConsumptionResult]
|
70
|
+
def get_consumption_credit()
|
71
|
+
data, _status_code, _headers = get_consumption_credit_with_http_info()
|
72
|
+
data
|
73
|
+
end
|
74
|
+
|
75
|
+
# Get license consumption
|
76
|
+
#
|
77
|
+
|
78
|
+
# @return [Array<(ConsumptionResult, Fixnum, Hash)>]
|
79
|
+
# ConsumptionResult data, response status code and response headers
|
80
|
+
def get_consumption_credit_with_http_info()
|
81
|
+
|
82
|
+
|
83
|
+
@api_client.config.logger.debug 'Calling API: LicenseApi.get_consumption_credit ...' if @api_client.config.debugging
|
84
|
+
# resource path
|
85
|
+
local_var_path = '/annotation/consumption'
|
86
|
+
|
87
|
+
# query parameters
|
88
|
+
query_params = {}
|
89
|
+
|
90
|
+
# header parameters
|
91
|
+
header_params = {}
|
92
|
+
# HTTP header 'Accept' (if needed)
|
93
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
94
|
+
# HTTP header 'Content-Type'
|
95
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
96
|
+
|
97
|
+
# form parameters
|
98
|
+
form_params = {}
|
99
|
+
|
100
|
+
# http body (model)
|
101
|
+
post_body = nil
|
102
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
103
|
+
header_params: header_params,
|
104
|
+
query_params: query_params,
|
105
|
+
form_params: form_params,
|
106
|
+
body: post_body,
|
107
|
+
access_token: get_access_token,
|
108
|
+
return_type: 'ConsumptionResult')
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug "API called:
|
111
|
+
LicenseApi#get_consumption_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
112
|
+
end
|
113
|
+
[data, status_code, headers]
|
114
|
+
end
|
115
|
+
|
116
|
+
#
|
117
|
+
# Helper method to convert first letter to downcase
|
118
|
+
#
|
119
|
+
private def downcase_first_letter(str)
|
120
|
+
value = str[0].downcase + str[1..-1]
|
121
|
+
value
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Retrieves access token
|
126
|
+
#
|
127
|
+
private def get_access_token
|
128
|
+
if @access_token.nil? then
|
129
|
+
request_access_token
|
130
|
+
end
|
131
|
+
|
132
|
+
@access_token
|
133
|
+
end
|
134
|
+
|
135
|
+
#
|
136
|
+
# Gets a access token from server
|
137
|
+
#
|
138
|
+
private def request_access_token
|
139
|
+
auth_config = Configuration.new(@config.app_sid, @config.app_key)
|
140
|
+
auth_config.api_base_url = @config.api_base_url
|
141
|
+
auth_config.debugging = @config.debugging
|
142
|
+
auth_config.logger = @config.logger
|
143
|
+
auth_config.temp_folder_path = @config.temp_folder_path
|
144
|
+
auth_config.client_side_validation = @config.client_side_validation
|
145
|
+
auth_config.api_version = ''
|
146
|
+
|
147
|
+
auth_api_client = ApiClient.new(auth_config)
|
148
|
+
|
149
|
+
request_url = "/connect/token"
|
150
|
+
post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
|
151
|
+
|
152
|
+
data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
|
153
|
+
|
154
|
+
@access_token = data[:access_token]
|
155
|
+
|
156
|
+
expires_in_seconds = data[:expires_in].to_i - 5 * 60
|
157
|
+
expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
|
158
|
+
@access_token_expires_at = DateTime.now + expires_in_days
|
159
|
+
end
|
160
|
+
|
161
|
+
# requires all files inside a directory from current dir
|
162
|
+
# @param _dir can be relative path like '/lib' or "../lib"
|
163
|
+
private def require_all(_dir)
|
164
|
+
Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
|
165
|
+
require file
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="preview.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -82,15 +82,13 @@ module GroupDocsAnnotationCloud
|
|
82
82
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? DeletePagesRequest
|
83
83
|
|
84
84
|
@api_client.config.logger.debug 'Calling API: PreviewApi.delete_pages ...' if @api_client.config.debugging
|
85
|
-
# verify the required parameter '
|
86
|
-
raise ArgumentError, 'Missing the required parameter
|
85
|
+
# verify the required parameter 'file_info' is set
|
86
|
+
raise ArgumentError, 'Missing the required parameter file_info when calling PreviewApi.delete_pages' if @api_client.config.client_side_validation && request.file_info.nil?
|
87
87
|
# resource path
|
88
|
-
local_var_path = '/annotation/
|
88
|
+
local_var_path = '/annotation/preview/remove'
|
89
89
|
|
90
90
|
# query parameters
|
91
91
|
query_params = {}
|
92
|
-
query_params[downcase_first_letter('filePath')] = request.file_path
|
93
|
-
|
94
92
|
|
95
93
|
# header parameters
|
96
94
|
header_params = {}
|
@@ -103,8 +101,8 @@ module GroupDocsAnnotationCloud
|
|
103
101
|
form_params = {}
|
104
102
|
|
105
103
|
# http body (model)
|
106
|
-
post_body =
|
107
|
-
data, status_code, headers = @api_client.call_api(:
|
104
|
+
post_body = @api_client.object_to_http_body(request.file_info)
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
108
106
|
header_params: header_params,
|
109
107
|
query_params: query_params,
|
110
108
|
form_params: form_params,
|
@@ -135,50 +133,13 @@ module GroupDocsAnnotationCloud
|
|
135
133
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetPagesRequest
|
136
134
|
|
137
135
|
@api_client.config.logger.debug 'Calling API: PreviewApi.get_pages ...' if @api_client.config.debugging
|
138
|
-
# verify the required parameter '
|
139
|
-
raise ArgumentError, 'Missing the required parameter
|
136
|
+
# verify the required parameter 'options' is set
|
137
|
+
raise ArgumentError, 'Missing the required parameter options when calling PreviewApi.get_pages' if @api_client.config.client_side_validation && request.options.nil?
|
140
138
|
# resource path
|
141
|
-
local_var_path = '/annotation/
|
139
|
+
local_var_path = '/annotation/preview/create'
|
142
140
|
|
143
141
|
# query parameters
|
144
142
|
query_params = {}
|
145
|
-
query_params[downcase_first_letter('filePath')] = request.file_path
|
146
|
-
|
147
|
-
if local_var_path.include? ('{' + downcase_first_letter('countPagesToConvert') + '}')
|
148
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('countPagesToConvert') + '}', request.count_pages_to_convert.to_s)
|
149
|
-
else
|
150
|
-
query_params[downcase_first_letter('countPagesToConvert')] = request.count_pages_to_convert unless request.count_pages_to_convert.nil?
|
151
|
-
end
|
152
|
-
if local_var_path.include? ('{' + downcase_first_letter('pageNumber') + '}')
|
153
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('pageNumber') + '}', request.page_number.to_s)
|
154
|
-
else
|
155
|
-
query_params[downcase_first_letter('pageNumber')] = request.page_number unless request.page_number.nil?
|
156
|
-
end
|
157
|
-
if local_var_path.include? ('{' + downcase_first_letter('pageNumbersToConvert') + '}')
|
158
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('pageNumbersToConvert') + '}', request.page_numbers_to_convert.to_s)
|
159
|
-
else
|
160
|
-
query_params[downcase_first_letter('pageNumbersToConvert')] = @api_client.build_collection_param(request.page_numbers_to_convert, :multi) unless request.page_numbers_to_convert.nil?
|
161
|
-
end
|
162
|
-
if local_var_path.include? ('{' + downcase_first_letter('withoutAnnotations') + '}')
|
163
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('withoutAnnotations') + '}', request.without_annotations.to_s)
|
164
|
-
else
|
165
|
-
query_params[downcase_first_letter('withoutAnnotations')] = request.without_annotations unless request.without_annotations.nil?
|
166
|
-
end
|
167
|
-
if local_var_path.include? ('{' + downcase_first_letter('enableCaching') + '}')
|
168
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('enableCaching') + '}', request.enable_caching.to_s)
|
169
|
-
else
|
170
|
-
query_params[downcase_first_letter('enableCaching')] = request.enable_caching unless request.enable_caching.nil?
|
171
|
-
end
|
172
|
-
if local_var_path.include? ('{' + downcase_first_letter('cacheStoragePath') + '}')
|
173
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('cacheStoragePath') + '}', request.cache_storage_path.to_s)
|
174
|
-
else
|
175
|
-
query_params[downcase_first_letter('cacheStoragePath')] = request.cache_storage_path unless request.cache_storage_path.nil?
|
176
|
-
end
|
177
|
-
if local_var_path.include? ('{' + downcase_first_letter('password') + '}')
|
178
|
-
local_var_path = local_var_path.sub('{' + downcase_first_letter('password') + '}', request.password.to_s)
|
179
|
-
else
|
180
|
-
query_params[downcase_first_letter('password')] = request.password unless request.password.nil?
|
181
|
-
end
|
182
143
|
|
183
144
|
# header parameters
|
184
145
|
header_params = {}
|
@@ -191,8 +152,8 @@ module GroupDocsAnnotationCloud
|
|
191
152
|
form_params = {}
|
192
153
|
|
193
154
|
# http body (model)
|
194
|
-
post_body =
|
195
|
-
data, status_code, headers = @api_client.call_api(:
|
155
|
+
post_body = @api_client.object_to_http_body(request.options)
|
156
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
196
157
|
header_params: header_params,
|
197
158
|
query_params: query_params,
|
198
159
|
form_params: form_params,
|
@@ -263,7 +224,7 @@ end
|
|
263
224
|
#
|
264
225
|
# --------------------------------------------------------------------------------------------------------------------
|
265
226
|
# <copyright company="Aspose Pty Ltd" file="delete_pages_request.rb">
|
266
|
-
# Copyright (c) 2003-
|
227
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
267
228
|
# </copyright>
|
268
229
|
# <summary>
|
269
230
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -294,21 +255,21 @@ module GroupDocsAnnotationCloud
|
|
294
255
|
#
|
295
256
|
class DeletePagesRequest
|
296
257
|
|
297
|
-
# Document
|
298
|
-
attr_accessor :
|
258
|
+
# Document info to remove preview
|
259
|
+
attr_accessor :file_info
|
299
260
|
|
300
261
|
#
|
301
262
|
# Initializes a new instance.
|
302
|
-
# @param
|
303
|
-
def initialize(
|
304
|
-
self.
|
263
|
+
# @param file_info Document info to remove preview
|
264
|
+
def initialize(file_info)
|
265
|
+
self.file_info = file_info
|
305
266
|
end
|
306
267
|
end
|
307
268
|
end
|
308
269
|
#
|
309
270
|
# --------------------------------------------------------------------------------------------------------------------
|
310
271
|
# <copyright company="Aspose Pty Ltd" file="get_pages_request.rb">
|
311
|
-
# Copyright (c) 2003-
|
272
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
312
273
|
# </copyright>
|
313
274
|
# <summary>
|
314
275
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -339,42 +300,14 @@ module GroupDocsAnnotationCloud
|
|
339
300
|
#
|
340
301
|
class GetPagesRequest
|
341
302
|
|
342
|
-
# Document
|
343
|
-
attr_accessor :
|
344
|
-
# The count pages to convert
|
345
|
-
attr_accessor :count_pages_to_convert
|
346
|
-
# The start page number
|
347
|
-
attr_accessor :page_number
|
348
|
-
# The list of page numbers to convert
|
349
|
-
attr_accessor :page_numbers_to_convert
|
350
|
-
# If true returns specific pages without annotations
|
351
|
-
attr_accessor :without_annotations
|
352
|
-
# Indicates whether to use previously cached document or not
|
353
|
-
attr_accessor :enable_caching
|
354
|
-
# The cache storage path
|
355
|
-
attr_accessor :cache_storage_path
|
356
|
-
# Source document opening password
|
357
|
-
attr_accessor :password
|
303
|
+
# Document preview options
|
304
|
+
attr_accessor :options
|
358
305
|
|
359
306
|
#
|
360
307
|
# Initializes a new instance.
|
361
|
-
# @param
|
362
|
-
|
363
|
-
|
364
|
-
# @param page_numbers_to_convert The list of page numbers to convert
|
365
|
-
# @param without_annotations If true returns specific pages without annotations
|
366
|
-
# @param enable_caching Indicates whether to use previously cached document or not
|
367
|
-
# @param cache_storage_path The cache storage path
|
368
|
-
# @param password Source document opening password
|
369
|
-
def initialize(file_path, count_pages_to_convert = nil, page_number = nil, page_numbers_to_convert = nil, without_annotations = nil, enable_caching = nil, cache_storage_path = nil, password = nil)
|
370
|
-
self.file_path = file_path
|
371
|
-
self.count_pages_to_convert = count_pages_to_convert
|
372
|
-
self.page_number = page_number
|
373
|
-
self.page_numbers_to_convert = page_numbers_to_convert
|
374
|
-
self.without_annotations = without_annotations
|
375
|
-
self.enable_caching = enable_caching
|
376
|
-
self.cache_storage_path = cache_storage_path
|
377
|
-
self.password = password
|
308
|
+
# @param options Document preview options
|
309
|
+
def initialize(options)
|
310
|
+
self.options = options
|
378
311
|
end
|
379
312
|
end
|
380
313
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="storage.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -350,7 +350,7 @@ end
|
|
350
350
|
#
|
351
351
|
# --------------------------------------------------------------------------------------------------------------------
|
352
352
|
# <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
|
353
|
-
# Copyright (c) 2003-
|
353
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
354
354
|
# </copyright>
|
355
355
|
# <summary>
|
356
356
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -395,7 +395,7 @@ end
|
|
395
395
|
#
|
396
396
|
# --------------------------------------------------------------------------------------------------------------------
|
397
397
|
# <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
|
398
|
-
# Copyright (c) 2003-
|
398
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
399
399
|
# </copyright>
|
400
400
|
# <summary>
|
401
401
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -444,7 +444,7 @@ end
|
|
444
444
|
#
|
445
445
|
# --------------------------------------------------------------------------------------------------------------------
|
446
446
|
# <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
|
447
|
-
# Copyright (c) 2003-
|
447
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
448
448
|
# </copyright>
|
449
449
|
# <summary>
|
450
450
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -497,7 +497,7 @@ end
|
|
497
497
|
#
|
498
498
|
# --------------------------------------------------------------------------------------------------------------------
|
499
499
|
# <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
|
500
|
-
# Copyright (c) 2003-
|
500
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
501
501
|
# </copyright>
|
502
502
|
# <summary>
|
503
503
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_client.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_error.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -39,10 +39,23 @@ module GroupDocsAnnotationCloud
|
|
39
39
|
|
40
40
|
if arg.key?(:response_body) then
|
41
41
|
data = JSON.parse(arg[:response_body], :symbolize_names => true)
|
42
|
-
if !data.nil?
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
if !data.nil? then
|
43
|
+
if !data[:error].nil? then
|
44
|
+
error = data[:error]
|
45
|
+
if error.kind_of?(String) then
|
46
|
+
@message = error
|
47
|
+
else
|
48
|
+
@message = error[:message]
|
49
|
+
end
|
50
|
+
else
|
51
|
+
message = data[:message]
|
52
|
+
if !message.nil? && message.kind_of?(String) then
|
53
|
+
@message = message
|
54
|
+
@code = data[:code]
|
55
|
+
else
|
56
|
+
@message = data
|
57
|
+
end
|
58
|
+
end
|
46
59
|
end
|
47
60
|
end
|
48
61
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="configuration.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2021 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|