diff --git a/README.md b/README.md index 20cfee2..6d6f7dd 100644 --- a/README.md +++ b/README.md @@ -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']) ``` diff --git a/daiquiri_client/auth.py b/daiquiri_client/auth.py index 9d1333e..bc039d6 100644 --- a/daiquiri_client/auth.py +++ b/daiquiri_client/auth.py @@ -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/')