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

Commit

Permalink
Merge pull request #94 from kryptn/master
Browse files Browse the repository at this point in the history
Added undocumented users.admin.invite method
  • Loading branch information
simonsolnes committed May 15, 2017
2 parents 7efb68d + 07864ed commit 1b19393
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions slacker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,31 @@ def set(self, user=None, profile=None, name=None, value=None):
})


class UsersAdmin(BaseAPI):
def invite(self, email, channels=None, first_name=None,
last_name=None, resend=True):
return self.post('users.admin.invite', params={
'email': email,
'channels': channels,
'first_name': first_name,
'last_name': last_name,
'resend': resend})


class Users(BaseAPI):
def __init__(self, *args, **kwargs):
super(Users, self).__init__(*args, **kwargs)
self._profile = UsersProfile(*args, **kwargs)
self._admin = UsersAdmin(*args, **kwargs)

@property
def profile(self):
return self._profile

@property
def admin(self):
return self._admin

def info(self, user):
return self.get('users.info', params={'user': user})

Expand Down

0 comments on commit 1b19393

Please sign in to comment.