files.com 1.0.159 → 1.0.160
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/sync_job.md +37 -0
- data/lib/files.com.rb +1 -0
- data/lib/files.com/models/sync_job.rb +58 -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: d72c49ef78d528d5b35db25591e626c7fbe3443183b8f6c225547443e951d97b
|
|
4
|
+
data.tar.gz: af83fcec5b6a2d950e242c076567d95f5a82a29e8b17a5b62dfe7bbe6e6a34da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86215033fa67353d2e9c6acb6921f5e3fe34c5d041f2125d60d6d11c1581bd4698e073691d20edd3f88bedcbd6b7b3a1c636c20aba0c1eb3f139f1087658945a
|
|
7
|
+
data.tar.gz: 5be145aed3338585661eea5ce5f5eed0e18d954eed53adb5363f01ec7f6a4f7f2a303206679eef40e038f487034f1be44e100f7b16541235106afb7841cd5444
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.160
|
data/docs/sync_job.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# SyncJob
|
|
2
|
+
|
|
3
|
+
## Example SyncJob Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"queued_at": "2000-01-01T01:00:00Z",
|
|
8
|
+
"updated_at": "2000-01-01T01:00:00Z",
|
|
9
|
+
"status": "",
|
|
10
|
+
"regional_worker_status": "",
|
|
11
|
+
"uuid": "",
|
|
12
|
+
"folder_behavior_id": 1
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
* `queued_at` (date-time): Job enqueued at
|
|
17
|
+
* `updated_at` (date-time): Job updated at
|
|
18
|
+
* `status` (string): Status of the job
|
|
19
|
+
* `regional_worker_status` (string): Most recent reported status of sync worker
|
|
20
|
+
* `uuid` (string):
|
|
21
|
+
* `folder_behavior_id` (int64):
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## List Sync Jobs
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Files::SyncJob.list(
|
|
30
|
+
per_page: 1
|
|
31
|
+
)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Parameters
|
|
35
|
+
|
|
36
|
+
* `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
|
37
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
data/lib/files.com.rb
CHANGED
|
@@ -85,6 +85,7 @@ require "files.com/models/site"
|
|
|
85
85
|
require "files.com/models/sso_strategy"
|
|
86
86
|
require "files.com/models/status"
|
|
87
87
|
require "files.com/models/style"
|
|
88
|
+
require "files.com/models/sync_job"
|
|
88
89
|
require "files.com/models/usage_daily_snapshot"
|
|
89
90
|
require "files.com/models/usage_snapshot"
|
|
90
91
|
require "files.com/models/user"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class SyncJob
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# date-time - Job enqueued at
|
|
13
|
+
def queued_at
|
|
14
|
+
@attributes[:queued_at]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# date-time - Job updated at
|
|
18
|
+
def updated_at
|
|
19
|
+
@attributes[:updated_at]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# string - Status of the job
|
|
23
|
+
def status
|
|
24
|
+
@attributes[:status]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# string - Most recent reported status of sync worker
|
|
28
|
+
def regional_worker_status
|
|
29
|
+
@attributes[:regional_worker_status]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# string -
|
|
33
|
+
def uuid
|
|
34
|
+
@attributes[:uuid]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# int64 -
|
|
38
|
+
def folder_behavior_id
|
|
39
|
+
@attributes[:folder_behavior_id]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Parameters:
|
|
43
|
+
# cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
|
44
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
45
|
+
def self.list(params = {}, options = {})
|
|
46
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
|
|
47
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
|
48
|
+
|
|
49
|
+
List.new(SyncJob, params) do
|
|
50
|
+
Api.send_request("/sync_jobs", :get, params, options)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def self.all(params = {}, options = {})
|
|
55
|
+
list(params, options)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
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.160
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
@@ -145,6 +145,7 @@ files:
|
|
|
145
145
|
- docs/sso_strategy.md
|
|
146
146
|
- docs/status.md
|
|
147
147
|
- docs/style.md
|
|
148
|
+
- docs/sync_job.md
|
|
148
149
|
- docs/usage_daily_snapshot.md
|
|
149
150
|
- docs/usage_snapshot.md
|
|
150
151
|
- docs/user.md
|
|
@@ -217,6 +218,7 @@ files:
|
|
|
217
218
|
- lib/files.com/models/sso_strategy.rb
|
|
218
219
|
- lib/files.com/models/status.rb
|
|
219
220
|
- lib/files.com/models/style.rb
|
|
221
|
+
- lib/files.com/models/sync_job.rb
|
|
220
222
|
- lib/files.com/models/usage_daily_snapshot.rb
|
|
221
223
|
- lib/files.com/models/usage_snapshot.rb
|
|
222
224
|
- lib/files.com/models/user.rb
|