dropbox / pygerduty

A Python library for PagerDuty.
MIT License
163 stars 72 forks source link

add extensions collection to v2 client #70

Closed g-k closed 6 years ago

g-k commented 6 years ago

Add a collection for the extensions endpoint: https://v2.developer.pagerduty.com/v2/page/api-reference#!/Extensions/get_extensions

Not sure what tests to add, but I checked:

Python 3.6.5 (default, Jun  6 2018, 00:52:57)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygerduty.v2
>>> import os
>>> PD_RO_KEY = os.environ.get("pagerdutyRoKey", None)
>>> client = pygerduty.v2.PagerDuty(PD_RO_KEY)
>>> next(client.extensions.list())
<Extension: endpoint_url='https://<>.execute-api.us-east-1.amazonaws.com/api/<>/', name='pagerstatus', config=<Container: >, extension_schema=<Container: id='<>', type='extension_schema_reference', summary='Generic V2 Webhook', ...
cugini-dbx commented 6 years ago

Sorry for the delay, just took over maintaining this project. Looks good to me, thanks for fixing the tox config.

g-k commented 6 years ago

No worries! Thanks for the review!