Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
osaton committed Mar 18, 2020
1 parent af7ad47 commit 6bd2848
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<dl>
<dt><a href="#ResultObj">ResultObj</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#ProgressOptions">ProgressOptions</a></dt>
<dd></dd>
<dt><a href="#FileHeaderSettings">FileHeaderSettings</a> : <code>Object</code></dt>
<dd><p>Key / value pairs of wanted header names and their values</p>
</dd>
Expand Down Expand Up @@ -188,6 +190,8 @@ Delete files
| files | <code>Array.&lt;string&gt;</code> | | Array of file ids |
| options | <code>Object</code> | | |
| [options.throttle] | <code>number</code> | <code>1</code> | Number of concurrent delete file requests. Max 5 |
| [options.showProgress] | <code>number</code> | <code>false</code> | Number of concurrent delete file requests. Max 5 |
| [options.progressOptions] | [<code>ProgressOptions</code>](#ProgressOptions) | | Progress bar options |

<a name="StudioHelper+uploadFiles"></a>

Expand Down Expand Up @@ -372,6 +376,27 @@ Batch upload/replace files
| code | <code>number</code> | 0 for success |
| result | <code>string</code> \| <code>Object</code> \| <code>Array</code> \| <code>boolean</code> | Results |

<a name="ProgressOptions"></a>

## ProgressOptions
**Kind**: global typedef

| Param | Type |
| --- | --- |
| title | <code>string</code> |
| total | <code>number</code> |
| options | [<code>ProgressOptions</code>](#ProgressOptions) |

**Properties**

| Name | Type |
| --- | --- |
| complete | <code>string</code> |
| incomplete | <code>string</code> |
| width | <code>number</code> |
| clear | <code>boolean</code> |
| total | <code>number</code> |

<a name="FileHeaderSettings"></a>

## FileHeaderSettings : <code>Object</code>
Expand Down
13 changes: 13 additions & 0 deletions StudioHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,18 @@ class StudioHelper {
return Promise.reject(results);
}

/**
* @typedef ProgressOptions
* @property {string} complete
* @property {string} incomplete
* @property {number} width
* @property {boolean} clear
* @property {number} total
*
* @param {string} title
* @param {number} total
* @param {ProgressOptions} options
*/
_showProgressBar(title, total, options = {}) {
let columns = process.stdout.columns || 100

Expand Down Expand Up @@ -1002,6 +1014,7 @@ class StudioHelper {
* @param {Object} options
* @param {number} [options.throttle=1] - Number of concurrent delete file requests. Max 5
* @param {number} [options.showProgress=false] - Number of concurrent delete file requests. Max 5
* @param {ProgressOptions} [options.progressOptions] - Progress bar options
* @return {Promise<Object>}
**/
deleteFiles(files, options = {}) {
Expand Down

0 comments on commit 6bd2848

Please sign in to comment.