from .base import Base
[docs]class Files(Base):
endpoint = '/files'
[docs] def upload_file(self, channel_id, files):
return self.client.post(
self.endpoint,
data={'channel_id': channel_id},
files=files
)
[docs] def get_file(self, file_id):
return self.client.get(
self.endpoint + '/' + file_id,
)
[docs] def get_file_thumbnail(self, file_id):
return self.client.get(
self.endpoint + '/' + file_id + '/thumbnail',
)
[docs] def get_file_preview(self, file_id):
return self.client.get(
self.endpoint + '/' + file_id + '/preview',
)
[docs] def get_public_file_link(self, file_id):
return self.client.get(
self.endpoint + '/' + file_id + '/link',
)