files.com 1.0.179 → 1.0.180
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/external_event.md +17 -0
- data/lib/files.com/models/external_event.rb +42 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63d792817bc5dda505fbbb43345568f676002d923ceacdcd57077c92807740fb
|
4
|
+
data.tar.gz: 96e5ab20cef1cd119fc00bcb067fdca15cf1998920d0c8e48934eb2fbaa1d883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d861ef902119b67bd307d797f911ce605f9e5f5b0374b9e4436c2ae5e8c898a43a4589f9a869d57ce0ef0b8c8ad24dd196a80b7da4a6557965697d9f8a71579
|
7
|
+
data.tar.gz: 4876b0348fbc069e36d4f9004cf33e004ffc1986a9b8779d2d0b4128961a6c82426d45d7a7e5a1da07492f5b1bebaf7e24aeb81fd6aa1443ea688b0b0674e669
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.180
|
data/docs/external_event.md
CHANGED
@@ -55,3 +55,20 @@ Files::ExternalEvent.find(id)
|
|
55
55
|
### Parameters
|
56
56
|
|
57
57
|
* `id` (int64): Required - External Event ID.
|
58
|
+
|
59
|
+
|
60
|
+
---
|
61
|
+
|
62
|
+
## Create External Event
|
63
|
+
|
64
|
+
```
|
65
|
+
Files::ExternalEvent.create(
|
66
|
+
status: "status",
|
67
|
+
body: "body"
|
68
|
+
)
|
69
|
+
```
|
70
|
+
|
71
|
+
### Parameters
|
72
|
+
|
73
|
+
* `status` (string): Required - Status of event.
|
74
|
+
* `body` (string): Required - Event body
|
@@ -14,21 +14,37 @@ module Files
|
|
14
14
|
@attributes[:id]
|
15
15
|
end
|
16
16
|
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
17
21
|
# string - Type of event being recorded.
|
18
22
|
def event_type
|
19
23
|
@attributes[:event_type]
|
20
24
|
end
|
21
25
|
|
26
|
+
def event_type=(value)
|
27
|
+
@attributes[:event_type] = value
|
28
|
+
end
|
29
|
+
|
22
30
|
# string - Status of event.
|
23
31
|
def status
|
24
32
|
@attributes[:status]
|
25
33
|
end
|
26
34
|
|
35
|
+
def status=(value)
|
36
|
+
@attributes[:status] = value
|
37
|
+
end
|
38
|
+
|
27
39
|
# string - Event body
|
28
40
|
def body
|
29
41
|
@attributes[:body]
|
30
42
|
end
|
31
43
|
|
44
|
+
def body=(value)
|
45
|
+
@attributes[:body] = value
|
46
|
+
end
|
47
|
+
|
32
48
|
# date-time - External event create date/time
|
33
49
|
def created_at
|
34
50
|
@attributes[:created_at]
|
@@ -39,6 +55,19 @@ module Files
|
|
39
55
|
@attributes[:body_url]
|
40
56
|
end
|
41
57
|
|
58
|
+
def body_url=(value)
|
59
|
+
@attributes[:body_url] = value
|
60
|
+
end
|
61
|
+
|
62
|
+
def save
|
63
|
+
if @attributes[:id]
|
64
|
+
raise NotImplementedError.new("The ExternalEvent object doesn't support updates.")
|
65
|
+
else
|
66
|
+
new_obj = ExternalEvent.create(@attributes, @options)
|
67
|
+
@attributes = new_obj.attributes
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
42
71
|
# Parameters:
|
43
72
|
# 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
73
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
@@ -84,5 +113,18 @@ module Files
|
|
84
113
|
def self.get(id, params = {}, options = {})
|
85
114
|
find(id, params, options)
|
86
115
|
end
|
116
|
+
|
117
|
+
# Parameters:
|
118
|
+
# status (required) - string - Status of event.
|
119
|
+
# body (required) - string - Event body
|
120
|
+
def self.create(params = {}, options = {})
|
121
|
+
raise InvalidParameterError.new("Bad parameter: status must be an String") if params.dig(:status) and !params.dig(:status).is_a?(String)
|
122
|
+
raise InvalidParameterError.new("Bad parameter: body must be an String") if params.dig(:body) and !params.dig(:body).is_a?(String)
|
123
|
+
raise MissingParameterError.new("Parameter missing: status") unless params.dig(:status)
|
124
|
+
raise MissingParameterError.new("Parameter missing: body") unless params.dig(:body)
|
125
|
+
|
126
|
+
response, options = Api.send_request("/external_events", :post, params, options)
|
127
|
+
ExternalEvent.new(response.data, options)
|
128
|
+
end
|
87
129
|
end
|
88
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.180
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|