Skip to content

Commit c59ae6c

Browse files
authored
release v0.1.5 (#24)
* return controller paths not names
1 parent 96a13e3 commit c59ae6c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

phpypam/core/api.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# (c) Christian Meißner 2020
33

44
import json
5+
import re
56
import requests
67

78
from requests.auth import HTTPBasicAuth
@@ -140,6 +141,6 @@ def update_entity(self, controller, data, **kwargs):
140141
def controllers(self):
141142
result = self._query(token=self._api_token, method=OPTIONS, path='/')
142143

143-
controllers = ({v for ctrl in result['controllers'] for (k, v) in ctrl.items() if k == 'rel'})
144+
controllers = ({re.sub(r'^/api/' + self._api_appid + '/(.+)/$', r'\1', v) for ctrl in result['controllers'] for (k, v) in ctrl.items() if k == 'href'})
144145

145146
return controllers

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="phpypam",
8-
version="0.1.4",
8+
version="0.1.5",
99
author="Christian Meißner",
1010
author_email="Christian Meißner <[email protected]>",
1111
description="Python API client library for phpIPAM installation",

0 commit comments

Comments
 (0)