pd_event_v2 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Gemfile.lock +1 -1
- data/lib/pd_event_v2/client.rb +11 -1
- data/lib/pd_event_v2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61adba690d1518f544a802000ec06e85925fce396dcde441d691b7d3bcc21c0a
|
4
|
+
data.tar.gz: 90a3d282e716a151a6c89a5effc30c428a38b7d35b66c8d3473e34f8e49d0509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e3fd4e67a70dbcb1209c77b8d14c343c53b33428b4075e351c9330c456d8c2639c9ef2a6141ba2e0cf884abb441eeb77e95cda9baf4ea865bb81c84eeb8ae47
|
7
|
+
data.tar.gz: 7e6c3de8cde1940353924908767f0d3a53fa4f705b868a13878c004b02d8766d9186e63321b6f078c841af46d300f06fd17f7182e7e99bc547782f18304cb2a3
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/lib/pd_event_v2/client.rb
CHANGED
@@ -78,7 +78,15 @@ module PdEventV2
|
|
78
78
|
private
|
79
79
|
|
80
80
|
# https://v2.developer.pagerduty.com/v2/docs/send-an-event-events-api-v2
|
81
|
-
def send_event(
|
81
|
+
def send_event(
|
82
|
+
event_action:,
|
83
|
+
dedup_key: nil,
|
84
|
+
payload:,
|
85
|
+
images: nil,
|
86
|
+
links: nil,
|
87
|
+
client: nil,
|
88
|
+
client_url: nil
|
89
|
+
)
|
82
90
|
unless payload.is_a?(Hash)
|
83
91
|
raise ArgumentError, "wrong type payload (given: #{payload}:#{payload.class}, expected Hash)"
|
84
92
|
end
|
@@ -105,6 +113,8 @@ module PdEventV2
|
|
105
113
|
params[:dedup_key] = dedup_key if dedup_key
|
106
114
|
params[:images] = images if images
|
107
115
|
params[:links] = links if links
|
116
|
+
params[:client] = client if client
|
117
|
+
params[:client_url] = client_url if client_url
|
108
118
|
|
109
119
|
res = @conn.post do |req|
|
110
120
|
req.body = JSON.dump(params)
|
data/lib/pd_event_v2/version.rb
CHANGED