groupdocs_viewer_cloud 19.4 → 19.5
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0cbfe21d908f66ef24e5938bdcdbee8e26b897aa
|
|
4
|
+
data.tar.gz: 418bf7ac15b6b762580552fd28eec14eb68aa78b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7bb56ec3b2ad941778572b9e34136d4a074bdf06780064aa4ebc6910e3d51ecfbe4d2a9038067ecedfe5407986e67e6802d60146b9737a21cf613d94991350e
|
|
7
|
+
data.tar.gz: a5dfb6fddde5dbd1e5971f165ba82fbe7cb7f867cb2f585e5941260a97cdc1a0c8972fe1d0fff7941c706f772441e2f1c125fe6b3da54a675085425d0ac52a32
|
|
@@ -67,5 +67,6 @@ require_relative 'groupdocs_viewer_cloud/models/page_view'
|
|
|
67
67
|
# APIs
|
|
68
68
|
require_relative 'groupdocs_viewer_cloud/api/file_api'
|
|
69
69
|
require_relative 'groupdocs_viewer_cloud/api/folder_api'
|
|
70
|
+
require_relative 'groupdocs_viewer_cloud/api/info_api'
|
|
70
71
|
require_relative 'groupdocs_viewer_cloud/api/storage_api'
|
|
71
|
-
require_relative 'groupdocs_viewer_cloud/api/
|
|
72
|
+
require_relative 'groupdocs_viewer_cloud/api/view_api'
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose Pty Ltd" file="info.rb">
|
|
3
|
+
# Copyright (c) 2003-2019 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 GroupDocsViewerCloud
|
|
30
|
+
#
|
|
31
|
+
# GroupDocs.Viewer Cloud API
|
|
32
|
+
#
|
|
33
|
+
class InfoApi
|
|
34
|
+
attr_accessor :config
|
|
35
|
+
|
|
36
|
+
#make InfoApi.new private
|
|
37
|
+
private_class_method :new
|
|
38
|
+
|
|
39
|
+
# Initializes new instance of InfoApi
|
|
40
|
+
#
|
|
41
|
+
# @param [config] Configuration
|
|
42
|
+
# @return [InfoApi] New instance of InfoApi
|
|
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 InfoApi
|
|
50
|
+
#
|
|
51
|
+
# @param [app_sid] Application identifier (App SID)
|
|
52
|
+
# @param [app_key] Application private key (App Key)
|
|
53
|
+
# @return [InfoApi] New instance of InfoApi
|
|
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 InfoApi
|
|
60
|
+
#
|
|
61
|
+
# @param [config] Configuration
|
|
62
|
+
# @return [InfoApi] New instance of InfoApi
|
|
63
|
+
def self.from_config(config)
|
|
64
|
+
return new(config)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Retrieve information about document pages
|
|
68
|
+
#
|
|
69
|
+
# @param request get_info_request
|
|
70
|
+
# @return [InfoResult]
|
|
71
|
+
def get_info(request)
|
|
72
|
+
data, _status_code, _headers = get_info_with_http_info(request)
|
|
73
|
+
data
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Retrieve information about document pages
|
|
77
|
+
#
|
|
78
|
+
# @param request get_info_request
|
|
79
|
+
# @return [Array<(InfoResult, Fixnum, Hash)>]
|
|
80
|
+
# InfoResult data, response status code and response headers
|
|
81
|
+
def get_info_with_http_info(request)
|
|
82
|
+
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetInfoRequest
|
|
83
|
+
|
|
84
|
+
@api_client.config.logger.debug 'Calling API: InfoApi.get_info ...' if @api_client.config.debugging
|
|
85
|
+
# verify the required parameter 'view_options' is set
|
|
86
|
+
raise ArgumentError, 'Missing the required parameter view_options when calling InfoApi.get_info' if @api_client.config.client_side_validation && request.view_options.nil?
|
|
87
|
+
# resource path
|
|
88
|
+
local_var_path = '/viewer/info'
|
|
89
|
+
|
|
90
|
+
# query parameters
|
|
91
|
+
query_params = {}
|
|
92
|
+
|
|
93
|
+
# header parameters
|
|
94
|
+
header_params = {}
|
|
95
|
+
# HTTP header 'Accept' (if needed)
|
|
96
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
97
|
+
# HTTP header 'Content-Type'
|
|
98
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
99
|
+
|
|
100
|
+
# form parameters
|
|
101
|
+
form_params = {}
|
|
102
|
+
|
|
103
|
+
# http body (model)
|
|
104
|
+
post_body = @api_client.object_to_http_body(request.view_options)
|
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
106
|
+
header_params: header_params,
|
|
107
|
+
query_params: query_params,
|
|
108
|
+
form_params: form_params,
|
|
109
|
+
body: post_body,
|
|
110
|
+
access_token: get_access_token,
|
|
111
|
+
return_type: 'InfoResult')
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug "API called:
|
|
114
|
+
InfoApi#get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
115
|
+
end
|
|
116
|
+
[data, status_code, headers]
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# List supported file formats
|
|
120
|
+
#
|
|
121
|
+
# @return [FormatsResult]
|
|
122
|
+
def get_supported_file_formats()
|
|
123
|
+
data, _status_code, _headers = get_supported_file_formats_with_http_info()
|
|
124
|
+
data
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# List supported file formats
|
|
128
|
+
#
|
|
129
|
+
|
|
130
|
+
# @return [Array<(FormatsResult, Fixnum, Hash)>]
|
|
131
|
+
# FormatsResult data, response status code and response headers
|
|
132
|
+
def get_supported_file_formats_with_http_info()
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
@api_client.config.logger.debug 'Calling API: InfoApi.get_supported_file_formats ...' if @api_client.config.debugging
|
|
136
|
+
# resource path
|
|
137
|
+
local_var_path = '/viewer/formats'
|
|
138
|
+
|
|
139
|
+
# query parameters
|
|
140
|
+
query_params = {}
|
|
141
|
+
|
|
142
|
+
# header parameters
|
|
143
|
+
header_params = {}
|
|
144
|
+
# HTTP header 'Accept' (if needed)
|
|
145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
146
|
+
# HTTP header 'Content-Type'
|
|
147
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
148
|
+
|
|
149
|
+
# form parameters
|
|
150
|
+
form_params = {}
|
|
151
|
+
|
|
152
|
+
# http body (model)
|
|
153
|
+
post_body = nil
|
|
154
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
155
|
+
header_params: header_params,
|
|
156
|
+
query_params: query_params,
|
|
157
|
+
form_params: form_params,
|
|
158
|
+
body: post_body,
|
|
159
|
+
access_token: get_access_token,
|
|
160
|
+
return_type: 'FormatsResult')
|
|
161
|
+
if @api_client.config.debugging
|
|
162
|
+
@api_client.config.logger.debug "API called:
|
|
163
|
+
InfoApi#get_supported_file_formats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
164
|
+
end
|
|
165
|
+
[data, status_code, headers]
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
#
|
|
169
|
+
# Helper method to convert first letter to downcase
|
|
170
|
+
#
|
|
171
|
+
private def downcase_first_letter(str)
|
|
172
|
+
value = str[0].downcase + str[1..-1]
|
|
173
|
+
value
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
#
|
|
177
|
+
# Retrieves access token
|
|
178
|
+
#
|
|
179
|
+
private def get_access_token
|
|
180
|
+
if @access_token.nil? then
|
|
181
|
+
request_access_token
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@access_token
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
#
|
|
188
|
+
# Gets a access token from server
|
|
189
|
+
#
|
|
190
|
+
private def request_access_token
|
|
191
|
+
auth_config = Configuration.new(@config.app_sid, @config.app_key)
|
|
192
|
+
auth_config.api_base_url = @config.api_base_url
|
|
193
|
+
auth_config.debugging = @config.debugging
|
|
194
|
+
auth_config.logger = @config.logger
|
|
195
|
+
auth_config.temp_folder_path = @config.temp_folder_path
|
|
196
|
+
auth_config.client_side_validation = @config.client_side_validation
|
|
197
|
+
auth_config.api_version = ''
|
|
198
|
+
|
|
199
|
+
auth_api_client = ApiClient.new(auth_config)
|
|
200
|
+
|
|
201
|
+
request_url = "/connect/token"
|
|
202
|
+
post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
|
|
203
|
+
|
|
204
|
+
data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
|
|
205
|
+
|
|
206
|
+
@access_token = data[:access_token]
|
|
207
|
+
|
|
208
|
+
expires_in_seconds = data[:expires_in].to_i - 5 * 60
|
|
209
|
+
expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
|
|
210
|
+
@access_token_expires_at = DateTime.now + expires_in_days
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# requires all files inside a directory from current dir
|
|
214
|
+
# @param _dir can be relative path like '/lib' or "../lib"
|
|
215
|
+
private def require_all(_dir)
|
|
216
|
+
Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
|
|
217
|
+
require file
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
#
|
|
223
|
+
# --------------------------------------------------------------------------------------------------------------------
|
|
224
|
+
# <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
|
|
225
|
+
# Copyright (c) 2003-2019 Aspose Pty Ltd
|
|
226
|
+
# </copyright>
|
|
227
|
+
# <summary>
|
|
228
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
229
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
230
|
+
# in the Software without restriction, including without limitation the rights
|
|
231
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
232
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
233
|
+
# furnished to do so, subject to the following conditions:
|
|
234
|
+
#
|
|
235
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
236
|
+
# copies or substantial portions of the Software.
|
|
237
|
+
#
|
|
238
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
239
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
240
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
241
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
242
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
243
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
244
|
+
# SOFTWARE.
|
|
245
|
+
# </summary>
|
|
246
|
+
# --------------------------------------------------------------------------------------------------------------------
|
|
247
|
+
#
|
|
248
|
+
|
|
249
|
+
module GroupDocsViewerCloud
|
|
250
|
+
|
|
251
|
+
#
|
|
252
|
+
# Request model for get_info operation.
|
|
253
|
+
#
|
|
254
|
+
class GetInfoRequest
|
|
255
|
+
|
|
256
|
+
# View options
|
|
257
|
+
attr_accessor :view_options
|
|
258
|
+
|
|
259
|
+
#
|
|
260
|
+
# Initializes a new instance.
|
|
261
|
+
# @param view_options View options
|
|
262
|
+
def initialize(view_options)
|
|
263
|
+
self.view_options = view_options
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
|
2
|
-
# <copyright company="Aspose Pty Ltd" file="
|
|
2
|
+
# <copyright company="Aspose Pty Ltd" file="view.rb">
|
|
3
3
|
# Copyright (c) 2003-2019 Aspose Pty Ltd
|
|
4
4
|
# </copyright>
|
|
5
5
|
# <summary>
|
|
@@ -30,36 +30,36 @@ module GroupDocsViewerCloud
|
|
|
30
30
|
#
|
|
31
31
|
# GroupDocs.Viewer Cloud API
|
|
32
32
|
#
|
|
33
|
-
class
|
|
33
|
+
class ViewApi
|
|
34
34
|
attr_accessor :config
|
|
35
35
|
|
|
36
|
-
#make
|
|
36
|
+
#make ViewApi.new private
|
|
37
37
|
private_class_method :new
|
|
38
38
|
|
|
39
|
-
# Initializes new instance of
|
|
39
|
+
# Initializes new instance of ViewApi
|
|
40
40
|
#
|
|
41
41
|
# @param [config] Configuration
|
|
42
|
-
# @return [
|
|
42
|
+
# @return [ViewApi] New instance of ViewApi
|
|
43
43
|
def initialize(config)
|
|
44
44
|
@config = config
|
|
45
45
|
@api_client = ApiClient.new(config)
|
|
46
46
|
@access_token = nil
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
# Initializes new instance of
|
|
49
|
+
# Initializes new instance of ViewApi
|
|
50
50
|
#
|
|
51
51
|
# @param [app_sid] Application identifier (App SID)
|
|
52
52
|
# @param [app_key] Application private key (App Key)
|
|
53
|
-
# @return [
|
|
53
|
+
# @return [ViewApi] New instance of ViewApi
|
|
54
54
|
def self.from_keys(app_sid, app_key)
|
|
55
55
|
config = Configuration.new(app_sid, app_key)
|
|
56
56
|
return new(config)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
# Initializes new instance of
|
|
59
|
+
# Initializes new instance of ViewApi
|
|
60
60
|
#
|
|
61
61
|
# @param [config] Configuration
|
|
62
|
-
# @return [
|
|
62
|
+
# @return [ViewApi] New instance of ViewApi
|
|
63
63
|
def self.from_config(config)
|
|
64
64
|
return new(config)
|
|
65
65
|
end
|
|
@@ -81,9 +81,9 @@ module GroupDocsViewerCloud
|
|
|
81
81
|
def create_view_with_http_info(request)
|
|
82
82
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? CreateViewRequest
|
|
83
83
|
|
|
84
|
-
@api_client.config.logger.debug 'Calling API:
|
|
84
|
+
@api_client.config.logger.debug 'Calling API: ViewApi.create_view ...' if @api_client.config.debugging
|
|
85
85
|
# verify the required parameter 'view_options' is set
|
|
86
|
-
raise ArgumentError, 'Missing the required parameter view_options when calling
|
|
86
|
+
raise ArgumentError, 'Missing the required parameter view_options when calling ViewApi.create_view' if @api_client.config.client_side_validation && request.view_options.nil?
|
|
87
87
|
# resource path
|
|
88
88
|
local_var_path = '/viewer/view'
|
|
89
89
|
|
|
@@ -111,7 +111,7 @@ module GroupDocsViewerCloud
|
|
|
111
111
|
return_type: 'ViewResult')
|
|
112
112
|
if @api_client.config.debugging
|
|
113
113
|
@api_client.config.logger.debug "API called:
|
|
114
|
-
|
|
114
|
+
ViewApi#create_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
115
115
|
end
|
|
116
116
|
[data, status_code, headers]
|
|
117
117
|
end
|
|
@@ -133,9 +133,9 @@ module GroupDocsViewerCloud
|
|
|
133
133
|
def delete_view_with_http_info(request)
|
|
134
134
|
raise ArgumentError, 'Incorrect request type' unless request.is_a? DeleteViewRequest
|
|
135
135
|
|
|
136
|
-
@api_client.config.logger.debug 'Calling API:
|
|
136
|
+
@api_client.config.logger.debug 'Calling API: ViewApi.delete_view ...' if @api_client.config.debugging
|
|
137
137
|
# verify the required parameter 'delete_view_options' is set
|
|
138
|
-
raise ArgumentError, 'Missing the required parameter delete_view_options when calling
|
|
138
|
+
raise ArgumentError, 'Missing the required parameter delete_view_options when calling ViewApi.delete_view' if @api_client.config.client_side_validation && request.delete_view_options.nil?
|
|
139
139
|
# resource path
|
|
140
140
|
local_var_path = '/viewer/view'
|
|
141
141
|
|
|
@@ -162,108 +162,7 @@ module GroupDocsViewerCloud
|
|
|
162
162
|
access_token: get_access_token)
|
|
163
163
|
if @api_client.config.debugging
|
|
164
164
|
@api_client.config.logger.debug "API called:
|
|
165
|
-
|
|
166
|
-
end
|
|
167
|
-
[data, status_code, headers]
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Retrieve information about document pages
|
|
171
|
-
#
|
|
172
|
-
# @param request get_info_request
|
|
173
|
-
# @return [InfoResult]
|
|
174
|
-
def get_info(request)
|
|
175
|
-
data, _status_code, _headers = get_info_with_http_info(request)
|
|
176
|
-
data
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
# Retrieve information about document pages
|
|
180
|
-
#
|
|
181
|
-
# @param request get_info_request
|
|
182
|
-
# @return [Array<(InfoResult, Fixnum, Hash)>]
|
|
183
|
-
# InfoResult data, response status code and response headers
|
|
184
|
-
def get_info_with_http_info(request)
|
|
185
|
-
raise ArgumentError, 'Incorrect request type' unless request.is_a? GetInfoRequest
|
|
186
|
-
|
|
187
|
-
@api_client.config.logger.debug 'Calling API: ViewerApi.get_info ...' if @api_client.config.debugging
|
|
188
|
-
# verify the required parameter 'view_options' is set
|
|
189
|
-
raise ArgumentError, 'Missing the required parameter view_options when calling ViewerApi.get_info' if @api_client.config.client_side_validation && request.view_options.nil?
|
|
190
|
-
# resource path
|
|
191
|
-
local_var_path = '/viewer/info'
|
|
192
|
-
|
|
193
|
-
# query parameters
|
|
194
|
-
query_params = {}
|
|
195
|
-
|
|
196
|
-
# header parameters
|
|
197
|
-
header_params = {}
|
|
198
|
-
# HTTP header 'Accept' (if needed)
|
|
199
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
200
|
-
# HTTP header 'Content-Type'
|
|
201
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
202
|
-
|
|
203
|
-
# form parameters
|
|
204
|
-
form_params = {}
|
|
205
|
-
|
|
206
|
-
# http body (model)
|
|
207
|
-
post_body = @api_client.object_to_http_body(request.view_options)
|
|
208
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
209
|
-
header_params: header_params,
|
|
210
|
-
query_params: query_params,
|
|
211
|
-
form_params: form_params,
|
|
212
|
-
body: post_body,
|
|
213
|
-
access_token: get_access_token,
|
|
214
|
-
return_type: 'InfoResult')
|
|
215
|
-
if @api_client.config.debugging
|
|
216
|
-
@api_client.config.logger.debug "API called:
|
|
217
|
-
ViewerApi#get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
|
-
end
|
|
219
|
-
[data, status_code, headers]
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
# List supported file formats
|
|
223
|
-
#
|
|
224
|
-
# @return [FormatsResult]
|
|
225
|
-
def get_supported_file_formats()
|
|
226
|
-
data, _status_code, _headers = get_supported_file_formats_with_http_info()
|
|
227
|
-
data
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
# List supported file formats
|
|
231
|
-
#
|
|
232
|
-
|
|
233
|
-
# @return [Array<(FormatsResult, Fixnum, Hash)>]
|
|
234
|
-
# FormatsResult data, response status code and response headers
|
|
235
|
-
def get_supported_file_formats_with_http_info()
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
@api_client.config.logger.debug 'Calling API: ViewerApi.get_supported_file_formats ...' if @api_client.config.debugging
|
|
239
|
-
# resource path
|
|
240
|
-
local_var_path = '/viewer/formats'
|
|
241
|
-
|
|
242
|
-
# query parameters
|
|
243
|
-
query_params = {}
|
|
244
|
-
|
|
245
|
-
# header parameters
|
|
246
|
-
header_params = {}
|
|
247
|
-
# HTTP header 'Accept' (if needed)
|
|
248
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
249
|
-
# HTTP header 'Content-Type'
|
|
250
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
251
|
-
|
|
252
|
-
# form parameters
|
|
253
|
-
form_params = {}
|
|
254
|
-
|
|
255
|
-
# http body (model)
|
|
256
|
-
post_body = nil
|
|
257
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
258
|
-
header_params: header_params,
|
|
259
|
-
query_params: query_params,
|
|
260
|
-
form_params: form_params,
|
|
261
|
-
body: post_body,
|
|
262
|
-
access_token: get_access_token,
|
|
263
|
-
return_type: 'FormatsResult')
|
|
264
|
-
if @api_client.config.debugging
|
|
265
|
-
@api_client.config.logger.debug "API called:
|
|
266
|
-
ViewerApi#get_supported_file_formats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
165
|
+
ViewApi#delete_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
267
166
|
end
|
|
268
167
|
[data, status_code, headers]
|
|
269
168
|
end
|
|
@@ -412,48 +311,3 @@ module GroupDocsViewerCloud
|
|
|
412
311
|
end
|
|
413
312
|
end
|
|
414
313
|
end
|
|
415
|
-
#
|
|
416
|
-
# --------------------------------------------------------------------------------------------------------------------
|
|
417
|
-
# <copyright company="Aspose Pty Ltd" file="get_info_request.rb">
|
|
418
|
-
# Copyright (c) 2003-2019 Aspose Pty Ltd
|
|
419
|
-
# </copyright>
|
|
420
|
-
# <summary>
|
|
421
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
422
|
-
# of this software and associated documentation files (the "Software"), to deal
|
|
423
|
-
# in the Software without restriction, including without limitation the rights
|
|
424
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
425
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
426
|
-
# furnished to do so, subject to the following conditions:
|
|
427
|
-
#
|
|
428
|
-
# The above copyright notice and this permission notice shall be included in all
|
|
429
|
-
# copies or substantial portions of the Software.
|
|
430
|
-
#
|
|
431
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
432
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
433
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
434
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
435
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
436
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
437
|
-
# SOFTWARE.
|
|
438
|
-
# </summary>
|
|
439
|
-
# --------------------------------------------------------------------------------------------------------------------
|
|
440
|
-
#
|
|
441
|
-
|
|
442
|
-
module GroupDocsViewerCloud
|
|
443
|
-
|
|
444
|
-
#
|
|
445
|
-
# Request model for get_info operation.
|
|
446
|
-
#
|
|
447
|
-
class GetInfoRequest
|
|
448
|
-
|
|
449
|
-
# View options
|
|
450
|
-
attr_accessor :view_options
|
|
451
|
-
|
|
452
|
-
#
|
|
453
|
-
# Initializes a new instance.
|
|
454
|
-
# @param view_options View options
|
|
455
|
-
def initialize(view_options)
|
|
456
|
-
self.view_options = view_options
|
|
457
|
-
end
|
|
458
|
-
end
|
|
459
|
-
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: groupdocs_viewer_cloud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '19.
|
|
4
|
+
version: '19.5'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GroupDocs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -87,8 +87,9 @@ files:
|
|
|
87
87
|
- lib/groupdocs_viewer_cloud.rb
|
|
88
88
|
- lib/groupdocs_viewer_cloud/api/file_api.rb
|
|
89
89
|
- lib/groupdocs_viewer_cloud/api/folder_api.rb
|
|
90
|
+
- lib/groupdocs_viewer_cloud/api/info_api.rb
|
|
90
91
|
- lib/groupdocs_viewer_cloud/api/storage_api.rb
|
|
91
|
-
- lib/groupdocs_viewer_cloud/api/
|
|
92
|
+
- lib/groupdocs_viewer_cloud/api/view_api.rb
|
|
92
93
|
- lib/groupdocs_viewer_cloud/api_client.rb
|
|
93
94
|
- lib/groupdocs_viewer_cloud/api_error.rb
|
|
94
95
|
- lib/groupdocs_viewer_cloud/configuration.rb
|