Skip to content

Commit b5dae43

Browse files
committed
Merged Files / fixed typos
Python v3/v2 samples are adequately represented by the v3 samples, because the only difference as yet is print statement syntax (and Python 3's is backwards compatible), and there's little chance we will run into significant differences between the Python files to warrant doubling the number of files that will need to be maintained. Additionally, this commit fixes some typos (i.e. functions named `trigger_incident` where `resolve_incident` would be more appropriate).
1 parent 307a0a1 commit b5dae43

166 files changed

Lines changed: 8 additions & 4983 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

python_v3/EVENTS_API_V1/Resolve/resolve_incident.py renamed to EVENTS_API_V1/Resolve/resolve_incident.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
SERVICE_KEY = "" # ENTER EVENTS V1 API INTEGRATION KEY HERE
77
INCIDENT_KEY = "" # ENTER INCIDENT KEY
88

9-
def trigger_incident():
9+
def resolve_incident():
1010
# Triggers a PagerDuty incident without a previously generated incident key
1111
# Uses Events V1 API - documentation: https://v2.developer.pagerduty.com/docs/trigger-events
1212

@@ -26,4 +26,4 @@ def trigger_incident():
2626
print(response.text) # print error message if not successful
2727

2828
if __name__ == '__main__':
29-
trigger_incident()
29+
resolve_incident()

python_v3/EVENTS_API_V1/Trigger/trigger_with_incident_key.py renamed to EVENTS_API_V1/Trigger/trigger_with_incident_key.py

File renamed without changes.

python_v3/EVENTS_API_V1/Trigger/trigger_without_incident_key.py renamed to EVENTS_API_V1/Trigger/trigger_without_incident_key.py

File renamed without changes.

python_v3/EVENTS_API_V1/Ack/ack_incident.py renamed to EVENTS_API_V1/ack/ack_incident.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
SERVICE_KEY = "" # ENTER EVENTS V1 API INTEGRATION KEY HERE
77
INCIDENT_KEY = "" # ENTER INCIDENT KEY
88

9-
def trigger_incident():
9+
def ack_incident():
1010
# Triggers a PagerDuty incident without a previously generated incident key
1111
# Uses Events V1 API - documentation: https://v2.developer.pagerduty.com/docs/trigger-events
1212

@@ -26,4 +26,4 @@ def trigger_incident():
2626
print(response.text) # print error message if not successful
2727

2828
if __name__ == '__main__':
29-
trigger_incident()
29+
ack_incident()

python_v3/EVENTS_API_v2/ack/ack_incident.py renamed to EVENTS_API_v2/ack/ack_incident.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
ROUTING_KEY = "" # ENTER EVENTS V2 API INTEGRATION KEY HERE
77
INCIDENT_KEY = "" # ENTER INCIDENT KEY HERE
88

9-
def trigger_incident():
9+
def ack_incident():
1010
# Triggers a PagerDuty incident without a previously generated incident key
1111
# Uses Events V2 API - documentation: https://v2.developer.pagerduty.com/docs/send-an-event-events-api-v2
1212

@@ -30,4 +30,4 @@ def trigger_incident():
3030
print(response.text) # print error message if not successful
3131

3232
if __name__ == '__main__':
33-
trigger_incident()
33+
ack_incident()

python_v3/EVENTS_API_v2/resolve/resolve_incident.py renamed to EVENTS_API_v2/resolve/resolve_incident.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
ROUTING_KEY = "" # ENTER EVENTS V2 API INTEGRATION KEY HERE
77
INCIDENT_KEY = "" # ENTER INCIDENT KEY HERE
88

9-
def trigger_incident():
9+
def resolve_incident():
1010
# Triggers a PagerDuty incident without a previously generated incident key
1111
# Uses Events V2 API - documentation: https://v2.developer.pagerduty.com/docs/send-an-event-events-api-v2
1212

@@ -30,4 +30,4 @@ def trigger_incident():
3030
print(response.text) # print error message if not successful
3131

3232
if __name__ == '__main__':
33-
trigger_incident()
33+
resolve_incident()

python_v3/EVENTS_API_v2/trigger/trigger_with_incident_key.py renamed to EVENTS_API_v2/trigger/trigger_with_incident_key.py

File renamed without changes.

python_v3/EVENTS_API_v2/trigger/trigger_without_incident_key.py renamed to EVENTS_API_v2/trigger/trigger_without_incident_key.py

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)