groupdocs_platform_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.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +160 -0
- data/Ruby Mustache Templates/ReadMe.txt +1 -0
- data/Ruby Mustache Templates/api_client.mustache +441 -0
- data/Swagger Specs File/platform.json +1683 -0
- data/groupdocs_platform_cloud.gemspec +26 -0
- data/lib/groupdocs_platform_cloud.rb +72 -0
- data/lib/groupdocs_platform_cloud/api/app_api.rb +359 -0
- data/lib/groupdocs_platform_cloud/api/app_statistics_api.rb +572 -0
- data/lib/groupdocs_platform_cloud/api/auth_api.rb +176 -0
- data/lib/groupdocs_platform_cloud/api/file_api.rb +282 -0
- data/lib/groupdocs_platform_cloud/api/folder_api.rb +267 -0
- data/lib/groupdocs_platform_cloud/api/heroku_api.rb +241 -0
- data/lib/groupdocs_platform_cloud/api/storage_api.rb +249 -0
- data/lib/groupdocs_platform_cloud/api/usage_api.rb +233 -0
- data/lib/groupdocs_platform_cloud/api_client.rb +446 -0
- data/lib/groupdocs_platform_cloud/api_error.rb +38 -0
- data/lib/groupdocs_platform_cloud/configuration.rb +216 -0
- data/lib/groupdocs_platform_cloud/groupdocs_app.rb +20 -0
- data/lib/groupdocs_platform_cloud/models/access_token_list_response.rb +213 -0
- data/lib/groupdocs_platform_cloud/models/access_token_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/app.rb +243 -0
- data/lib/groupdocs_platform_cloud/models/app_usage.rb +235 -0
- data/lib/groupdocs_platform_cloud/models/application_usage_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/disc_usage.rb +207 -0
- data/lib/groupdocs_platform_cloud/models/disc_usage_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/file.rb +253 -0
- data/lib/groupdocs_platform_cloud/models/file_exist.rb +207 -0
- data/lib/groupdocs_platform_cloud/models/file_exist_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/file_response.rb +224 -0
- data/lib/groupdocs_platform_cloud/models/file_version.rb +276 -0
- data/lib/groupdocs_platform_cloud/models/file_versions_response.rb +213 -0
- data/lib/groupdocs_platform_cloud/models/folder_response.rb +208 -0
- data/lib/groupdocs_platform_cloud/models/heroku_request.rb +233 -0
- data/lib/groupdocs_platform_cloud/models/heroku_request_options.rb +188 -0
- data/lib/groupdocs_platform_cloud/models/move_file_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/move_folder_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/remove_file_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/remove_folder_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/saa_spose_response.rb +202 -0
- data/lib/groupdocs_platform_cloud/models/storage_exist_response.rb +216 -0
- data/lib/groupdocs_platform_cloud/models/user_usage_summary_response.rb +211 -0
- data/lib/groupdocs_platform_cloud/models/user_usage_summary_statistics.rb +291 -0
- data/lib/groupdocs_platform_cloud/version.rb +15 -0
- data/test/data/SampleExecuteTemplate.doc +0 -0
- data/test/data/SampleExecuteTemplateData.txt +49 -0
- data/test/data/SampleWordDocument.docx +0 -0
- data/test/data/buzz.png +0 -0
- data/test/data/testfile.txt +1 -0
- data/test/platform_tests.rb +144 -0
- metadata +156 -0
@@ -0,0 +1,176 @@
|
|
1
|
+
=begin
|
2
|
+
#Web API Swagger specification
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module GroupDocsPlatformCloud
|
16
|
+
class AuthApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Delete access token
|
24
|
+
#
|
25
|
+
# @param token Access Token
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [File]
|
28
|
+
def auth_delete_token(token, opts = {})
|
29
|
+
data, _status_code, _headers = auth_delete_token_with_http_info(token, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Delete access token
|
34
|
+
#
|
35
|
+
# @param token Access Token
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
38
|
+
def auth_delete_token_with_http_info(token, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: AuthApi.auth_delete_token ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'token' is set
|
43
|
+
if @api_client.config.client_side_validation && token.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AuthApi.auth_delete_token"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/auth/token/{token}".sub('{' + 'token' + '}', token.to_s)
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
64
|
+
auth_names = []
|
65
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'File')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: AuthApi#auth_delete_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Get access tokens
|
79
|
+
#
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [AccessTokenListResponse]
|
82
|
+
def auth_get_tokens(opts = {})
|
83
|
+
data, _status_code, _headers = auth_get_tokens_with_http_info(opts)
|
84
|
+
return data
|
85
|
+
end
|
86
|
+
|
87
|
+
# Get access tokens
|
88
|
+
#
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [Array<(AccessTokenListResponse, Fixnum, Hash)>] AccessTokenListResponse data, response status code and response headers
|
91
|
+
def auth_get_tokens_with_http_info(opts = {})
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug "Calling API: AuthApi.auth_get_tokens ..."
|
94
|
+
end
|
95
|
+
# resource path
|
96
|
+
local_var_path = "/auth/token"
|
97
|
+
|
98
|
+
# query parameters
|
99
|
+
query_params = {}
|
100
|
+
|
101
|
+
# header parameters
|
102
|
+
header_params = {}
|
103
|
+
# HTTP header 'Accept' (if needed)
|
104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
105
|
+
# HTTP header 'Content-Type'
|
106
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
107
|
+
|
108
|
+
# form parameters
|
109
|
+
form_params = {}
|
110
|
+
|
111
|
+
# http body (model)
|
112
|
+
post_body = nil
|
113
|
+
auth_names = []
|
114
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
115
|
+
:header_params => header_params,
|
116
|
+
:query_params => query_params,
|
117
|
+
:form_params => form_params,
|
118
|
+
:body => post_body,
|
119
|
+
:auth_names => auth_names,
|
120
|
+
:return_type => 'AccessTokenListResponse')
|
121
|
+
if @api_client.config.debugging
|
122
|
+
@api_client.config.logger.debug "API called: AuthApi#auth_get_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
123
|
+
end
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
|
127
|
+
# Create access token
|
128
|
+
#
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @return [AccessTokenResponse]
|
131
|
+
def auth_post_token(opts = {})
|
132
|
+
data, _status_code, _headers = auth_post_token_with_http_info(opts)
|
133
|
+
return data
|
134
|
+
end
|
135
|
+
|
136
|
+
# Create access token
|
137
|
+
#
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @return [Array<(AccessTokenResponse, Fixnum, Hash)>] AccessTokenResponse data, response status code and response headers
|
140
|
+
def auth_post_token_with_http_info(opts = {})
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug "Calling API: AuthApi.auth_post_token ..."
|
143
|
+
end
|
144
|
+
# resource path
|
145
|
+
local_var_path = "/auth/token"
|
146
|
+
|
147
|
+
# query parameters
|
148
|
+
query_params = {}
|
149
|
+
|
150
|
+
# header parameters
|
151
|
+
header_params = {}
|
152
|
+
# HTTP header 'Accept' (if needed)
|
153
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
154
|
+
# HTTP header 'Content-Type'
|
155
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
156
|
+
|
157
|
+
# form parameters
|
158
|
+
form_params = {}
|
159
|
+
|
160
|
+
# http body (model)
|
161
|
+
post_body = nil
|
162
|
+
auth_names = []
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
164
|
+
:header_params => header_params,
|
165
|
+
:query_params => query_params,
|
166
|
+
:form_params => form_params,
|
167
|
+
:body => post_body,
|
168
|
+
:auth_names => auth_names,
|
169
|
+
:return_type => 'AccessTokenResponse')
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug "API called: AuthApi#auth_post_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
172
|
+
end
|
173
|
+
return data, status_code, headers
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
@@ -0,0 +1,282 @@
|
|
1
|
+
=begin
|
2
|
+
#Web API Swagger specification
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module GroupDocsPlatformCloud
|
16
|
+
class FileApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Remove a specific file. Parameters: path - file path e.g. /file.ext, versionID - file's version, storage - user's storage name.
|
24
|
+
#
|
25
|
+
# @param path
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :version_id
|
28
|
+
# @option opts [String] :storage
|
29
|
+
# @return [RemoveFileResponse]
|
30
|
+
def file_delete_file(path, opts = {})
|
31
|
+
data, _status_code, _headers = file_delete_file_with_http_info(path, opts)
|
32
|
+
return data
|
33
|
+
end
|
34
|
+
|
35
|
+
# Remove a specific file. Parameters: path - file path e.g. /file.ext, versionID - file's version, storage - user's storage name.
|
36
|
+
#
|
37
|
+
# @param path
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :version_id
|
40
|
+
# @option opts [String] :storage
|
41
|
+
# @return [Array<(RemoveFileResponse, Fixnum, Hash)>] RemoveFileResponse data, response status code and response headers
|
42
|
+
def file_delete_file_with_http_info(path, opts = {})
|
43
|
+
if @api_client.config.debugging
|
44
|
+
@api_client.config.logger.debug "Calling API: FileApi.file_delete_file ..."
|
45
|
+
end
|
46
|
+
# verify the required parameter 'path' is set
|
47
|
+
if @api_client.config.client_side_validation && path.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling FileApi.file_delete_file"
|
49
|
+
end
|
50
|
+
# resource path
|
51
|
+
local_var_path = "/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = {}
|
55
|
+
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
56
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = nil
|
70
|
+
auth_names = []
|
71
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => 'RemoveFileResponse')
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: FileApi#file_delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Download a specific file. Parameters: path - file path e.g. /file.ext, versionID - file's version, storage - user's storage name.
|
85
|
+
#
|
86
|
+
# @param path
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [String] :version_id
|
89
|
+
# @option opts [String] :storage
|
90
|
+
# @return [File]
|
91
|
+
def file_get_download(path, opts = {})
|
92
|
+
data, _status_code, _headers = file_get_download_with_http_info(path, opts)
|
93
|
+
return data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Download a specific file. Parameters: path - file path e.g. /file.ext, versionID - file's version, storage - user's storage name.
|
97
|
+
#
|
98
|
+
# @param path
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @option opts [String] :version_id
|
101
|
+
# @option opts [String] :storage
|
102
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
103
|
+
def file_get_download_with_http_info(path, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug "Calling API: FileApi.file_get_download ..."
|
106
|
+
end
|
107
|
+
# verify the required parameter 'path' is set
|
108
|
+
if @api_client.config.client_side_validation && path.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling FileApi.file_get_download"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = "/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = {}
|
116
|
+
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
117
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = {}
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
|
+
# HTTP header 'Content-Type'
|
124
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
125
|
+
|
126
|
+
# form parameters
|
127
|
+
form_params = {}
|
128
|
+
|
129
|
+
# http body (model)
|
130
|
+
post_body = nil
|
131
|
+
auth_names = []
|
132
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => 'File')
|
139
|
+
if @api_client.config.debugging
|
140
|
+
@api_client.config.logger.debug "API called: FileApi#file_get_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
end
|
142
|
+
return data, status_code, headers
|
143
|
+
end
|
144
|
+
|
145
|
+
# Move a specific file.
|
146
|
+
#
|
147
|
+
# @param path source file path e.g. /file.ext
|
148
|
+
# @param dest
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @option opts [String] :version_id source file's version,
|
151
|
+
# @option opts [String] :storage user's source storage name
|
152
|
+
# @option opts [String] :dest_storage user's destination storage name
|
153
|
+
# @return [MoveFileResponse]
|
154
|
+
def file_post_move_file(path, dest, opts = {})
|
155
|
+
data, _status_code, _headers = file_post_move_file_with_http_info(path, dest, opts)
|
156
|
+
return data
|
157
|
+
end
|
158
|
+
|
159
|
+
# Move a specific file.
|
160
|
+
#
|
161
|
+
# @param path source file path e.g. /file.ext
|
162
|
+
# @param dest
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @option opts [String] :version_id source file's version,
|
165
|
+
# @option opts [String] :storage user's source storage name
|
166
|
+
# @option opts [String] :dest_storage user's destination storage name
|
167
|
+
# @return [Array<(MoveFileResponse, Fixnum, Hash)>] MoveFileResponse data, response status code and response headers
|
168
|
+
def file_post_move_file_with_http_info(path, dest, opts = {})
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug "Calling API: FileApi.file_post_move_file ..."
|
171
|
+
end
|
172
|
+
# verify the required parameter 'path' is set
|
173
|
+
if @api_client.config.client_side_validation && path.nil?
|
174
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling FileApi.file_post_move_file"
|
175
|
+
end
|
176
|
+
# verify the required parameter 'dest' is set
|
177
|
+
if @api_client.config.client_side_validation && dest.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'dest' when calling FileApi.file_post_move_file"
|
179
|
+
end
|
180
|
+
# resource path
|
181
|
+
local_var_path = "/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)
|
182
|
+
|
183
|
+
# query parameters
|
184
|
+
query_params = {}
|
185
|
+
query_params[:'dest'] = dest
|
186
|
+
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
187
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
188
|
+
query_params[:'destStorage'] = opts[:'dest_storage'] if !opts[:'dest_storage'].nil?
|
189
|
+
|
190
|
+
# header parameters
|
191
|
+
header_params = {}
|
192
|
+
# HTTP header 'Accept' (if needed)
|
193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
194
|
+
|
195
|
+
# form parameters
|
196
|
+
form_params = {}
|
197
|
+
|
198
|
+
# http body (model)
|
199
|
+
post_body = nil
|
200
|
+
auth_names = []
|
201
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => 'MoveFileResponse')
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug "API called: FileApi#file_post_move_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
210
|
+
end
|
211
|
+
return data, status_code, headers
|
212
|
+
end
|
213
|
+
|
214
|
+
# Upload a specific file. Parameters: path - source file path e.g. /file.ext, versionID - source file's version, storage - user's source storage name, newdest - destination file path, destStorage - user's destination storage name.
|
215
|
+
#
|
216
|
+
# @param path
|
217
|
+
# @param file file to upload
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @option opts [String] :version_id
|
220
|
+
# @option opts [String] :storage
|
221
|
+
# @return [SaaSposeResponse]
|
222
|
+
def file_put_create(path, file, opts = {})
|
223
|
+
data, _status_code, _headers = file_put_create_with_http_info(path, file, opts)
|
224
|
+
return data
|
225
|
+
end
|
226
|
+
|
227
|
+
# Upload a specific file. Parameters: path - source file path e.g. /file.ext, versionID - source file's version, storage - user's source storage name, newdest - destination file path, destStorage - user's destination storage name.
|
228
|
+
#
|
229
|
+
# @param path
|
230
|
+
# @param file file to upload
|
231
|
+
# @param [Hash] opts the optional parameters
|
232
|
+
# @option opts [String] :version_id
|
233
|
+
# @option opts [String] :storage
|
234
|
+
# @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers
|
235
|
+
def file_put_create_with_http_info(path, file, opts = {})
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug "Calling API: FileApi.file_put_create ..."
|
238
|
+
end
|
239
|
+
# verify the required parameter 'path' is set
|
240
|
+
if @api_client.config.client_side_validation && path.nil?
|
241
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling FileApi.file_put_create"
|
242
|
+
end
|
243
|
+
# verify the required parameter 'file' is set
|
244
|
+
if @api_client.config.client_side_validation && file.nil?
|
245
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling FileApi.file_put_create"
|
246
|
+
end
|
247
|
+
# resource path
|
248
|
+
local_var_path = "/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)
|
249
|
+
|
250
|
+
# query parameters
|
251
|
+
query_params = {}
|
252
|
+
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
253
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
254
|
+
|
255
|
+
# header parameters
|
256
|
+
header_params = {}
|
257
|
+
# HTTP header 'Accept' (if needed)
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
259
|
+
# HTTP header 'Content-Type'
|
260
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
261
|
+
|
262
|
+
# form parameters
|
263
|
+
form_params = {}
|
264
|
+
form_params["file"] = file
|
265
|
+
|
266
|
+
# http body (model)
|
267
|
+
post_body = nil
|
268
|
+
auth_names = []
|
269
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
270
|
+
:header_params => header_params,
|
271
|
+
:query_params => query_params,
|
272
|
+
:form_params => form_params,
|
273
|
+
:body => post_body,
|
274
|
+
:auth_names => auth_names,
|
275
|
+
:return_type => 'SaaSposeResponse')
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: FileApi#file_put_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|