groupdocs_viewer_cloud 19.3 → 20.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_viewer_cloud.rb +21 -3
  3. data/lib/groupdocs_viewer_cloud/api/file_api.rb +7 -7
  4. data/lib/groupdocs_viewer_cloud/api/folder_api.rb +7 -7
  5. data/lib/groupdocs_viewer_cloud/api/info_api.rb +266 -0
  6. data/lib/groupdocs_viewer_cloud/api/storage_api.rb +5 -5
  7. data/lib/groupdocs_viewer_cloud/api/{viewer_api.rb → view_api.rb} +22 -168
  8. data/lib/groupdocs_viewer_cloud/api_client.rb +1 -1
  9. data/lib/groupdocs_viewer_cloud/api_error.rb +7 -4
  10. data/lib/groupdocs_viewer_cloud/configuration.rb +1 -1
  11. data/lib/groupdocs_viewer_cloud/models/archive_options.rb +214 -0
  12. data/lib/groupdocs_viewer_cloud/models/archive_view_info.rb +216 -0
  13. data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +1 -1
  14. data/lib/groupdocs_viewer_cloud/models/attachment_view.rb +1 -1
  15. data/lib/groupdocs_viewer_cloud/models/cad_options.rb +54 -5
  16. data/lib/groupdocs_viewer_cloud/models/cad_view_info.rb +228 -0
  17. data/lib/groupdocs_viewer_cloud/models/character.rb +274 -0
  18. data/lib/groupdocs_viewer_cloud/models/delete_view_options.rb +15 -5
  19. data/lib/groupdocs_viewer_cloud/models/disc_usage.rb +1 -1
  20. data/lib/groupdocs_viewer_cloud/models/email_options.rb +44 -2
  21. data/lib/groupdocs_viewer_cloud/models/error.rb +1 -1
  22. data/lib/groupdocs_viewer_cloud/models/error_details.rb +1 -1
  23. data/lib/groupdocs_viewer_cloud/models/field_label.rb +1 -1
  24. data/lib/groupdocs_viewer_cloud/models/file_info.rb +1 -1
  25. data/lib/groupdocs_viewer_cloud/models/file_version.rb +1 -1
  26. data/lib/groupdocs_viewer_cloud/models/file_versions.rb +1 -1
  27. data/lib/groupdocs_viewer_cloud/models/files_list.rb +1 -1
  28. data/lib/groupdocs_viewer_cloud/models/files_upload_result.rb +1 -1
  29. data/lib/groupdocs_viewer_cloud/models/format.rb +1 -1
  30. data/lib/groupdocs_viewer_cloud/models/formats_result.rb +1 -1
  31. data/lib/groupdocs_viewer_cloud/models/html_options.rb +146 -10
  32. data/lib/groupdocs_viewer_cloud/models/html_resource.rb +1 -1
  33. data/lib/groupdocs_viewer_cloud/models/image_options.rb +86 -7
  34. data/lib/groupdocs_viewer_cloud/models/info_result.rb +75 -5
  35. data/lib/groupdocs_viewer_cloud/models/layer.rb +229 -0
  36. data/lib/groupdocs_viewer_cloud/models/layout.rb +244 -0
  37. data/lib/groupdocs_viewer_cloud/models/{row.rb → line.rb} +60 -72
  38. data/lib/groupdocs_viewer_cloud/models/object_exist.rb +1 -1
  39. data/lib/groupdocs_viewer_cloud/models/outlook_options.rb +249 -0
  40. data/lib/groupdocs_viewer_cloud/models/outlook_view_info.rb +216 -0
  41. data/lib/groupdocs_viewer_cloud/models/page_info.rb +28 -13
  42. data/lib/groupdocs_viewer_cloud/models/page_rotation.rb +271 -0
  43. data/lib/groupdocs_viewer_cloud/models/page_view.rb +1 -1
  44. data/lib/groupdocs_viewer_cloud/models/pdf_document_options.rb +316 -0
  45. data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +490 -0
  46. data/lib/groupdocs_viewer_cloud/models/pdf_view_info.rb +219 -0
  47. data/lib/groupdocs_viewer_cloud/models/project_management_options.rb +66 -3
  48. data/lib/groupdocs_viewer_cloud/models/project_management_view_info.rb +234 -0
  49. data/lib/groupdocs_viewer_cloud/models/render_options.rb +89 -10
  50. data/lib/groupdocs_viewer_cloud/models/resource.rb +1 -1
  51. data/lib/groupdocs_viewer_cloud/models/spreadsheet_options.rb +57 -5
  52. data/lib/groupdocs_viewer_cloud/models/storage_exist.rb +1 -1
  53. data/lib/groupdocs_viewer_cloud/models/storage_file.rb +1 -1
  54. data/lib/groupdocs_viewer_cloud/models/text_element.rb +274 -0
  55. data/lib/groupdocs_viewer_cloud/models/tile.rb +264 -0
  56. data/lib/groupdocs_viewer_cloud/models/view_options.rb +15 -5
  57. data/lib/groupdocs_viewer_cloud/models/view_result.rb +1 -1
  58. data/lib/groupdocs_viewer_cloud/models/watermark.rb +44 -2
  59. data/lib/groupdocs_viewer_cloud/models/word.rb +286 -0
  60. data/lib/groupdocs_viewer_cloud/models/word_processing_options.rb +219 -0
  61. data/lib/groupdocs_viewer_cloud/version.rb +2 -2
  62. metadata +22 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e16b937deb4d5b53e26a03a3cbf7fb54ae2d4029
