files.com 1.0.68 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/lib/files.com/models/api_key.rb +3 -0
- data/lib/files.com/models/as2_key.rb +3 -0
- data/lib/files.com/models/automation.rb +3 -0
- data/lib/files.com/models/behavior.rb +6 -0
- data/lib/files.com/models/bundle.rb +3 -0
- data/lib/files.com/models/dns_record.rb +3 -0
- data/lib/files.com/models/file.rb +2 -1
- data/lib/files.com/models/file_comment.rb +3 -0
- data/lib/files.com/models/group.rb +3 -0
- data/lib/files.com/models/group_user.rb +3 -0
- data/lib/files.com/models/history.rb +15 -0
- data/lib/files.com/models/history_export.rb +3 -0
- data/lib/files.com/models/invoice.rb +3 -0
- data/lib/files.com/models/ip_address.rb +3 -0
- data/lib/files.com/models/lock.rb +3 -0
- data/lib/files.com/models/message.rb +3 -0
- data/lib/files.com/models/message_comment.rb +3 -0
- data/lib/files.com/models/message_comment_reaction.rb +3 -0
- data/lib/files.com/models/message_reaction.rb +3 -0
- data/lib/files.com/models/notification.rb +3 -0
- data/lib/files.com/models/payment.rb +3 -0
- data/lib/files.com/models/permission.rb +3 -0
- data/lib/files.com/models/project.rb +3 -0
- data/lib/files.com/models/public_key.rb +3 -0
- data/lib/files.com/models/remote_server.rb +3 -0
- data/lib/files.com/models/request.rb +6 -0
- data/lib/files.com/models/sso_strategy.rb +3 -0
- data/lib/files.com/models/usage_daily_snapshot.rb +3 -0
- data/lib/files.com/models/usage_snapshot.rb +3 -0
- data/lib/files.com/models/user.rb +3 -0
- data/lib/files.com/models/user_cipher_use.rb +3 -0
- data/spec/spec_helper.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92bc2a48485c1f4af384377249f940a839e5c1ca5419b23640e945542cae6f53
|
4
|
+
data.tar.gz: f23324d9e1d2247cd7d99e5afb60fb610de45917c1b1ed3fb1b8348356a364f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 031e3eed8b890eb4aea440ecffba73d0cb164d14aceb512abe6063c2b4fa21df4845caca2969a75362f20c004a82098680124ab66490b31248aa5bb13404fe94
|
7
|
+
data.tar.gz: 5a9528a715332472ac147632fa127cad76c59bcd72b557735eb122b289fb9ca5c1879328afba61ca87370cbcec9c3b2771c6e96f47f1db10e364cf0660baa01f
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.69
|
@@ -147,6 +147,9 @@ module Files
|
|
147
147
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
148
148
|
|
149
149
|
response, options = Api.send_request("/api_keys", :get, params, options)
|
150
|
+
response.data.map do |entity_data|
|
151
|
+
ApiKey.new(entity_data, options)
|
152
|
+
end
|
150
153
|
end
|
151
154
|
|
152
155
|
def self.all(params = {}, options = {})
|
@@ -108,6 +108,9 @@ module Files
|
|
108
108
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
109
109
|
|
110
110
|
response, options = Api.send_request("/as2_keys", :get, params, options)
|
111
|
+
response.data.map do |entity_data|
|
112
|
+
As2Key.new(entity_data, options)
|
113
|
+
end
|
111
114
|
end
|
112
115
|
|
113
116
|
def self.all(params = {}, options = {})
|
@@ -191,6 +191,9 @@ module Files
|
|
191
191
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if params.dig(:automation) and !params.dig(:automation).is_a?(String)
|
192
192
|
|
193
193
|
response, options = Api.send_request("/automations", :get, params, options)
|
194
|
+
response.data.map do |entity_data|
|
195
|
+
Automation.new(entity_data, options)
|
196
|
+
end
|
194
197
|
end
|
195
198
|
|
196
199
|
def self.all(params = {}, options = {})
|
@@ -112,6 +112,9 @@ module Files
|
|
112
112
|
raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
|
113
113
|
|
114
114
|
response, options = Api.send_request("/behaviors", :get, params, options)
|
115
|
+
response.data.map do |entity_data|
|
116
|
+
Behavior.new(entity_data, options)
|
117
|
+
end
|
115
118
|
end
|
116
119
|
|
117
120
|
def self.all(params = {}, options = {})
|
@@ -137,6 +140,9 @@ module Files
|
|
137
140
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
138
141
|
|
139
142
|
response, options = Api.send_request("/behaviors/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
|
143
|
+
response.data.map do |entity_data|
|
144
|
+
Behavior.new(entity_data, options)
|
145
|
+
end
|
140
146
|
end
|
141
147
|
|
142
148
|
# Parameters:
|
@@ -197,6 +197,9 @@ module Files
|
|
197
197
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
198
198
|
|
199
199
|
response, options = Api.send_request("/bundles", :get, params, options)
|
200
|
+
response.data.map do |entity_data|
|
201
|
+
Bundle.new(entity_data, options)
|
202
|
+
end
|
200
203
|
end
|
201
204
|
|
202
205
|
def self.all(params = {}, options = {})
|
@@ -39,6 +39,9 @@ module Files
|
|
39
39
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
40
40
|
|
41
41
|
response, options = Api.send_request("/dns_records", :get, params, options)
|
42
|
+
response.data.map do |entity_data|
|
43
|
+
DnsRecord.new(entity_data, options)
|
44
|
+
end
|
42
45
|
end
|
43
46
|
|
44
47
|
def self.all(params = {}, options = {})
|
@@ -151,7 +151,8 @@ module Files
|
|
151
151
|
etags ||= []
|
152
152
|
bytes_written = 0
|
153
153
|
loop do
|
154
|
-
|
154
|
+
begin_upload = FileAction.begin_upload(path, { ref: upload&.ref, part: (upload&.part_number || 0) + 1 }, options)
|
155
|
+
upload = begin_upload.is_a?(Enumerable) ? begin_upload.first : begin_upload
|
155
156
|
buf = io.read(upload.partsize) || ""
|
156
157
|
bytes_written += buf.length
|
157
158
|
method = upload.http_method.downcase.to_sym
|
@@ -97,6 +97,9 @@ module Files
|
|
97
97
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
98
98
|
|
99
99
|
response, options = Api.send_request("/file_comments/files/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
|
100
|
+
response.data.map do |entity_data|
|
101
|
+
FileComment.new(entity_data, options)
|
102
|
+
end
|
100
103
|
end
|
101
104
|
|
102
105
|
# Parameters:
|
@@ -117,6 +117,9 @@ module Files
|
|
117
117
|
raise InvalidParameterError.new("Bad parameter: ids must be an String") if params.dig(:ids) and !params.dig(:ids).is_a?(String)
|
118
118
|
|
119
119
|
response, options = Api.send_request("/groups", :get, params, options)
|
120
|
+
response.data.map do |entity_data|
|
121
|
+
Group.new(entity_data, options)
|
122
|
+
end
|
120
123
|
end
|
121
124
|
|
122
125
|
def self.all(params = {}, options = {})
|
@@ -113,6 +113,9 @@ module Files
|
|
113
113
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
|
114
114
|
|
115
115
|
response, options = Api.send_request("/group_users", :get, params, options)
|
116
|
+
response.data.map do |entity_data|
|
117
|
+
GroupUser.new(entity_data, options)
|
118
|
+
end
|
116
119
|
end
|
117
120
|
|
118
121
|
def self.all(params = {}, options = {})
|
@@ -95,6 +95,9 @@ module Files
|
|
95
95
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
96
96
|
|
97
97
|
response, options = Api.send_request("/history/files(/*path)", :get, params, options)
|
98
|
+
response.data.map do |entity_data|
|
99
|
+
Action.new(entity_data, options)
|
100
|
+
end
|
98
101
|
end
|
99
102
|
|
100
103
|
# Parameters:
|
@@ -118,6 +121,9 @@ module Files
|
|
118
121
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
119
122
|
|
120
123
|
response, options = Api.send_request("/history/folders(/*path)", :get, params, options)
|
124
|
+
response.data.map do |entity_data|
|
125
|
+
Action.new(entity_data, options)
|
126
|
+
end
|
121
127
|
end
|
122
128
|
|
123
129
|
# Parameters:
|
@@ -141,6 +147,9 @@ module Files
|
|
141
147
|
raise MissingParameterError.new("Parameter missing: user_id") unless params.dig(:user_id)
|
142
148
|
|
143
149
|
response, options = Api.send_request("/history/users/#{params[:user_id]}", :get, params, options)
|
150
|
+
response.data.map do |entity_data|
|
151
|
+
Action.new(entity_data, options)
|
152
|
+
end
|
144
153
|
end
|
145
154
|
|
146
155
|
# Parameters:
|
@@ -159,6 +168,9 @@ module Files
|
|
159
168
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
160
169
|
|
161
170
|
response, options = Api.send_request("/history/login", :get, params, options)
|
171
|
+
response.data.map do |entity_data|
|
172
|
+
Action.new(entity_data, options)
|
173
|
+
end
|
162
174
|
end
|
163
175
|
|
164
176
|
# Parameters:
|
@@ -177,6 +189,9 @@ module Files
|
|
177
189
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
178
190
|
|
179
191
|
response, options = Api.send_request("/history", :get, params, options)
|
192
|
+
response.data.map do |entity_data|
|
193
|
+
Action.new(entity_data, options)
|
194
|
+
end
|
180
195
|
end
|
181
196
|
|
182
197
|
def self.all(params = {}, options = {})
|
@@ -260,6 +260,9 @@ module Files
|
|
260
260
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
261
261
|
|
262
262
|
response, options = Api.send_request("/history_exports", :get, params, options)
|
263
|
+
response.data.map do |entity_data|
|
264
|
+
HistoryExport.new(entity_data, options)
|
265
|
+
end
|
263
266
|
end
|
264
267
|
|
265
268
|
def self.all(params = {}, options = {})
|
@@ -89,6 +89,9 @@ module Files
|
|
89
89
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
90
90
|
|
91
91
|
response, options = Api.send_request("/invoices", :get, params, options)
|
92
|
+
response.data.map do |entity_data|
|
93
|
+
AccountLineItem.new(entity_data, options)
|
94
|
+
end
|
92
95
|
end
|
93
96
|
|
94
97
|
def self.all(params = {}, options = {})
|
@@ -39,6 +39,9 @@ module Files
|
|
39
39
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
40
40
|
|
41
41
|
response, options = Api.send_request("/ip_addresses", :get, params, options)
|
42
|
+
response.data.map do |entity_data|
|
43
|
+
IpAddress.new(entity_data, options)
|
44
|
+
end
|
42
45
|
end
|
43
46
|
|
44
47
|
def self.all(params = {}, options = {})
|
@@ -133,6 +133,9 @@ module Files
|
|
133
133
|
raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
|
134
134
|
|
135
135
|
response, options = Api.send_request("/locks/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
|
136
|
+
response.data.map do |entity_data|
|
137
|
+
Lock.new(entity_data, options)
|
138
|
+
end
|
136
139
|
end
|
137
140
|
|
138
141
|
# Parameters:
|
@@ -121,6 +121,9 @@ module Files
|
|
121
121
|
raise MissingParameterError.new("Parameter missing: project_id") unless params.dig(:project_id)
|
122
122
|
|
123
123
|
response, options = Api.send_request("/messages", :get, params, options)
|
124
|
+
response.data.map do |entity_data|
|
125
|
+
Message.new(entity_data, options)
|
126
|
+
end
|
124
127
|
end
|
125
128
|
|
126
129
|
def self.all(params = {}, options = {})
|
@@ -97,6 +97,9 @@ module Files
|
|
97
97
|
raise MissingParameterError.new("Parameter missing: message_id") unless params.dig(:message_id)
|
98
98
|
|
99
99
|
response, options = Api.send_request("/message_comments", :get, params, options)
|
100
|
+
response.data.map do |entity_data|
|
101
|
+
MessageComment.new(entity_data, options)
|
102
|
+
end
|
100
103
|
end
|
101
104
|
|
102
105
|
def self.all(params = {}, options = {})
|
@@ -74,6 +74,9 @@ module Files
|
|
74
74
|
raise MissingParameterError.new("Parameter missing: message_comment_id") unless params.dig(:message_comment_id)
|
75
75
|
|
76
76
|
response, options = Api.send_request("/message_comment_reactions", :get, params, options)
|
77
|
+
response.data.map do |entity_data|
|
78
|
+
MessageCommentReaction.new(entity_data, options)
|
79
|
+
end
|
77
80
|
end
|
78
81
|
|
79
82
|
def self.all(params = {}, options = {})
|
@@ -74,6 +74,9 @@ module Files
|
|
74
74
|
raise MissingParameterError.new("Parameter missing: message_id") unless params.dig(:message_id)
|
75
75
|
|
76
76
|
response, options = Api.send_request("/message_reactions", :get, params, options)
|
77
|
+
response.data.map do |entity_data|
|
78
|
+
MessageReaction.new(entity_data, options)
|
79
|
+
end
|
77
80
|
end
|
78
81
|
|
79
82
|
def self.all(params = {}, options = {})
|
@@ -172,6 +172,9 @@ module Files
|
|
172
172
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
173
173
|
|
174
174
|
response, options = Api.send_request("/notifications", :get, params, options)
|
175
|
+
response.data.map do |entity_data|
|
176
|
+
Notification.new(entity_data, options)
|
177
|
+
end
|
175
178
|
end
|
176
179
|
|
177
180
|
def self.all(params = {}, options = {})
|
@@ -89,6 +89,9 @@ module Files
|
|
89
89
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
90
90
|
|
91
91
|
response, options = Api.send_request("/payments", :get, params, options)
|
92
|
+
response.data.map do |entity_data|
|
93
|
+
AccountLineItem.new(entity_data, options)
|
94
|
+
end
|
92
95
|
end
|
93
96
|
|
94
97
|
def self.all(params = {}, options = {})
|
@@ -109,6 +109,9 @@ module Files
|
|
109
109
|
raise InvalidParameterError.new("Bad parameter: user_id must be an String") if params.dig(:user_id) and !params.dig(:user_id).is_a?(String)
|
110
110
|
|
111
111
|
response, options = Api.send_request("/permissions", :get, params, options)
|
112
|
+
response.data.map do |entity_data|
|
113
|
+
Permission.new(entity_data, options)
|
114
|
+
end
|
112
115
|
end
|
113
116
|
|
114
117
|
def self.all(path, params = {}, options = {})
|
@@ -74,6 +74,9 @@ module Files
|
|
74
74
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
75
75
|
|
76
76
|
response, options = Api.send_request("/projects", :get, params, options)
|
77
|
+
response.data.map do |entity_data|
|
78
|
+
Project.new(entity_data, options)
|
79
|
+
end
|
77
80
|
end
|
78
81
|
|
79
82
|
def self.all(params = {}, options = {})
|
@@ -108,6 +108,9 @@ module Files
|
|
108
108
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
109
109
|
|
110
110
|
response, options = Api.send_request("/public_keys", :get, params, options)
|
111
|
+
response.data.map do |entity_data|
|
112
|
+
PublicKey.new(entity_data, options)
|
113
|
+
end
|
111
114
|
end
|
112
115
|
|
113
116
|
def self.all(params = {}, options = {})
|
@@ -357,6 +357,9 @@ module Files
|
|
357
357
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
358
358
|
|
359
359
|
response, options = Api.send_request("/remote_servers", :get, params, options)
|
360
|
+
response.data.map do |entity_data|
|
361
|
+
RemoteServer.new(entity_data, options)
|
362
|
+
end
|
360
363
|
end
|
361
364
|
|
362
365
|
def self.all(params = {}, options = {})
|
@@ -124,6 +124,9 @@ module Files
|
|
124
124
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
125
125
|
|
126
126
|
response, options = Api.send_request("/requests", :get, params, options)
|
127
|
+
response.data.map do |entity_data|
|
128
|
+
Request.new(entity_data, options)
|
129
|
+
end
|
127
130
|
end
|
128
131
|
|
129
132
|
def self.all(path, params = {}, options = {})
|
@@ -146,6 +149,9 @@ module Files
|
|
146
149
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
147
150
|
|
148
151
|
response, options = Api.send_request("/requests/folders/#{Addressable::URI.encode_component(params[:path])}", :get, params, options)
|
152
|
+
response.data.map do |entity_data|
|
153
|
+
Request.new(entity_data, options)
|
154
|
+
end
|
149
155
|
end
|
150
156
|
|
151
157
|
# Parameters:
|
@@ -199,6 +199,9 @@ module Files
|
|
199
199
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
200
200
|
|
201
201
|
response, options = Api.send_request("/sso_strategies", :get, params, options)
|
202
|
+
response.data.map do |entity_data|
|
203
|
+
SsoStrategy.new(entity_data, options)
|
204
|
+
end
|
202
205
|
end
|
203
206
|
|
204
207
|
def self.all(params = {}, options = {})
|
@@ -39,6 +39,9 @@ module Files
|
|
39
39
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
40
40
|
|
41
41
|
response, options = Api.send_request("/usage_daily_snapshots", :get, params, options)
|
42
|
+
response.data.map do |entity_data|
|
43
|
+
UsageDailySnapshot.new(entity_data, options)
|
44
|
+
end
|
42
45
|
end
|
43
46
|
|
44
47
|
def self.all(params = {}, options = {})
|
@@ -84,6 +84,9 @@ module Files
|
|
84
84
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
85
85
|
|
86
86
|
response, options = Api.send_request("/usage_snapshots", :get, params, options)
|
87
|
+
response.data.map do |entity_data|
|
88
|
+
UsageSnapshot.new(entity_data, options)
|
89
|
+
end
|
87
90
|
end
|
88
91
|
|
89
92
|
def self.all(params = {}, options = {})
|
@@ -621,6 +621,9 @@ module Files
|
|
621
621
|
raise InvalidParameterError.new("Bad parameter: search must be an String") if params.dig(:search) and !params.dig(:search).is_a?(String)
|
622
622
|
|
623
623
|
response, options = Api.send_request("/users", :get, params, options)
|
624
|
+
response.data.map do |entity_data|
|
625
|
+
User.new(entity_data, options)
|
626
|
+
end
|
624
627
|
end
|
625
628
|
|
626
629
|
def self.all(params = {}, options = {})
|
@@ -51,6 +51,9 @@ module Files
|
|
51
51
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
52
52
|
|
53
53
|
response, options = Api.send_request("/user_cipher_uses", :get, params, options)
|
54
|
+
response.data.map do |entity_data|
|
55
|
+
UserCipherUse.new(entity_data, options)
|
56
|
+
end
|
54
57
|
end
|
55
58
|
|
56
59
|
def self.all(params = {}, options = {})
|
data/spec/spec_helper.rb
CHANGED
@@ -27,6 +27,7 @@ RSpec.configure do |config|
|
|
27
27
|
Files::Folder.mkdir("files_regional_worker", {}, api_key: @api_key) unless Files::Folder.exist?("files_regional_worker", api_key: @api_key)
|
28
28
|
Files::Folder.mkdir(@test_folder.to_s, {}, api_key: @api_key)
|
29
29
|
all.run
|
30
|
+
ensure
|
30
31
|
Files::Folder.delete(@test_folder.to_s, { recursive: true }, api_key: @api_key)
|
31
32
|
end
|
32
33
|
|