index
int64 0
731k
| package
stringlengths 2
98
⌀ | name
stringlengths 1
76
| docstring
stringlengths 0
281k
⌀ | code
stringlengths 4
1.07M
⌀ | signature
stringlengths 2
42.8k
⌀ |
---|---|---|---|---|---|
70,037 |
slacker
|
Conversations
| null |
class Conversations(BaseAPI):
def archive(self, channel):
return self.post('conversations.archive', data={'channel': channel})
def close(self, channel):
return self.post('conversations.close', data={'channel': channel})
def create(self, name, user_ids=None, is_private=None):
if isinstance(user_ids, (list, tuple)):
user_ids = ','.join(user_ids)
return self.post(
'conversations.create',
data={'name': name, 'user_ids': user_ids, 'is_private': is_private}
)
def history(self, channel, cursor=None, inclusive=None, latest=None,
oldest=None, limit=None):
return self.get(
'conversations.history',
params={
'channel': channel,
'cursor': cursor,
'inclusive': inclusive,
'latest': latest,
'oldest': oldest,
'limit': limit
}
)
def info(self, channel, include_locale=None, include_num_members=None):
return self.get(
'conversations.info',
params={
'channel': channel,
'include_locale': include_locale,
'include_num_members': include_num_members
}
)
def invite(self, channel, users):
if isinstance(users, (list, tuple)):
users = ','.join(users)
return self.post(
'conversations.invite',
data={'channel': channel, 'users': users}
)
def join(self, channel):
return self.post('conversations.join', data={'channel': channel})
def kick(self, channel, user):
return self.post(
'conversations.kick',
data={'channel': channel, 'user': user}
)
def leave(self, channel):
return self.post('conversations.leave', data={'channel': channel})
def list(self, cursor=None, exclude_archived=None, types=None, limit=None):
if isinstance(types, (list, tuple)):
types = ','.join(types)
return self.get(
'conversations.list',
params={
'cursor': cursor,
'exclude_archived': exclude_archived,
'types': types,
'limit': limit
}
)
def members(self, channel, cursor=None, limit=None):
return self.get(
'conversations.members',
params={'channel': channel, 'cursor': cursor, 'limit': limit}
)
def open(self, channel=None, users=None, return_im=None):
if isinstance(users, (list, tuple)):
users = ','.join(users)
return self.post(
'conversations.open',
data={'channel': channel, 'users': users, 'return_im': return_im}
)
def rename(self, channel, name):
return self.post(
'conversations.rename',
data={'channel': channel, 'name': name}
)
def replies(self, channel, ts, cursor=None, inclusive=None, latest=None,
oldest=None, limit=None):
return self.get(
'conversations.replies',
params={
'channel': channel,
'ts': ts,
'cursor': cursor,
'inclusive': inclusive,
'latest': latest,
'oldest': oldest,
'limit': limit
}
)
def set_purpose(self, channel, purpose):
return self.post(
'conversations.setPurpose',
data={'channel': channel, 'purpose': purpose}
)
def set_topic(self, channel, topic):
return self.post(
'conversations.setTopic',
data={'channel': channel, 'topic': topic}
)
def unarchive(self, channel):
return self.post('conversations.unarchive', data={'channel': channel})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,042 |
slacker
|
archive
| null |
def archive(self, channel):
return self.post('conversations.archive', data={'channel': channel})
|
(self, channel)
|
70,043 |
slacker
|
close
| null |
def close(self, channel):
return self.post('conversations.close', data={'channel': channel})
|
(self, channel)
|
70,044 |
slacker
|
create
| null |
def create(self, name, user_ids=None, is_private=None):
if isinstance(user_ids, (list, tuple)):
user_ids = ','.join(user_ids)
return self.post(
'conversations.create',
data={'name': name, 'user_ids': user_ids, 'is_private': is_private}
)
|
(self, name, user_ids=None, is_private=None)
|
70,046 |
slacker
|
history
| null |
def history(self, channel, cursor=None, inclusive=None, latest=None,
oldest=None, limit=None):
return self.get(
'conversations.history',
params={
'channel': channel,
'cursor': cursor,
'inclusive': inclusive,
'latest': latest,
'oldest': oldest,
'limit': limit
}
)
|
(self, channel, cursor=None, inclusive=None, latest=None, oldest=None, limit=None)
|
70,047 |
slacker
|
info
| null |
def info(self, channel, include_locale=None, include_num_members=None):
return self.get(
'conversations.info',
params={
'channel': channel,
'include_locale': include_locale,
'include_num_members': include_num_members
}
)
|
(self, channel, include_locale=None, include_num_members=None)
|
70,048 |
slacker
|
invite
| null |
def invite(self, channel, users):
if isinstance(users, (list, tuple)):
users = ','.join(users)
return self.post(
'conversations.invite',
data={'channel': channel, 'users': users}
)
|
(self, channel, users)
|
70,049 |
slacker
|
join
| null |
def join(self, channel):
return self.post('conversations.join', data={'channel': channel})
|
(self, channel)
|
70,050 |
slacker
|
kick
| null |
def kick(self, channel, user):
return self.post(
'conversations.kick',
data={'channel': channel, 'user': user}
)
|
(self, channel, user)
|
70,051 |
slacker
|
leave
| null |
def leave(self, channel):
return self.post('conversations.leave', data={'channel': channel})
|
(self, channel)
|
70,052 |
slacker
|
list
| null |
def list(self, cursor=None, exclude_archived=None, types=None, limit=None):
if isinstance(types, (list, tuple)):
types = ','.join(types)
return self.get(
'conversations.list',
params={
'cursor': cursor,
'exclude_archived': exclude_archived,
'types': types,
'limit': limit
}
)
|
(self, cursor=None, exclude_archived=None, types=None, limit=None)
|
70,053 |
slacker
|
members
| null |
def members(self, channel, cursor=None, limit=None):
return self.get(
'conversations.members',
params={'channel': channel, 'cursor': cursor, 'limit': limit}
)
|
(self, channel, cursor=None, limit=None)
|
70,054 |
slacker
|
open
| null |
def open(self, channel=None, users=None, return_im=None):
if isinstance(users, (list, tuple)):
users = ','.join(users)
return self.post(
'conversations.open',
data={'channel': channel, 'users': users, 'return_im': return_im}
)
|
(self, channel=None, users=None, return_im=None)
|
70,056 |
slacker
|
rename
| null |
def rename(self, channel, name):
return self.post(
'conversations.rename',
data={'channel': channel, 'name': name}
)
|
(self, channel, name)
|
70,057 |
slacker
|
replies
| null |
def replies(self, channel, ts, cursor=None, inclusive=None, latest=None,
oldest=None, limit=None):
return self.get(
'conversations.replies',
params={
'channel': channel,
'ts': ts,
'cursor': cursor,
'inclusive': inclusive,
'latest': latest,
'oldest': oldest,
'limit': limit
}
)
|
(self, channel, ts, cursor=None, inclusive=None, latest=None, oldest=None, limit=None)
|
70,058 |
slacker
|
set_purpose
| null |
def set_purpose(self, channel, purpose):
return self.post(
'conversations.setPurpose',
data={'channel': channel, 'purpose': purpose}
)
|
(self, channel, purpose)
|
70,059 |
slacker
|
set_topic
| null |
def set_topic(self, channel, topic):
return self.post(
'conversations.setTopic',
data={'channel': channel, 'topic': topic}
)
|
(self, channel, topic)
|
70,060 |
slacker
|
unarchive
| null |
def unarchive(self, channel):
return self.post('conversations.unarchive', data={'channel': channel})
|
(self, channel)
|
70,061 |
slacker
|
DND
| null |
class DND(BaseAPI):
def team_info(self, users=None):
if isinstance(users, (tuple, list)):
users = ','.join(users)
return self.get('dnd.teamInfo', params={'users': users})
def set_snooze(self, num_minutes):
return self.post('dnd.setSnooze', data={'num_minutes': num_minutes})
def info(self, user=None):
return self.get('dnd.info', params={'user': user})
def end_dnd(self):
return self.post('dnd.endDnd')
def end_snooze(self):
return self.post('dnd.endSnooze')
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,066 |
slacker
|
end_dnd
| null |
def end_dnd(self):
return self.post('dnd.endDnd')
|
(self)
|
70,067 |
slacker
|
end_snooze
| null |
def end_snooze(self):
return self.post('dnd.endSnooze')
|
(self)
|
70,069 |
slacker
|
info
| null |
def info(self, user=None):
return self.get('dnd.info', params={'user': user})
|
(self, user=None)
|
70,071 |
slacker
|
set_snooze
| null |
def set_snooze(self, num_minutes):
return self.post('dnd.setSnooze', data={'num_minutes': num_minutes})
|
(self, num_minutes)
|
70,072 |
slacker
|
team_info
| null |
def team_info(self, users=None):
if isinstance(users, (tuple, list)):
users = ','.join(users)
return self.get('dnd.teamInfo', params={'users': users})
|
(self, users=None)
|
70,073 |
slacker
|
Dialog
| null |
class Dialog(BaseAPI):
def open(self, dialog, trigger_id):
return self.post('dialog.open',
data={
'dialog': json.dumps(dialog),
'trigger_id': trigger_id,
})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,079 |
slacker
|
open
| null |
def open(self, dialog, trigger_id):
return self.post('dialog.open',
data={
'dialog': json.dumps(dialog),
'trigger_id': trigger_id,
})
|
(self, dialog, trigger_id)
|
70,081 |
slacker
|
Emoji
| null |
class Emoji(BaseAPI):
def list(self):
return self.get('emoji.list')
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,087 |
slacker
|
list
| null |
def list(self):
return self.get('emoji.list')
|
(self)
|
70,089 |
slacker
|
Error
| null |
class Error(Exception):
pass
| null |
70,090 |
slacker
|
Files
| null |
class Files(BaseAPI):
def __init__(self, *args, **kwargs):
super(Files, self).__init__(*args, **kwargs)
self._comments = FilesComments(*args, **kwargs)
@property
def comments(self):
return self._comments
def list(self, user=None, ts_from=None, ts_to=None, types=None,
count=None, page=None, channel=None):
return self.get('files.list',
params={
'user': user,
'ts_from': ts_from,
'ts_to': ts_to,
'types': types,
'count': count,
'page': page,
'channel': channel
})
def info(self, file_, count=None, page=None):
return self.get('files.info',
params={'file': file_, 'count': count, 'page': page})
def upload(self, file_=None, content=None, filetype=None, filename=None,
title=None, initial_comment=None, channels=None, thread_ts=None):
if isinstance(channels, (tuple, list)):
channels = ','.join(channels)
data = {
'content': content,
'filetype': filetype,
'filename': filename,
'title': title,
'initial_comment': initial_comment,
'channels': channels,
'thread_ts': thread_ts
}
if file_:
if isinstance(file_, str):
with open(file_, 'rb') as f:
return self.post(
'files.upload', data=data, files={'file': f}
)
return self.post(
'files.upload', data=data, files={'file': file_}
)
return self.post('files.upload', data=data)
def delete(self, file_):
return self.post('files.delete', data={'file': file_})
def revoke_public_url(self, file_):
return self.post('files.revokePublicURL', data={'file': file_})
def shared_public_url(self, file_):
return self.post('files.sharedPublicURL', data={'file': file_})
|
(*args, **kwargs)
|
70,091 |
slacker
|
__init__
| null |
def __init__(self, *args, **kwargs):
super(Files, self).__init__(*args, **kwargs)
self._comments = FilesComments(*args, **kwargs)
|
(self, *args, **kwargs)
|
70,095 |
slacker
|
delete
| null |
def delete(self, file_):
return self.post('files.delete', data={'file': file_})
|
(self, file_)
|
70,097 |
slacker
|
info
| null |
def info(self, file_, count=None, page=None):
return self.get('files.info',
params={'file': file_, 'count': count, 'page': page})
|
(self, file_, count=None, page=None)
|
70,098 |
slacker
|
list
| null |
def list(self, user=None, ts_from=None, ts_to=None, types=None,
count=None, page=None, channel=None):
return self.get('files.list',
params={
'user': user,
'ts_from': ts_from,
'ts_to': ts_to,
'types': types,
'count': count,
'page': page,
'channel': channel
})
|
(self, user=None, ts_from=None, ts_to=None, types=None, count=None, page=None, channel=None)
|
70,100 |
slacker
|
revoke_public_url
| null |
def revoke_public_url(self, file_):
return self.post('files.revokePublicURL', data={'file': file_})
|
(self, file_)
|
70,101 |
slacker
|
shared_public_url
| null |
def shared_public_url(self, file_):
return self.post('files.sharedPublicURL', data={'file': file_})
|
(self, file_)
|
70,102 |
slacker
|
upload
| null |
def upload(self, file_=None, content=None, filetype=None, filename=None,
title=None, initial_comment=None, channels=None, thread_ts=None):
if isinstance(channels, (tuple, list)):
channels = ','.join(channels)
data = {
'content': content,
'filetype': filetype,
'filename': filename,
'title': title,
'initial_comment': initial_comment,
'channels': channels,
'thread_ts': thread_ts
}
if file_:
if isinstance(file_, str):
with open(file_, 'rb') as f:
return self.post(
'files.upload', data=data, files={'file': f}
)
return self.post(
'files.upload', data=data, files={'file': file_}
)
return self.post('files.upload', data=data)
|
(self, file_=None, content=None, filetype=None, filename=None, title=None, initial_comment=None, channels=None, thread_ts=None)
|
70,103 |
slacker
|
FilesComments
| null |
class FilesComments(BaseAPI):
def add(self, file_, comment):
return self.post('files.comments.add',
data={'file': file_, 'comment': comment})
def delete(self, file_, id_):
return self.post('files.comments.delete',
data={'file': file_, 'id': id_})
def edit(self, file_, id_, comment):
return self.post('files.comments.edit',
data={'file': file_, 'id': id_, 'comment': comment})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,108 |
slacker
|
add
| null |
def add(self, file_, comment):
return self.post('files.comments.add',
data={'file': file_, 'comment': comment})
|
(self, file_, comment)
|
70,109 |
slacker
|
delete
| null |
def delete(self, file_, id_):
return self.post('files.comments.delete',
data={'file': file_, 'id': id_})
|
(self, file_, id_)
|
70,110 |
slacker
|
edit
| null |
def edit(self, file_, id_, comment):
return self.post('files.comments.edit',
data={'file': file_, 'id': id_, 'comment': comment})
|
(self, file_, id_, comment)
|
70,113 |
slacker
|
Groups
| null |
class Groups(BaseAPI):
def create(self, name):
return self.post('groups.create', data={'name': name})
def create_child(self, channel):
return self.post('groups.createChild', data={'channel': channel})
def info(self, channel):
return self.get('groups.info', params={'channel': channel})
def list(self, exclude_archived=None):
return self.get('groups.list',
params={'exclude_archived': exclude_archived})
def history(self, channel, latest=None, oldest=None, count=None,
inclusive=None):
return self.get('groups.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
'count': count,
'inclusive': inclusive
})
def invite(self, channel, user):
return self.post('groups.invite',
data={'channel': channel, 'user': user})
def kick(self, channel, user):
return self.post('groups.kick',
data={'channel': channel, 'user': user})
def leave(self, channel):
return self.post('groups.leave', data={'channel': channel})
def mark(self, channel, ts):
return self.post('groups.mark', data={'channel': channel, 'ts': ts})
def rename(self, channel, name):
return self.post('groups.rename',
data={'channel': channel, 'name': name})
def replies(self, channel, thread_ts):
return self.get('groups.replies',
params={'channel': channel, 'thread_ts': thread_ts})
def archive(self, channel):
return self.post('groups.archive', data={'channel': channel})
def unarchive(self, channel):
return self.post('groups.unarchive', data={'channel': channel})
def open(self, channel):
return self.post('groups.open', data={'channel': channel})
def close(self, channel):
return self.post('groups.close', data={'channel': channel})
def set_purpose(self, channel, purpose):
return self.post('groups.setPurpose',
data={'channel': channel, 'purpose': purpose})
def set_topic(self, channel, topic):
return self.post('groups.setTopic',
data={'channel': channel, 'topic': topic})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,118 |
slacker
|
archive
| null |
def archive(self, channel):
return self.post('groups.archive', data={'channel': channel})
|
(self, channel)
|
70,119 |
slacker
|
close
| null |
def close(self, channel):
return self.post('groups.close', data={'channel': channel})
|
(self, channel)
|
70,120 |
slacker
|
create
| null |
def create(self, name):
return self.post('groups.create', data={'name': name})
|
(self, name)
|
70,121 |
slacker
|
create_child
| null |
def create_child(self, channel):
return self.post('groups.createChild', data={'channel': channel})
|
(self, channel)
|
70,123 |
slacker
|
history
| null |
def history(self, channel, latest=None, oldest=None, count=None,
inclusive=None):
return self.get('groups.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
'count': count,
'inclusive': inclusive
})
|
(self, channel, latest=None, oldest=None, count=None, inclusive=None)
|
70,124 |
slacker
|
info
| null |
def info(self, channel):
return self.get('groups.info', params={'channel': channel})
|
(self, channel)
|
70,125 |
slacker
|
invite
| null |
def invite(self, channel, user):
return self.post('groups.invite',
data={'channel': channel, 'user': user})
|
(self, channel, user)
|
70,126 |
slacker
|
kick
| null |
def kick(self, channel, user):
return self.post('groups.kick',
data={'channel': channel, 'user': user})
|
(self, channel, user)
|
70,127 |
slacker
|
leave
| null |
def leave(self, channel):
return self.post('groups.leave', data={'channel': channel})
|
(self, channel)
|
70,128 |
slacker
|
list
| null |
def list(self, exclude_archived=None):
return self.get('groups.list',
params={'exclude_archived': exclude_archived})
|
(self, exclude_archived=None)
|
70,129 |
slacker
|
mark
| null |
def mark(self, channel, ts):
return self.post('groups.mark', data={'channel': channel, 'ts': ts})
|
(self, channel, ts)
|
70,130 |
slacker
|
open
| null |
def open(self, channel):
return self.post('groups.open', data={'channel': channel})
|
(self, channel)
|
70,132 |
slacker
|
rename
| null |
def rename(self, channel, name):
return self.post('groups.rename',
data={'channel': channel, 'name': name})
|
(self, channel, name)
|
70,133 |
slacker
|
replies
| null |
def replies(self, channel, thread_ts):
return self.get('groups.replies',
params={'channel': channel, 'thread_ts': thread_ts})
|
(self, channel, thread_ts)
|
70,134 |
slacker
|
set_purpose
| null |
def set_purpose(self, channel, purpose):
return self.post('groups.setPurpose',
data={'channel': channel, 'purpose': purpose})
|
(self, channel, purpose)
|
70,135 |
slacker
|
set_topic
| null |
def set_topic(self, channel, topic):
return self.post('groups.setTopic',
data={'channel': channel, 'topic': topic})
|
(self, channel, topic)
|
70,136 |
slacker
|
unarchive
| null |
def unarchive(self, channel):
return self.post('groups.unarchive', data={'channel': channel})
|
(self, channel)
|
70,137 |
slacker
|
IDPGroups
| null |
class IDPGroups(BaseAPI):
def list(self, include_users=False):
return self.get('idpgroups.list',
params={'include_users': int(include_users)})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,143 |
slacker
|
list
| null |
def list(self, include_users=False):
return self.get('idpgroups.list',
params={'include_users': int(include_users)})
|
(self, include_users=False)
|
70,145 |
slacker
|
IM
| null |
class IM(BaseAPI):
def list(self):
return self.get('im.list')
def history(self, channel, latest=None, oldest=None, count=None,
inclusive=None, unreads=False):
return self.get('im.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
'count': count,
'inclusive': inclusive,
'unreads': int(unreads)
})
def replies(self, channel, thread_ts):
return self.get('im.replies',
params={'channel': channel, 'thread_ts': thread_ts})
def mark(self, channel, ts):
return self.post('im.mark', data={'channel': channel, 'ts': ts})
def open(self, user):
return self.post('im.open', data={'user': user})
def close(self, channel):
return self.post('im.close', data={'channel': channel})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,150 |
slacker
|
close
| null |
def close(self, channel):
return self.post('im.close', data={'channel': channel})
|
(self, channel)
|
70,152 |
slacker
|
history
| null |
def history(self, channel, latest=None, oldest=None, count=None,
inclusive=None, unreads=False):
return self.get('im.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
'count': count,
'inclusive': inclusive,
'unreads': int(unreads)
})
|
(self, channel, latest=None, oldest=None, count=None, inclusive=None, unreads=False)
|
70,153 |
slacker
|
list
| null |
def list(self):
return self.get('im.list')
|
(self)
|
70,154 |
slacker
|
mark
| null |
def mark(self, channel, ts):
return self.post('im.mark', data={'channel': channel, 'ts': ts})
|
(self, channel, ts)
|
70,155 |
slacker
|
open
| null |
def open(self, user):
return self.post('im.open', data={'user': user})
|
(self, user)
|
70,157 |
slacker
|
replies
| null |
def replies(self, channel, thread_ts):
return self.get('im.replies',
params={'channel': channel, 'thread_ts': thread_ts})
|
(self, channel, thread_ts)
|
70,158 |
slacker
|
IncomingWebhook
| null |
class IncomingWebhook(object):
def __init__(self, url=None, timeout=DEFAULT_TIMEOUT, proxies=None):
self.url = url
self.timeout = timeout
self.proxies = proxies
def post(self, data):
"""
Posts message with payload formatted in accordance with
this documentation https://api.slack.com/incoming-webhooks
"""
if not self.url:
raise Error('URL for incoming webhook is undefined')
return requests.post(self.url, data=json.dumps(data),
timeout=self.timeout, proxies=self.proxies)
|
(url=None, timeout=10, proxies=None)
|
70,159 |
slacker
|
__init__
| null |
def __init__(self, url=None, timeout=DEFAULT_TIMEOUT, proxies=None):
self.url = url
self.timeout = timeout
self.proxies = proxies
|
(self, url=None, timeout=10, proxies=None)
|
70,160 |
slacker
|
post
|
Posts message with payload formatted in accordance with
this documentation https://api.slack.com/incoming-webhooks
|
def post(self, data):
"""
Posts message with payload formatted in accordance with
this documentation https://api.slack.com/incoming-webhooks
"""
if not self.url:
raise Error('URL for incoming webhook is undefined')
return requests.post(self.url, data=json.dumps(data),
timeout=self.timeout, proxies=self.proxies)
|
(self, data)
|
70,161 |
slacker
|
MPIM
| null |
class MPIM(BaseAPI):
def open(self, users):
if isinstance(users, (tuple, list)):
users = ','.join(users)
return self.post('mpim.open', data={'users': users})
def close(self, channel):
return self.post('mpim.close', data={'channel': channel})
def mark(self, channel, ts):
return self.post('mpim.mark', data={'channel': channel, 'ts': ts})
def list(self):
return self.get('mpim.list')
def history(self, channel, latest=None, oldest=None, inclusive=False,
count=None, unreads=False):
return self.get('mpim.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
'inclusive': int(inclusive),
'count': count,
'unreads': int(unreads)
})
def replies(self, channel, thread_ts):
return self.get('mpim.replies',
params={'channel': channel, 'thread_ts': thread_ts})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,166 |
slacker
|
close
| null |
def close(self, channel):
return self.post('mpim.close', data={'channel': channel})
|
(self, channel)
|
70,168 |
slacker
|
history
| null |
def history(self, channel, latest=None, oldest=None, inclusive=False,
count=None, unreads=False):
return self.get('mpim.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
'inclusive': int(inclusive),
'count': count,
'unreads': int(unreads)
})
|
(self, channel, latest=None, oldest=None, inclusive=False, count=None, unreads=False)
|
70,169 |
slacker
|
list
| null |
def list(self):
return self.get('mpim.list')
|
(self)
|
70,170 |
slacker
|
mark
| null |
def mark(self, channel, ts):
return self.post('mpim.mark', data={'channel': channel, 'ts': ts})
|
(self, channel, ts)
|
70,171 |
slacker
|
open
| null |
def open(self, users):
if isinstance(users, (tuple, list)):
users = ','.join(users)
return self.post('mpim.open', data={'users': users})
|
(self, users)
|
70,173 |
slacker
|
replies
| null |
def replies(self, channel, thread_ts):
return self.get('mpim.replies',
params={'channel': channel, 'thread_ts': thread_ts})
|
(self, channel, thread_ts)
|
70,174 |
slacker
|
Migration
| null |
class Migration(BaseAPI):
def exchange(self, users, to_old=False):
if isinstance(users, (list, tuple)):
users = ','.join(users)
return self.get(
'migration.exchange', params={'users': users, 'to_old': to_old}
)
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,179 |
slacker
|
exchange
| null |
def exchange(self, users, to_old=False):
if isinstance(users, (list, tuple)):
users = ','.join(users)
return self.get(
'migration.exchange', params={'users': users, 'to_old': to_old}
)
|
(self, users, to_old=False)
|
70,182 |
slacker
|
OAuth
| null |
class OAuth(BaseAPI):
def access(self, client_id, client_secret, code, redirect_uri=None):
return self.post('oauth.access',
data={
'client_id': client_id,
'client_secret': client_secret,
'code': code,
'redirect_uri': redirect_uri
})
def token(self, client_id, client_secret, code, redirect_uri=None,
single_channel=None):
return self.post('oauth.token',
data={
'client_id': client_id,
'client_secret': client_secret,
'code': code,
'redirect_uri': redirect_uri,
'single_channel': single_channel,
})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,187 |
slacker
|
access
| null |
def access(self, client_id, client_secret, code, redirect_uri=None):
return self.post('oauth.access',
data={
'client_id': client_id,
'client_secret': client_secret,
'code': code,
'redirect_uri': redirect_uri
})
|
(self, client_id, client_secret, code, redirect_uri=None)
|
70,190 |
slacker
|
token
| null |
def token(self, client_id, client_secret, code, redirect_uri=None,
single_channel=None):
return self.post('oauth.token',
data={
'client_id': client_id,
'client_secret': client_secret,
'code': code,
'redirect_uri': redirect_uri,
'single_channel': single_channel,
})
|
(self, client_id, client_secret, code, redirect_uri=None, single_channel=None)
|
70,191 |
slacker
|
Pins
| null |
class Pins(BaseAPI):
def add(self, channel, file_=None, file_comment=None, timestamp=None):
# One of file, file_comment, or timestamp must also be specified
assert file_ or file_comment or timestamp
return self.post('pins.add',
data={
'channel': channel,
'file': file_,
'file_comment': file_comment,
'timestamp': timestamp,
})
def remove(self, channel, file_=None, file_comment=None, timestamp=None):
# One of file, file_comment, or timestamp must also be specified
assert file_ or file_comment or timestamp
return self.post('pins.remove',
data={
'channel': channel,
'file': file_,
'file_comment': file_comment,
'timestamp': timestamp,
})
def list(self, channel):
return self.get('pins.list', params={'channel': channel})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,196 |
slacker
|
add
| null |
def add(self, channel, file_=None, file_comment=None, timestamp=None):
# One of file, file_comment, or timestamp must also be specified
assert file_ or file_comment or timestamp
return self.post('pins.add',
data={
'channel': channel,
'file': file_,
'file_comment': file_comment,
'timestamp': timestamp,
})
|
(self, channel, file_=None, file_comment=None, timestamp=None)
|
70,198 |
slacker
|
list
| null |
def list(self, channel):
return self.get('pins.list', params={'channel': channel})
|
(self, channel)
|
70,200 |
slacker
|
remove
| null |
def remove(self, channel, file_=None, file_comment=None, timestamp=None):
# One of file, file_comment, or timestamp must also be specified
assert file_ or file_comment or timestamp
return self.post('pins.remove',
data={
'channel': channel,
'file': file_,
'file_comment': file_comment,
'timestamp': timestamp,
})
|
(self, channel, file_=None, file_comment=None, timestamp=None)
|
70,201 |
slacker
|
Presence
| null |
class Presence(BaseAPI):
AWAY = 'away'
ACTIVE = 'active'
TYPES = (AWAY, ACTIVE)
def set(self, presence):
assert presence in Presence.TYPES, 'Invalid presence type'
return self.post('presence.set', data={'presence': presence})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,208 |
slacker
|
set
| null |
def set(self, presence):
assert presence in Presence.TYPES, 'Invalid presence type'
return self.post('presence.set', data={'presence': presence})
|
(self, presence)
|
70,209 |
slacker
|
RTM
| null |
class RTM(BaseAPI):
def start(self, simple_latest=False, no_unreads=False, mpim_aware=False):
return self.get('rtm.start',
params={
'simple_latest': int(simple_latest),
'no_unreads': int(no_unreads),
'mpim_aware': int(mpim_aware),
})
def connect(self):
return self.get('rtm.connect')
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,214 |
slacker
|
connect
| null |
def connect(self):
return self.get('rtm.connect')
|
(self)
|
70,217 |
slacker
|
start
| null |
def start(self, simple_latest=False, no_unreads=False, mpim_aware=False):
return self.get('rtm.start',
params={
'simple_latest': int(simple_latest),
'no_unreads': int(no_unreads),
'mpim_aware': int(mpim_aware),
})
|
(self, simple_latest=False, no_unreads=False, mpim_aware=False)
|
70,218 |
slacker
|
Reactions
| null |
class Reactions(BaseAPI):
def add(self, name, file_=None, file_comment=None, channel=None,
timestamp=None):
# One of file, file_comment, or the combination of channel and timestamp
# must be specified
assert (file_ or file_comment) or (channel and timestamp)
return self.post('reactions.add',
data={
'name': name,
'file': file_,
'file_comment': file_comment,
'channel': channel,
'timestamp': timestamp,
})
def get(self, file_=None, file_comment=None, channel=None, timestamp=None,
full=None):
return super(Reactions, self).get('reactions.get',
params={
'file': file_,
'file_comment': file_comment,
'channel': channel,
'timestamp': timestamp,
'full': full,
})
def list(self, user=None, full=None, count=None, page=None):
return super(Reactions, self).get('reactions.list',
params={
'user': user,
'full': full,
'count': count,
'page': page,
})
def remove(self, name, file_=None, file_comment=None, channel=None,
timestamp=None):
# One of file, file_comment, or the combination of channel and timestamp
# must be specified
assert (file_ or file_comment) or (channel and timestamp)
return self.post('reactions.remove',
data={
'name': name,
'file': file_,
'file_comment': file_comment,
'channel': channel,
'timestamp': timestamp,
})
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,223 |
slacker
|
add
| null |
def add(self, name, file_=None, file_comment=None, channel=None,
timestamp=None):
# One of file, file_comment, or the combination of channel and timestamp
# must be specified
assert (file_ or file_comment) or (channel and timestamp)
return self.post('reactions.add',
data={
'name': name,
'file': file_,
'file_comment': file_comment,
'channel': channel,
'timestamp': timestamp,
})
|
(self, name, file_=None, file_comment=None, channel=None, timestamp=None)
|
70,224 |
slacker
|
get
| null |
def get(self, file_=None, file_comment=None, channel=None, timestamp=None,
full=None):
return super(Reactions, self).get('reactions.get',
params={
'file': file_,
'file_comment': file_comment,
'channel': channel,
'timestamp': timestamp,
'full': full,
})
|
(self, file_=None, file_comment=None, channel=None, timestamp=None, full=None)
|
70,225 |
slacker
|
list
| null |
def list(self, user=None, full=None, count=None, page=None):
return super(Reactions, self).get('reactions.list',
params={
'user': user,
'full': full,
'count': count,
'page': page,
})
|
(self, user=None, full=None, count=None, page=None)
|
70,227 |
slacker
|
remove
| null |
def remove(self, name, file_=None, file_comment=None, channel=None,
timestamp=None):
# One of file, file_comment, or the combination of channel and timestamp
# must be specified
assert (file_ or file_comment) or (channel and timestamp)
return self.post('reactions.remove',
data={
'name': name,
'file': file_,
'file_comment': file_comment,
'channel': channel,
'timestamp': timestamp,
})
|
(self, name, file_=None, file_comment=None, channel=None, timestamp=None)
|
70,228 |
slacker
|
Reminders
| null |
class Reminders(BaseAPI):
def add(self, text, time, user=None):
return self.post('reminders.add', data={
'text': text,
'time': time,
'user': user,
})
def complete(self, reminder):
return self.post('reminders.complete', data={'reminder': reminder})
def delete(self, reminder):
return self.post('reminders.delete', data={'reminder': reminder})
def info(self, reminder):
return self.get('reminders.info', params={'reminder': reminder})
def list(self):
return self.get('reminders.list')
|
(token=None, timeout=10, proxies=None, session=None, rate_limit_retries=0)
|
70,233 |
slacker
|
add
| null |
def add(self, text, time, user=None):
return self.post('reminders.add', data={
'text': text,
'time': time,
'user': user,
})
|
(self, text, time, user=None)
|
70,234 |
slacker
|
complete
| null |
def complete(self, reminder):
return self.post('reminders.complete', data={'reminder': reminder})
|
(self, reminder)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.