aspose_html_cloud 19.5.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/lib/aspose_html_cloud.rb +63 -0
- data/lib/aspose_html_cloud/api/html_api.rb +2478 -0
- data/lib/aspose_html_cloud/api/storage_api.rb +859 -0
- data/lib/aspose_html_cloud/api_client.rb +393 -0
- data/lib/aspose_html_cloud/api_error.rb +54 -0
- data/lib/aspose_html_cloud/configuration.rb +177 -0
- data/lib/aspose_html_cloud/models/base_model.rb +145 -0
- data/lib/aspose_html_cloud/models/disc_usage.rb +113 -0
- data/lib/aspose_html_cloud/models/error.rb +122 -0
- data/lib/aspose_html_cloud/models/error_details.rb +107 -0
- data/lib/aspose_html_cloud/models/file_version.rb +167 -0
- data/lib/aspose_html_cloud/models/file_versions.rb +94 -0
- data/lib/aspose_html_cloud/models/files_list.rb +94 -0
- data/lib/aspose_html_cloud/models/files_upload_result.rb +106 -0
- data/lib/aspose_html_cloud/models/object_exist.rb +111 -0
- data/lib/aspose_html_cloud/models/storage_exist.rb +96 -0
- data/lib/aspose_html_cloud/models/storage_file.rb +135 -0
- data/lib/aspose_html_cloud/version.rb +31 -0
- data/spec/api/html_api_spec.rb +2612 -0
- data/spec/api/model_spec.rb +430 -0
- data/spec/api/storage_api_spec.rb +542 -0
- data/spec/spec_helper.rb +165 -0
- metadata +249 -0
@@ -0,0 +1,167 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin
|
3
|
+
--------------------------------------------------------------------------------------------------------------------
|
4
|
+
<copyright company="Aspose" file="file_version.rb">
|
5
|
+
</copyright>
|
6
|
+
Copyright (c) 2019 Aspose.HTML for Cloud
|
7
|
+
<summary>
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
10
|
+
in the Software without restriction, including without limitation the rights
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
13
|
+
furnished to do so, subject to the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
16
|
+
copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
24
|
+
SOFTWARE.
|
25
|
+
</summary>
|
26
|
+
--------------------------------------------------------------------------------------------------------------------
|
27
|
+
=end
|
28
|
+
|
29
|
+
require_relative 'base_model'
|
30
|
+
|
31
|
+
module AsposeHtml
|
32
|
+
# File Version
|
33
|
+
class FileVersion < BaseModel
|
34
|
+
# File or folder name.
|
35
|
+
attr_accessor :name
|
36
|
+
|
37
|
+
# True if it is a folder.
|
38
|
+
attr_accessor :is_folder
|
39
|
+
|
40
|
+
# File or folder last modified DateTime.
|
41
|
+
attr_accessor :modified_date
|
42
|
+
|
43
|
+
# File or folder size.
|
44
|
+
attr_accessor :size
|
45
|
+
|
46
|
+
# File or folder path.
|
47
|
+
attr_accessor :path
|
48
|
+
|
49
|
+
# File Version ID.
|
50
|
+
attr_accessor :version_id
|
51
|
+
|
52
|
+
# Specifies whether the file is (true) or is not (false) the latest version of an file.
|
53
|
+
attr_accessor :is_latest
|
54
|
+
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
56
|
+
def self.attribute_map
|
57
|
+
{
|
58
|
+
:'name' => :'name',
|
59
|
+
:'is_folder' => :'isFolder',
|
60
|
+
:'modified_date' => :'modifiedDate',
|
61
|
+
:'size' => :'size',
|
62
|
+
:'path' => :'path',
|
63
|
+
:'version_id' => :'versionId',
|
64
|
+
:'is_latest' => :'isLatest'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.model_types
|
70
|
+
{
|
71
|
+
:'name' => :'String',
|
72
|
+
:'is_folder' => :'BOOLEAN',
|
73
|
+
:'modified_date' => :'DateTime',
|
74
|
+
:'size' => :'Integer',
|
75
|
+
:'path' => :'String',
|
76
|
+
:'version_id' => :'String',
|
77
|
+
:'is_latest' => :'BOOLEAN'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
+
|
89
|
+
if attributes.has_key?(:'name')
|
90
|
+
self.name = attributes[:'name']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'isFolder')
|
94
|
+
self.is_folder = attributes[:'isFolder']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'modifiedDate')
|
98
|
+
self.modified_date = attributes[:'modifiedDate']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'size')
|
102
|
+
self.size = attributes[:'size']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'path')
|
106
|
+
self.path = attributes[:'path']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'versionId')
|
110
|
+
self.version_id = attributes[:'versionId']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'isLatest')
|
114
|
+
self.is_latest = attributes[:'isLatest']
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
119
|
+
# @return Array for valid properties with the reasons
|
120
|
+
def list_invalid_properties
|
121
|
+
invalid_properties = Array.new
|
122
|
+
if @is_folder.nil?
|
123
|
+
invalid_properties.push('invalid value for "is_folder", is_folder cannot be nil.')
|
124
|
+
end
|
125
|
+
|
126
|
+
if @size.nil?
|
127
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
|
+
if @is_latest.nil?
|
131
|
+
invalid_properties.push('invalid value for "is_latest", is_latest cannot be nil.')
|
132
|
+
end
|
133
|
+
|
134
|
+
invalid_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Check to see if the all the properties in the model are valid
|
138
|
+
# @return true if the model is valid
|
139
|
+
def valid?
|
140
|
+
return false if @is_folder.nil?
|
141
|
+
return false if @size.nil?
|
142
|
+
return false if @is_latest.nil?
|
143
|
+
true
|
144
|
+
end
|
145
|
+
|
146
|
+
# Checks equality by comparing each attribute.
|
147
|
+
# @param [Object] Object to be compared
|
148
|
+
def ==(o)
|
149
|
+
return true if self.equal?(o)
|
150
|
+
self.class == o.class &&
|
151
|
+
name == o.name &&
|
152
|
+
is_folder == o.is_folder &&
|
153
|
+
modified_date == o.modified_date &&
|
154
|
+
size == o.size &&
|
155
|
+
path == o.path &&
|
156
|
+
version_id == o.version_id &&
|
157
|
+
is_latest == o.is_latest
|
158
|
+
end
|
159
|
+
|
160
|
+
# Calculates hash code according to all attributes.
|
161
|
+
# @return [Fixnum] Hash code
|
162
|
+
def hash
|
163
|
+
[name, is_folder, modified_date, size, path, version_id, is_latest].hash
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin
|
3
|
+
--------------------------------------------------------------------------------------------------------------------
|
4
|
+
<copyright company="Aspose" file="file_versions.rb">
|
5
|
+
</copyright>
|
6
|
+
Copyright (c) 2019 Aspose.HTML for Cloud
|
7
|
+
<summary>
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
10
|
+
in the Software without restriction, including without limitation the rights
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
13
|
+
furnished to do so, subject to the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
16
|
+
copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
24
|
+
SOFTWARE.
|
25
|
+
</summary>
|
26
|
+
--------------------------------------------------------------------------------------------------------------------
|
27
|
+
=end
|
28
|
+
|
29
|
+
require_relative 'base_model'
|
30
|
+
|
31
|
+
module AsposeHtml
|
32
|
+
# File versions FileVersion.
|
33
|
+
class FileVersions < BaseModel
|
34
|
+
# File versions FileVersion.
|
35
|
+
attr_accessor :value
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'value' => :'value'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.model_types
|
46
|
+
{
|
47
|
+
:'value' => :'Array<FileVersion>'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'value')
|
60
|
+
if (value = attributes[:'value']).is_a?(Array)
|
61
|
+
self.value = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
value == o.value
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Fixnum] Hash code
|
89
|
+
def hash
|
90
|
+
[value].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin
|
3
|
+
--------------------------------------------------------------------------------------------------------------------
|
4
|
+
<copyright company="Aspose" file="files_list.rb">
|
5
|
+
</copyright>
|
6
|
+
Copyright (c) 2019 Aspose.HTML for Cloud
|
7
|
+
<summary>
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
10
|
+
in the Software without restriction, including without limitation the rights
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
13
|
+
furnished to do so, subject to the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
16
|
+
copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
24
|
+
SOFTWARE.
|
25
|
+
</summary>
|
26
|
+
--------------------------------------------------------------------------------------------------------------------
|
27
|
+
=end
|
28
|
+
|
29
|
+
require_relative 'base_model'
|
30
|
+
|
31
|
+
module AsposeHtml
|
32
|
+
# Files list
|
33
|
+
class FilesList < BaseModel
|
34
|
+
# Files and folders contained by folder StorageFile.
|
35
|
+
attr_accessor :value
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'value' => :'value'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.model_types
|
46
|
+
{
|
47
|
+
:'value' => :'Array<StorageFile>'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'value')
|
60
|
+
if (value = attributes[:'value']).is_a?(Array)
|
61
|
+
self.value = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
value == o.value
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Fixnum] Hash code
|
89
|
+
def hash
|
90
|
+
[value].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin
|
3
|
+
--------------------------------------------------------------------------------------------------------------------
|
4
|
+
<copyright company="Aspose" file="files_upload_result.rb">
|
5
|
+
</copyright>
|
6
|
+
Copyright (c) 2019 Aspose.HTML for Cloud
|
7
|
+
<summary>
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
10
|
+
in the Software without restriction, including without limitation the rights
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
13
|
+
furnished to do so, subject to the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
16
|
+
copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
24
|
+
SOFTWARE.
|
25
|
+
</summary>
|
26
|
+
--------------------------------------------------------------------------------------------------------------------
|
27
|
+
=end
|
28
|
+
|
29
|
+
require_relative 'base_model'
|
30
|
+
|
31
|
+
module AsposeHtml
|
32
|
+
# File upload result
|
33
|
+
class FilesUploadResult < BaseModel
|
34
|
+
# List of uploaded file names
|
35
|
+
attr_accessor :uploaded
|
36
|
+
|
37
|
+
# List of errors.
|
38
|
+
attr_accessor :errors
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'uploaded' => :'uploaded',
|
44
|
+
:'errors' => :'errors'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.model_types
|
50
|
+
{
|
51
|
+
:'uploaded' => :'Array<String>',
|
52
|
+
:'errors' => :'Array<Error>'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
return unless attributes.is_a?(Hash)
|
60
|
+
|
61
|
+
# convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
|
+
|
64
|
+
if attributes.has_key?(:'uploaded')
|
65
|
+
if (value = attributes[:'uploaded']).is_a?(Array)
|
66
|
+
self.uploaded = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'errors')
|
71
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
72
|
+
self.errors = value
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param [Object] Object to be compared
|
92
|
+
def ==(o)
|
93
|
+
return true if self.equal?(o)
|
94
|
+
self.class == o.class &&
|
95
|
+
uploaded == o.uploaded &&
|
96
|
+
errors == o.errors
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Fixnum] Hash code
|
101
|
+
def hash
|
102
|
+
[uploaded, errors].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|