def __call__(self, data): response = requests_post(self._api_url, headers={'Content-Type': data['type']}, data=data['content']) response.raise_for_status() return { 'filename': change_ext(data['filename'], None, '.xml'), 'content': response.text, 'type': response.headers['Content-Type'] }
def __call__(self, data): return { 'filename': change_ext(data['filename'], None, '.pdf'), 'content': doc_to_pdf(data['content'], data['type']), 'type': MimeTypes.PDF }
def __call__(self, data): return { 'filename': change_ext(data['filename'], None, '.docx'), 'content': doc_to_docx(data['content'], data['type']), 'type': MimeTypes.DOCX }