pixela 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/pixela/client/notificaton_methods.rb +4 -2
- data/lib/pixela/notification.rb +4 -5
- data/lib/pixela/version.rb +1 -1
- 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: ec0dd41b85fe93243b7771abc4e2f346318a137e99dd772ec4b95f9f042c1e92
|
4
|
+
data.tar.gz: c7a2ec1a3e91e9d23c8726e1b8202c9fc5b3e833ca225907510e8188ad2e3dec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc2410feb6a22510756c9a158773ebfa2c66192b45a68593d213e5f58bf2084d637a4e9e8352abd372b12af99d589485d610a61b95df3e4f1fd1b4539518654a
|
7
|
+
data.tar.gz: 43370888fb1ebd2b2ca8140f94d9feb39daf476f930f3fef08993de8300c26c3bf1de2c94a37810983d1ed91b8983b14d7b51dec91a25dd3a72735851a688a3f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](http://github.com/sue445/pixela/compare/v1.4.
|
2
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.4.2...master)
|
3
|
+
|
4
|
+
## v1.4.2
|
5
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.4.1...v1.4.2)
|
6
|
+
|
7
|
+
* Support `remind_by` of Notification
|
8
|
+
* https://github.com/sue445/pixela/pull/72
|
9
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.17.0
|
3
10
|
|
4
11
|
## v1.4.1
|
5
12
|
[full changelog](http://github.com/sue445/pixela/compare/v1.4.0...v1.4.1)
|
@@ -7,6 +7,7 @@ module Pixela::Client::NotificationMethods
|
|
7
7
|
# @param target [String]
|
8
8
|
# @param condition [String]
|
9
9
|
# @param threshold [String]
|
10
|
+
# @param remind_by [String]
|
10
11
|
# @param channel_id [String]
|
11
12
|
#
|
12
13
|
# @return [Pixela::Response]
|
@@ -16,14 +17,15 @@ module Pixela::Client::NotificationMethods
|
|
16
17
|
# @see https://docs.pixe.la/entry/post-notification
|
17
18
|
#
|
18
19
|
# @example
|
19
|
-
# client.create_notification(graph_id: "test-graph", notification_id: "my-notification-rule", name: "my notification rule", target: "quantity", condition: ">", threshold: "5", channel_id: "my-channel")
|
20
|
-
def create_notification(graph_id:, notification_id:, name:, target:, condition:, threshold:, channel_id:)
|
20
|
+
# client.create_notification(graph_id: "test-graph", notification_id: "my-notification-rule", name: "my notification rule", target: "quantity", condition: ">", threshold: "5", remind_by: "21", channel_id: "my-channel")
|
21
|
+
def create_notification(graph_id:, notification_id:, name:, target:, condition:, threshold:, remind_by: nil, channel_id:)
|
21
22
|
params = {
|
22
23
|
id: notification_id,
|
23
24
|
name: name,
|
24
25
|
target: target,
|
25
26
|
condition: condition,
|
26
27
|
threshold: threshold,
|
28
|
+
remindBy: remind_by,
|
27
29
|
channelID: channel_id,
|
28
30
|
}
|
29
31
|
|
data/lib/pixela/notification.rb
CHANGED
@@ -27,6 +27,7 @@ module Pixela
|
|
27
27
|
# @param target [String]
|
28
28
|
# @param condition [String]
|
29
29
|
# @param threshold [String]
|
30
|
+
# @param remind_by [String]
|
30
31
|
# @param channel_id [String]
|
31
32
|
#
|
32
33
|
# @return [Pixela::Response]
|
@@ -36,15 +37,13 @@ module Pixela
|
|
36
37
|
# @see https://docs.pixe.la/entry/post-notification
|
37
38
|
#
|
38
39
|
# @example
|
39
|
-
# client.graph("test-graph").notification("my-notification-rule").create(name: "my notification rule", target: "quantity", condition: ">", threshold: "5", channel_id: "my-channel")
|
40
|
-
def create(name:, target:, condition:, threshold:, channel_id:)
|
41
|
-
client.create_notification(graph_id: graph_id, notification_id: notification_id, name: name, target: target, condition: condition, threshold: threshold, channel_id: channel_id)
|
40
|
+
# client.graph("test-graph").notification("my-notification-rule").create(name: "my notification rule", target: "quantity", condition: ">", threshold: "5", remind_by: "21", channel_id: "my-channel")
|
41
|
+
def create(name:, target:, condition:, threshold:, remind_by: nil, channel_id:)
|
42
|
+
client.create_notification(graph_id: graph_id, notification_id: notification_id, name: name, target: target, condition: condition, threshold: threshold, remind_by: remind_by, channel_id: channel_id)
|
42
43
|
end
|
43
44
|
|
44
45
|
# Update predefined notification rule.
|
45
46
|
#
|
46
|
-
# @param graph_id [String]
|
47
|
-
# @param notification_id [String]
|
48
47
|
# @param name [String]
|
49
48
|
# @param target [String]
|
50
49
|
# @param condition [String]
|
data/lib/pixela/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixela
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|