itransferwee.py: Delete all commented JSON response examples - transferwee - Download/upload file via wetransfer.com Err tccr.it 70 hgit clone https://github.com/iamleot/transferwee URL:https://github.com/iamleot/transferwee tccr.it 70 1Log /r/transferwee/log.gph tccr.it 70 1Files /r/transferwee/files.gph tccr.it 70 1Refs /r/transferwee/refs.gph tccr.it 70 1README /r/transferwee/file/README.md.gph tccr.it 70 i--- Err tccr.it 70 1commit bc502b6b7558d6583b79edeb3c528bc996b4e49a /r/transferwee/commit/bc502b6b7558d6583b79edeb3c528bc996b4e49a.gph tccr.it 70 1parent 552965b43fb08c01ea2607112146482d50ca9519 /r/transferwee/commit/552965b43fb08c01ea2607112146482d50ca9519.gph tccr.it 70 hAuthor: Leonardo Taccari URL:mailto:iamleot@gmail.com tccr.it 70 iDate: Tue, 8 May 2018 00:41:09 +0200 Err tccr.it 70 i Err tccr.it 70 itransferwee.py: Delete all commented JSON response examples Err tccr.it 70 i Err tccr.it 70 iThey are not very useful and if we decide to document the API it is probably a Err tccr.it 70 ibetter idea to do that on a separate text file (not directly via comments). Err tccr.it 70 i Err tccr.it 70 iDiffstat: Err tccr.it 70 i M transferwee.py | 91 ------------------------------- Err tccr.it 70 i Err tccr.it 70 i1 file changed, 0 insertions(+), 91 deletions(-) Err tccr.it 70 i--- Err tccr.it 70 1diff --git a/transferwee.py b/transferwee.py /r/transferwee/file/transferwee.py.gph tccr.it 70 i@@ -103,30 +103,6 @@ def _prepare_email_upload(filenames: List[str], message: str, Err tccr.it 70 i the email upload. Err tccr.it 70 i Err tccr.it 70 i Return the parsed JSON response. Err tccr.it 70 i- Err tccr.it 70 i- A successfull response is of the following form: Err tccr.it 70 i- Err tccr.it 70 i- { Err tccr.it 70 i- "id": transfer_id, Err tccr.it 70 i- "security_hash": security_hash, Err tccr.it 70 i- ..., Err tccr.it 70 i- "message": message, Err tccr.it 70 i- ..., Err tccr.it 70 i- "files": [ Err tccr.it 70 i- { Err tccr.it 70 i- "id": file_id, Err tccr.it 70 i- "name": filename, Err tccr.it 70 i- ..., Err tccr.it 70 i- "size": 0, Err tccr.it 70 i- "chunk_size": 5242880 Err tccr.it 70 i- } Err tccr.it 70 i- ], Err tccr.it 70 i- "recipients": [ Err tccr.it 70 i- ..., Err tccr.it 70 i- "email": recipient_email, Err tccr.it 70 i- ..., Err tccr.it 70 i- ] Err tccr.it 70 i- } Err tccr.it 70 i """ Err tccr.it 70 i j = { Err tccr.it 70 i "filenames": filenames, Err tccr.it 70 i@@ -144,28 +120,6 @@ def _prepare_link_upload(filenames: List[str], message: str) -> str: Err tccr.it 70 i """Given a list of filenames and a message prepare for the link upload. Err tccr.it 70 i Err tccr.it 70 i Return the parsed JSON response. Err tccr.it 70 i- Err tccr.it 70 i- A successfull response is of the following form: Err tccr.it 70 i- Err tccr.it 70 i- { Err tccr.it 70 i- "id": transfer_id, Err tccr.it 70 i- "security_hash": security_hash, Err tccr.it 70 i- ..., Err tccr.it 70 i- "message": message, Err tccr.it 70 i- ..., Err tccr.it 70 i- "files": [ Err tccr.it 70 i- { Err tccr.it 70 i- "id": file_id, Err tccr.it 70 i- "name": filename, Err tccr.it 70 i- ..., Err tccr.it 70 i- "size": 0, Err tccr.it 70 i- "chunk_size": 5242880 Err tccr.it 70 i- } Err tccr.it 70 i- ], Err tccr.it 70 i- "recipients": [ Err tccr.it 70 i- ... Err tccr.it 70 i- ] Err tccr.it 70 i- } Err tccr.it 70 i """ Err tccr.it 70 i j = { Err tccr.it 70 i "filenames": filenames, Err tccr.it 70 i@@ -181,16 +135,6 @@ def _prepare_file_upload(transfer_id: str, file: str) -> str: Err tccr.it 70 i """Given a transfer_id and file prepare it for the upload. Err tccr.it 70 i Err tccr.it 70 i Return the parsed JSON response. Err tccr.it 70 i- Err tccr.it 70 i- A successfull response is of the following form: Err tccr.it 70 i- Err tccr.it 70 i- { Err tccr.it 70 i- "id": file_id, Err tccr.it 70 i- "name": filename, Err tccr.it 70 i- ..., Err tccr.it 70 i- "size": filesize, Err tccr.it 70 i- "chunk_size": 5242880 Err tccr.it 70 i- } Err tccr.it 70 i """ Err tccr.it 70 i filename = os.path.basename(file) Err tccr.it 70 i filesize = os.path.getsize(file) Err tccr.it 70 i@@ -209,16 +153,6 @@ def _upload_chunks(transfer_id: str, file_id: str, file: str, Err tccr.it 70 i """Given a transfer_id, file_id and file upload it. Err tccr.it 70 i Err tccr.it 70 i Return the parsed JSON response. Err tccr.it 70 i- Err tccr.it 70 i- A successfull response is of the following form: Err tccr.it 70 i- Err tccr.it 70 i- { Err tccr.it 70 i- "id": file_id, Err tccr.it 70 i- "name": filename, Err tccr.it 70 i- ..., Err tccr.it 70 i- "size": filesize, Err tccr.it 70 i- "chunk_size": 5242880 Err tccr.it 70 i- } Err tccr.it 70 i """ Err tccr.it 70 i f = open(file, 'rb') Err tccr.it 70 i Err tccr.it 70 i@@ -265,31 +199,6 @@ def _finalize_upload(transfer_id: str) -> str: Err tccr.it 70 i """Given a transfer_id finalize the upload. Err tccr.it 70 i Err tccr.it 70 i Return the parsed JSON response. Err tccr.it 70 i- Err tccr.it 70 i- A successfull response is of the following form: Err tccr.it 70 i- Err tccr.it 70 i- { Err tccr.it 70 i- "id": transfer_id, Err tccr.it 70 i- "security_hash": security_hash, Err tccr.it 70 i- ..., Err tccr.it 70 i- "shortened_url": shortened_url, Err tccr.it 70 i- "message": message, Err tccr.it 70 i- "expires_at": expires_at, Err tccr.it 70 i- ..., Err tccr.it 70 i- "files": [ Err tccr.it 70 i- { Err tccr.it 70 i- "id": file_id, Err tccr.it 70 i- "name": filename, Err tccr.it 70 i- ..., Err tccr.it 70 i- "size": filesize, Err tccr.it 70 i- "chunk_size", 5242880 Err tccr.it 70 i- }, Err tccr.it 70 i- ..., Err tccr.it 70 i- ], Err tccr.it 70 i- "recipients": [ Err tccr.it 70 i- ..., Err tccr.it 70 i- ] Err tccr.it 70 i- } Err tccr.it 70 i """ Err tccr.it 70 i r = requests.put(WETRANSFER_FINALIZE_URL.format(transfer_id=transfer_id)) Err tccr.it 70 i Err tccr.it 70 .