files.com 1.0.185 → 1.0.186
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/docs/file_migration.md +38 -0
- data/lib/files.com.rb +1 -0
- data/lib/files.com/models/file_migration.rb +68 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd6b8cb725740fa166bbc1ce206311927d47ff2b8e31646f2d8f42f0c2cbceb9
|
4
|
+
data.tar.gz: 72b86fe34d261f24fd19893434d5876fb2f556d11968cf617ec51a5d948acced
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c58e5414b8d30902338b6d2e0f6419ba591190d48bf34344718170a7155191f0b4e6aa4655683219b78e8c900e1f008993dddd94dc276c855c528439b013ae2
|
7
|
+
data.tar.gz: '0887f3a898073aeb880648cde030f192056660213bfce7f725cc31927b7b4a95b803b48dff42b7cfa3524373167094fd36850ca142a42454a2dbfbc8ce7ab542'
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.186
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# FileMigration
|
2
|
+
|
3
|
+
## Example FileMigration Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"path": "MyFolder",
|
9
|
+
"dest_path": "MyFolder",
|
10
|
+
"files_moved": 1,
|
11
|
+
"files_total": 1,
|
12
|
+
"operation": "move",
|
13
|
+
"region": "USA",
|
14
|
+
"status": "complete"
|
15
|
+
}
|
16
|
+
```
|
17
|
+
|
18
|
+
* `id` (int64): File migration ID
|
19
|
+
* `path` (string): Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
20
|
+
* `dest_path` (string): Destination path
|
21
|
+
* `files_moved` (int64): Number of files processed
|
22
|
+
* `files_total` (int64): Total number of files to process
|
23
|
+
* `operation` (string): The type of operation
|
24
|
+
* `region` (string): Region
|
25
|
+
* `status` (string): Status
|
26
|
+
|
27
|
+
|
28
|
+
---
|
29
|
+
|
30
|
+
## Show File Migration
|
31
|
+
|
32
|
+
```
|
33
|
+
Files::FileMigration.find(id)
|
34
|
+
```
|
35
|
+
|
36
|
+
### Parameters
|
37
|
+
|
38
|
+
* `id` (int64): Required - File Migration ID.
|
data/lib/files.com.rb
CHANGED
@@ -51,6 +51,7 @@ require "files.com/models/file"
|
|
51
51
|
require "files.com/models/file_action"
|
52
52
|
require "files.com/models/file_comment"
|
53
53
|
require "files.com/models/file_comment_reaction"
|
54
|
+
require "files.com/models/file_migration"
|
54
55
|
require "files.com/models/file_upload_part"
|
55
56
|
require "files.com/models/folder"
|
56
57
|
require "files.com/models/form_field"
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class FileMigration
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# int64 - File migration ID
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
# string - Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
18
|
+
def path
|
19
|
+
@attributes[:path]
|
20
|
+
end
|
21
|
+
|
22
|
+
# string - Destination path
|
23
|
+
def dest_path
|
24
|
+
@attributes[:dest_path]
|
25
|
+
end
|
26
|
+
|
27
|
+
# int64 - Number of files processed
|
28
|
+
def files_moved
|
29
|
+
@attributes[:files_moved]
|
30
|
+
end
|
31
|
+
|
32
|
+
# int64 - Total number of files to process
|
33
|
+
def files_total
|
34
|
+
@attributes[:files_total]
|
35
|
+
end
|
36
|
+
|
37
|
+
# string - The type of operation
|
38
|
+
def operation
|
39
|
+
@attributes[:operation]
|
40
|
+
end
|
41
|
+
|
42
|
+
# string - Region
|
43
|
+
def region
|
44
|
+
@attributes[:region]
|
45
|
+
end
|
46
|
+
|
47
|
+
# string - Status
|
48
|
+
def status
|
49
|
+
@attributes[:status]
|
50
|
+
end
|
51
|
+
|
52
|
+
# Parameters:
|
53
|
+
# id (required) - int64 - File Migration ID.
|
54
|
+
def self.find(id, params = {}, options = {})
|
55
|
+
params ||= {}
|
56
|
+
params[:id] = id
|
57
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
58
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
59
|
+
|
60
|
+
response, options = Api.send_request("/file_migrations/#{params[:id]}", :get, params, options)
|
61
|
+
FileMigration.new(response.data, options)
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.get(id, params = {}, options = {})
|
65
|
+
find(id, params, options)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.186
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- docs/file_action.md
|
111
111
|
- docs/file_comment.md
|
112
112
|
- docs/file_comment_reaction.md
|
113
|
+
- docs/file_migration.md
|
113
114
|
- docs/file_upload_part.md
|
114
115
|
- docs/file_utils.md
|
115
116
|
- docs/folder.md
|
@@ -186,6 +187,7 @@ files:
|
|
186
187
|
- lib/files.com/models/file_action.rb
|
187
188
|
- lib/files.com/models/file_comment.rb
|
188
189
|
- lib/files.com/models/file_comment_reaction.rb
|
190
|
+
- lib/files.com/models/file_migration.rb
|
189
191
|
- lib/files.com/models/file_upload_part.rb
|
190
192
|
- lib/files.com/models/file_utils.rb
|
191
193
|
- lib/files.com/models/folder.rb
|