files.com 1.1.50 → 1.1.51
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/snapshot.md +28 -0
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/snapshot.rb +22 -0
- data/lib/files.com/version.rb +1 -1
- 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: c8bd9cc3feb73431ee538e9295167cdebb8ce110bf18ee89ef2c8b163efb881b
|
4
|
+
data.tar.gz: 858411d5c41eebb73365462ca7c4816a20a586b1270b75391fce1c7d692bd12e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9775894e1107eba82c28bda7d817ce175550dfcdfe0d085b9692a39e182485eb583798cb120918da878ad06eb10eb8f0ed21b75d338932a17bd69a4dad0e1018
|
7
|
+
data.tar.gz: 958e5c54dbdf03f378c37f88a3c99a171c954872ed54233f4a93d74e43de3881a4010c7fb4ca8003eacf4ca361303e160e2995a231fa58ff17fdbbfdee909a48
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.51
|
data/docs/snapshot.md
CHANGED
@@ -69,6 +69,19 @@ Files::Snapshot.create(
|
|
69
69
|
* `paths` (array(string)): An array of paths to add to the snapshot.
|
70
70
|
|
71
71
|
|
72
|
+
---
|
73
|
+
|
74
|
+
## Finalize Snapshot
|
75
|
+
|
76
|
+
```
|
77
|
+
Files::Snapshot.finalize(id)
|
78
|
+
```
|
79
|
+
|
80
|
+
### Parameters
|
81
|
+
|
82
|
+
* `id` (int64): Required - Snapshot ID.
|
83
|
+
|
84
|
+
|
72
85
|
---
|
73
86
|
|
74
87
|
## Update Snapshot
|
@@ -101,6 +114,21 @@ Files::Snapshot.delete(id)
|
|
101
114
|
* `id` (int64): Required - Snapshot ID.
|
102
115
|
|
103
116
|
|
117
|
+
---
|
118
|
+
|
119
|
+
## Finalize Snapshot
|
120
|
+
|
121
|
+
```
|
122
|
+
snapshot = Files::Snapshot.list.first
|
123
|
+
|
124
|
+
snapshot.finalize
|
125
|
+
```
|
126
|
+
|
127
|
+
### Parameters
|
128
|
+
|
129
|
+
* `id` (int64): Required - Snapshot ID.
|
130
|
+
|
131
|
+
|
104
132
|
---
|
105
133
|
|
106
134
|
## Update Snapshot
|
data/lib/files.com/errors.rb
CHANGED
@@ -156,6 +156,7 @@ module Files
|
|
156
156
|
class UserNotFoundError < NotFoundError; end
|
157
157
|
|
158
158
|
class ProcessingFailureError < APIError; end
|
159
|
+
class AlreadyCompletedError < ProcessingFailureError; end
|
159
160
|
class AutomationCannotBeRunManuallyError < ProcessingFailureError; end
|
160
161
|
class BundleOnlyAllowsPreviewsError < ProcessingFailureError; end
|
161
162
|
class BundleOperationRequiresSubfolderError < ProcessingFailureError; end
|
@@ -72,6 +72,17 @@ module Files
|
|
72
72
|
@attributes[:paths] = value
|
73
73
|
end
|
74
74
|
|
75
|
+
# Finalize Snapshot
|
76
|
+
def finalize(params = {})
|
77
|
+
params ||= {}
|
78
|
+
params[:id] = @attributes[:id]
|
79
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
80
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
81
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
82
|
+
|
83
|
+
Api.send_request("/snapshots/#{@attributes[:id]}/finalize", :post, params, @options)
|
84
|
+
end
|
85
|
+
|
75
86
|
# Parameters:
|
76
87
|
# expires_at - string - When the snapshot expires.
|
77
88
|
# name - string - A name for the snapshot.
|
@@ -160,6 +171,17 @@ module Files
|
|
160
171
|
Snapshot.new(response.data, options)
|
161
172
|
end
|
162
173
|
|
174
|
+
# Finalize Snapshot
|
175
|
+
def self.finalize(id, params = {}, options = {})
|
176
|
+
params ||= {}
|
177
|
+
params[:id] = id
|
178
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
179
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
180
|
+
|
181
|
+
Api.send_request("/snapshots/#{params[:id]}/finalize", :post, params, options)
|
182
|
+
nil
|
183
|
+
end
|
184
|
+
|
163
185
|
# Parameters:
|
164
186
|
# expires_at - string - When the snapshot expires.
|
165
187
|
# name - string - A name for the snapshot.
|
data/lib/files.com/version.rb
CHANGED