PagerDuty / pdpyras

Low-level PagerDuty REST/Events API client for Python
MIT License
130 stars 31 forks source link

V4.1: idempotent create #34

Closed Deconstrained closed 4 years ago

Deconstrained commented 4 years ago

Adds a new method to APISession which makes it easier to create a resource only if one doesn't exist already, as a one-liner.

Bonus: adds the ability to use a resource dictionary in place of a URL / path (the client will look for a self key, which is an expected attribute of almost every resource).