Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
Add idpgroups.list method
Browse files Browse the repository at this point in the history
  • Loading branch information
os committed Nov 19, 2016
1 parent 263eff6 commit a46b5b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion slacker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'Stars', 'Emoji', 'Presence', 'RTM', 'Team', 'Reactions', 'Pins',
'UserGroups', 'UserGroupsUsers', 'MPIM', 'OAuth', 'DND', 'Bots',
'FilesComments', 'Reminders', 'TeamProfile', 'UsersProfile',
'Slacker']
'IDPGroups', 'Slacker']


class Error(Exception):
Expand Down Expand Up @@ -799,6 +799,12 @@ def info(self, bot=None):
return self.get('bots.info', params={'bot': bot})


class IDPGroups(BaseAPI):
def list(self, include_users=False):
return self.get('idpgroups.list',
params={'include_users': int(include_users)})


class OAuth(BaseAPI):
def access(self, client_id, client_secret, code, redirect_uri=None):
return self.post('oauth.access',
Expand Down Expand Up @@ -852,6 +858,7 @@ def __init__(self, token, incoming_webhook_url=None,
self.presence = Presence(token=token, timeout=timeout)
self.reminders = Reminders(token=token, timeout=timeout)
self.reactions = Reactions(token=token, timeout=timeout)
self.idpgroups = IDPGroups(token=token, timeout=timeout)
self.usergroups = UserGroups(token=token, timeout=timeout)
self.incomingwebhook = IncomingWebhook(url=incoming_webhook_url,
timeout=timeout)

0 comments on commit a46b5b1

Please sign in to comment.