From 3d554be4b98f8995af41bdeca060a623273e4126 Mon Sep 17 00:00:00 2001 From: Andrey Ponomarenko Date: Wed, 25 Nov 2020 11:19:00 +0300 Subject: [PATCH] fix: fix docs --- readme.md | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index a9e15f1..2efb46a 100644 --- a/readme.md +++ b/readme.md @@ -18,15 +18,46 @@ All options except token and file are optional. ```js import { upload } from 'diawi-nodejs-uploader'; -await upload({ - file, - token, - }, { - onStatusProgress: console.log, - onUploadProgress: console.log, - }) +const result = await upload({ + file: '/files/bundle.apk', + token: 'token', + }); +console.log(result); ``` +Full example + +```js +import { upload } from 'diawi-nodejs-uploader'; + +const result = await upload({ + file: '/file/bundle.apk', + token: 'token', + callback_emails: 'email@mail.com', + callback_url: 'myUrl.com/cb', + comment: 'comment text', + find_by_udid: true, + installation_notifications: true, + password: 'passwordForBundle', + wall_of_apps: true, +}, { + apiUploadEndpoint: 'rewriteDefauitDiawiUploadEndpoint', + apiStatusEndpoint: 'rewriteDefauitDiawiStatusEndpoint', + maxApiStatusCalls: 99, + onUploadProgress: (progressPercent) => { + console.log(`uploading: ${progressPercent}`); + }, + onStatusProgress: (status) => { + console.log(`status: ${status}`); + }, +}); + +console.log(result); +``` + + + + #### CLI ```js