4
- data.tar.gz: 42430a81bf760cd2fa0cb3bec08160081af6b641
3
+ metadata.gz: ffa03455dd9ddb74a86f360d06dc8a18bccf9ca8
4
+ data.tar.gz: 28970c9653880f41d2d737ccfbe29afd90da021b
5
5
  SHA512:
6
- metadata.gz: fe3677944015724737fa57d950522092270e497c2e4bee863d3d77906749560659add56008255dd20bbc8e78f1a81f4d4b581e027da285091456e2bf0935c3d4
7
- data.tar.gz: 4302c70a902d1eb1be531b135d7c5a18232df78112b94636a302d141ebd65e69fa51de3ac49ca69b01ad7ee94fae942c95d419d7c92c908d8ba1990032673be6
6
+ metadata.gz: 73a7334f0110fee1859717cac6a759305a3a0aa4e572d8b875e5aca74b71e6efac81428d5653c679eb2fc22b435b0fb18476e393bc195e37b8defdbca1d39a26
7
+ data.tar.gz: ecc2473ed71d29aba0422838d9fc704eba324d57c3c8b598422d6af74f26ce864628f2f5e560e3cceaa9f01a2310037ab5366d043b18969707793a2e29b033ab
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_viewer_cloud.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -30,8 +30,11 @@ require_relative 'groupdocs_viewer_cloud/version'
30
30
  require_relative 'groupdocs_viewer_cloud/configuration'
31
31
 
32
32
  # Models
33
+ require_relative 'groupdocs_viewer_cloud/models/archive_options'
34
+ require_relative 'groupdocs_viewer_cloud/models/archive_view_info'
33
35
  require_relative 'groupdocs_viewer_cloud/models/attachment_info'
34
36
  require_relative 'groupdocs_viewer_cloud/models/cad_options'
37
+ require_relative 'groupdocs_viewer_cloud/models/cad_view_info'
35
38
  require_relative 'groupdocs_viewer_cloud/models/delete_view_options'
36
39
  require_relative 'groupdocs_viewer_cloud/models/disc_usage'
37
40
  require_relative 'groupdocs_viewer_cloud/models/email_options'
@@ -45,27 +48,42 @@ require_relative 'groupdocs_viewer_cloud/models/files_upload_result'
45
48
  require_relative 'groupdocs_viewer_cloud/models/format'
46
49
  require_relative 'groupdocs_viewer_cloud/models/formats_result'
47
50
  require_relative 'groupdocs_viewer_cloud/models/info_result'
51
+ require_relative 'groupdocs_viewer_cloud/models/layer'
52
+ require_relative 'groupdocs_viewer_cloud/models/layout'
48
53
  require_relative 'groupdocs_viewer_cloud/models/object_exist'
54
+ require_relative 'groupdocs_viewer_cloud/models/outlook_options'
55
+ require_relative 'groupdocs_viewer_cloud/models/outlook_view_info'
49
56
  require_relative 'groupdocs_viewer_cloud/models/page_info'
57
+ require_relative 'groupdocs_viewer_cloud/models/page_rotation'
58
+ require_relative 'groupdocs_viewer_cloud/models/pdf_document_options'
59
+ require_relative 'groupdocs_viewer_cloud/models/pdf_view_info'
50
60
  require_relative 'groupdocs_viewer_cloud/models/project_management_options'
61
+ require_relative 'groupdocs_viewer_cloud/models/project_management_view_info'
51
62
  require_relative 'groupdocs_viewer_cloud/models/render_options'
52
63
  require_relative 'groupdocs_viewer_cloud/models/resource'
53
- require_relative 'groupdocs_viewer_cloud/models/row'
54
64
  require_relative 'groupdocs_viewer_cloud/models/spreadsheet_options'
