Skip to content

Commit

Permalink
add get_groups
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Aug 4, 2017
1 parent 6b96eff commit baf7b68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ from daiquiri_client import Client

client = Client('http://localhost:8000', '6f3d17e17e46c8e188b4c285ebb53a3fa3ce98c6')

for profile in client.auth.fetch_profiles():
for profile in client.auth.get_profiles():
print(profile['user']['email'])
```
5 changes: 4 additions & 1 deletion daiquiri_client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ class Auth():
def __init__(self, client):
self.client = client

def fetch_profiles(self):
def get_profiles(self):
return self.client.get('/auth/api/profiles/')['results']

def get_groups(self):
return self.client.get('/auth/api/groups/')

0 comments on commit baf7b68

Please sign in to comment.