Skip to content

Commit

Permalink
Merge pull request #36 from nathanielvarona/improvement/get-organizat…
Browse files Browse the repository at this point in the history
…ion-by-id

Get Organization by Id
  • Loading branch information
nathanielvarona committed Apr 26, 2024
2 parents 354d510 + 1393478 commit 27a601b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pritunl_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ def __init__(self, root):
self.headers = None
self.root = root

def get(self):
def get(self, org_id=None):
try:
self.r = self.root.auth_request(method="GET", path="/organization")
if org_id:
self.r = self.root.auth_request(method="GET", path="/organization/{0}".format(org_id))
else:
self.r = self.root.auth_request(method="GET", path="/organization")
if self.r.status_code == 200:
return self.r.json()
else:
Expand Down

0 comments on commit 27a601b

Please sign in to comment.