55
65
  require_relative 'groupdocs_viewer_cloud/models/storage_exist'
56
66
  require_relative 'groupdocs_viewer_cloud/models/storage_file'
67
+ require_relative 'groupdocs_viewer_cloud/models/text_element'
68
+ require_relative 'groupdocs_viewer_cloud/models/tile'
57
69
  require_relative 'groupdocs_viewer_cloud/models/view_options'
58
70
  require_relative 'groupdocs_viewer_cloud/models/view_result'
59
71
  require_relative 'groupdocs_viewer_cloud/models/watermark'
72
+ require_relative 'groupdocs_viewer_cloud/models/word_processing_options'
60
73
  require_relative 'groupdocs_viewer_cloud/models/attachment_view'
74
+ require_relative 'groupdocs_viewer_cloud/models/character'
61
75
  require_relative 'groupdocs_viewer_cloud/models/file_version'
62
76
  require_relative 'groupdocs_viewer_cloud/models/html_options'
63
77
  require_relative 'groupdocs_viewer_cloud/models/html_resource'
64
78
  require_relative 'groupdocs_viewer_cloud/models/image_options'
79
+ require_relative 'groupdocs_viewer_cloud/models/line'
65
80
  require_relative 'groupdocs_viewer_cloud/models/page_view'
81
+ require_relative 'groupdocs_viewer_cloud/models/pdf_options'
82
+ require_relative 'groupdocs_viewer_cloud/models/word'
66
83
 
67
84
  # APIs
68
85
  require_relative 'groupdocs_viewer_cloud/api/file_api'
69
86
  require_relative 'groupdocs_viewer_cloud/api/folder_api'
87
+ require_relative 'groupdocs_viewer_cloud/api/info_api'
70
88
  require_relative 'groupdocs_viewer_cloud/api/storage_api'
71
- require_relative 'groupdocs_viewer_cloud/api/viewer_api'
89
+ require_relative 'groupdocs_viewer_cloud/api/view_api'
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="file.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -378,7 +378,7 @@ module GroupDocsViewerCloud
378
378
 
379
379
  # http body (model)
380
380
  post_body = nil
381
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
381
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
382
382
  header_params: header_params,
383
383
  query_params: query_params,
384
384
  form_params: form_params,
@@ -449,7 +449,7 @@ end
449
449
  #
450
450
  # --------------------------------------------------------------------------------------------------------------------
451
451
  # <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
452
- # Copyright (c) 2003-2019 Aspose Pty Ltd
452
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
453
453
  # </copyright>
454
454
  # <summary>
455
455
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -510,7 +510,7 @@ end
510
510
  #
511
511
  # --------------------------------------------------------------------------------------------------------------------
512
512
  # <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
513
- # Copyright (c) 2003-2019 Aspose Pty Ltd
513
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
514
514
  # </copyright>
515
515
  # <summary>
516
516
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -563,7 +563,7 @@ end
563
563
  #
564
564
  # --------------------------------------------------------------------------------------------------------------------
565
565
  # <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
566
- # Copyright (c) 2003-2019 Aspose Pty Ltd
566
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
567
567
  # </copyright>
568
568
  # <summary>
569
569
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -616,7 +616,7 @@ end
616
616
  #
617
617
  # --------------------------------------------------------------------------------------------------------------------
618
618
  # <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
619
- # Copyright (c) 2003-2019 Aspose Pty Ltd
619
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
620
620
  # </copyright>
621
621
  # <summary>
622
622
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -677,7 +677,7 @@ end
677
677
  #
678
678
  # --------------------------------------------------------------------------------------------------------------------
679
679
  # <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
680
- # Copyright (c) 2003-2019 Aspose Pty Ltd
680
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
681
681
  # </copyright>
682
682
  # <summary>
683
683
  # 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="folder.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2020 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 GroupDocsViewerCloud
174
174
 
175
175
  # http body (model)
176
176
  post_body = nil
177
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
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-2019 Aspose Pty Ltd
433
+ # Copyright (c) 2003-2020 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-2019 Aspose Pty Ltd
490
+ # Copyright (c) 2003-2020 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-2019 Aspose Pty Ltd
539
+ # Copyright (c) 2003-2020 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-2019 Aspose Pty Ltd
592
+ # Copyright (c) 2003-2020 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-2019 Aspose Pty Ltd
641
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
642
642
  # </copyright>
643
643
  # <summary>
644
644
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -0,0 +1,266 @@
1
+ # -----------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="info.rb">
3
+ # Copyright (c) 2003-2020 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-2020 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