files.com 1.0.265 → 1.0.266
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/notification.md +10 -2
- data/lib/files.com/models/notification.rb +15 -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: 5bd932a4a99b7a21dabc37284ec0b6ca86718bf48471b1f4589fe2c3be428227
|
4
|
+
data.tar.gz: e86ec191784d246cbdb5416a1be455cd5e4dae7b0a956085cfa3ea2454928533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f7934c41f9230fd424124c21243e64e5278ee4cc7e140cb9a5a0d84aae89e4e7d08b0aae99bdec62914972cd1b65a4310ca164a21cde6f77a065d54c0433754
|
7
|
+
data.tar.gz: dae557542afe50ab516011f5da15551d555f1fb86232ef5add8d7cf8bd51e8cecbb6c6fd8908dc7d0f4dc2d58d813d2857bb3efeb86977b2019ce829afe4608a
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.266
|
data/docs/notification.md
CHANGED
@@ -12,6 +12,7 @@
|
|
12
12
|
"notify_on_copy": true,
|
13
13
|
"recursive": true,
|
14
14
|
"send_interval": "fifteen_minutes",
|
15
|
+
"message": "custom notification email message",
|
15
16
|
"unsubscribed": true,
|
16
17
|
"unsubscribed_reason": "",
|
17
18
|
"user_id": 1,
|
@@ -28,6 +29,7 @@
|
|
28
29
|
* `notify_on_copy` (boolean): Triggers notification when moving or copying files to this path
|
29
30
|
* `recursive` (boolean): Enable notifications for each subfolder in this path
|
30
31
|
* `send_interval` (string): The time interval that notifications are aggregated to
|
32
|
+
* `message` (string): Custom message to include in notification emails.
|
31
33
|
* `unsubscribed` (boolean): Is the user unsubscribed from this notification?
|
32
34
|
* `unsubscribed_reason` (string): The reason that the user unsubscribed
|
33
35
|
* `user_id` (int64): Notification user ID
|
@@ -89,6 +91,7 @@ Files::Notification.create(
|
|
89
91
|
notify_user_actions: true,
|
90
92
|
recursive: true,
|
91
93
|
send_interval: "daily",
|
94
|
+
message: "custom notification email message",
|
92
95
|
group_id: 1,
|
93
96
|
username: "User"
|
94
97
|
)
|
@@ -101,6 +104,7 @@ Files::Notification.create(
|
|
101
104
|
* `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
|
102
105
|
* `recursive` (boolean): If `true`, enable notifications for each subfolder in this path
|
103
106
|
* `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
107
|
+
* `message` (string): Custom message to include in notification emails.
|
104
108
|
* `group_id` (int64): The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
|
105
109
|
* `path` (string): Path
|
106
110
|
* `username` (string): The username of the user to notify. Provide `user_id`, `username` or `group_id`.
|
@@ -115,7 +119,8 @@ Files::Notification.update(id,
|
|
115
119
|
notify_on_copy: true,
|
116
120
|
notify_user_actions: true,
|
117
121
|
recursive: true,
|
118
|
-
send_interval: "daily"
|
122
|
+
send_interval: "daily",
|
123
|
+
message: "custom notification email message"
|
119
124
|
)
|
120
125
|
```
|
121
126
|
|
@@ -126,6 +131,7 @@ Files::Notification.update(id,
|
|
126
131
|
* `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
|
127
132
|
* `recursive` (boolean): If `true`, enable notifications for each subfolder in this path
|
128
133
|
* `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
134
|
+
* `message` (string): Custom message to include in notification emails.
|
129
135
|
|
130
136
|
|
131
137
|
---
|
@@ -152,7 +158,8 @@ notification.update(
|
|
152
158
|
notify_on_copy: true,
|
153
159
|
notify_user_actions: true,
|
154
160
|
recursive: true,
|
155
|
-
send_interval: "daily"
|
161
|
+
send_interval: "daily",
|
162
|
+
message: "custom notification email message"
|
156
163
|
)
|
157
164
|
```
|
158
165
|
|
@@ -163,6 +170,7 @@ notification.update(
|
|
163
170
|
* `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
|
164
171
|
* `recursive` (boolean): If `true`, enable notifications for each subfolder in this path
|
165
172
|
* `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
173
|
+
* `message` (string): Custom message to include in notification emails.
|
166
174
|
|
167
175
|
|
168
176
|
---
|
@@ -81,6 +81,15 @@ module Files
|
|
81
81
|
@attributes[:send_interval] = value
|
82
82
|
end
|
83
83
|
|
84
|
+
# string - Custom message to include in notification emails.
|
85
|
+
def message
|
86
|
+
@attributes[:message]
|
87
|
+
end
|
88
|
+
|
89
|
+
def message=(value)
|
90
|
+
@attributes[:message] = value
|
91
|
+
end
|
92
|
+
|
84
93
|
# boolean - Is the user unsubscribed from this notification?
|
85
94
|
def unsubscribed
|
86
95
|
@attributes[:unsubscribed]
|
@@ -131,12 +140,14 @@ module Files
|
|
131
140
|
# notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
132
141
|
# recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
133
142
|
# send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
143
|
+
# message - string - Custom message to include in notification emails.
|
134
144
|
def update(params = {})
|
135
145
|
params ||= {}
|
136
146
|
params[:id] = @attributes[:id]
|
137
147
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
138
148
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
139
149
|
raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params.dig(:send_interval) and !params.dig(:send_interval).is_a?(String)
|
150
|
+
raise InvalidParameterError.new("Bad parameter: message must be an String") if params.dig(:message) and !params.dig(:message).is_a?(String)
|
140
151
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
141
152
|
|
142
153
|
Api.send_request("/notifications/#{@attributes[:id]}", :patch, params, @options)
|
@@ -224,12 +235,14 @@ module Files
|
|
224
235
|
# notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
225
236
|
# recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
226
237
|
# send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
238
|
+
# message - string - Custom message to include in notification emails.
|
227
239
|
# group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
|
228
240
|
# path - string - Path
|
229
241
|
# username - string - The username of the user to notify. Provide `user_id`, `username` or `group_id`.
|
230
242
|
def self.create(params = {}, options = {})
|
231
243
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
232
244
|
raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params.dig(:send_interval) and !params.dig(:send_interval).is_a?(String)
|
245
|
+
raise InvalidParameterError.new("Bad parameter: message must be an String") if params.dig(:message) and !params.dig(:message).is_a?(String)
|
233
246
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
|
234
247
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
|
235
248
|
raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
|
@@ -243,11 +256,13 @@ module Files
|
|
243
256
|
# notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
244
257
|
# recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
245
258
|
# send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
259
|
+
# message - string - Custom message to include in notification emails.
|
246
260
|
def self.update(id, params = {}, options = {})
|
247
261
|
params ||= {}
|
248
262
|
params[:id] = id
|
249
263
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
250
264
|
raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params.dig(:send_interval) and !params.dig(:send_interval).is_a?(String)
|
265
|
+
raise InvalidParameterError.new("Bad parameter: message must be an String") if params.dig(:message) and !params.dig(:message).is_a?(String)
|
251
266
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
252
267
|
|
253
268
|
response, options = Api.send_request("/notifications/#{params[:id]}", :patch, params, options)
|
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.266
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|