Skip to content

Commit a7b818a

Browse files
committed
location api extend with depth
1 parent 413d8b7 commit a7b818a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python SDK
22

3-
Version: profitbricks-sdk-python **4.1.0**
3+
Version: profitbricks-sdk-python **4.1.1**
44

55
## Table of Contents
66

profitbricks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
"""ProfitBricks API Client Library for Python"""
16-
__version__ = '4.1.0'
16+
__version__ = '4.1.1'
1717

1818
API_HOST = 'https://api.profitbricks.com/cloudapi/v4'
1919
API_VERSION = '4.0'

profitbricks/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,23 +1068,23 @@ def remove_loadbalanced_nic(self, datacenter_id,
10681068

10691069
# Location Functions
10701070

1071-
def get_location(self, location_id):
1071+
def get_location(self, location_id, depth=0):
10721072
"""
10731073
Retrieves a single location by ID.
10741074
10751075
:param location_id: The unique ID of the location.
10761076
:type location_id: ``str``
10771077
10781078
"""
1079-
response = self._perform_request('/locations/' + location_id)
1079+
response = self._perform_request('/locations/%s?depth=%s' % (location_id,depth))
10801080
return response
10811081

1082-
def list_locations(self):
1082+
def list_locations(self, depth=0):
10831083
"""
10841084
Retrieves a list of locations available in the account.
10851085
10861086
"""
1087-
response = self._perform_request('/locations')
1087+
response = self._perform_request('/locations?depth=%s'% (depth))
10881088

10891089
return response
10901090

0 commit comments

Comments
 (0)