Skip to content

Commit

Permalink
Get Organization by Id
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielvarona committed Apr 26, 2024
1 parent 354d510 commit 1393478
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 1393478

Please sign in to comment.