diff --git a/docs/classes/google-spreadsheet-cell.md b/docs/classes/google-spreadsheet-cell.md index 0a8f329..e7d1301 100644 --- a/docs/classes/google-spreadsheet-cell.md +++ b/docs/classes/google-spreadsheet-cell.md @@ -96,18 +96,18 @@ Property|Type|Description **This is still only a local change which must still be saved** -- :sparkles: **Side effects** - all user entered format settings are cleared (locally) +- ✨ **Side effects** - all user entered format settings are cleared (locally) #### `discardUnsavedChanges()` :id=fn-discardUnsavedChanges > Discard all unsaved changes - includes value, notes, and formatting -- :sparkles: **Side effects** - cell will no longer be considered "dirty" and unsaved changes are discarded +- ✨ **Side effects** - cell will no longer be considered "dirty" and unsaved changes are discarded #### `save()` (async) :id=fn-save > Save this individual cell -- :sparkles: **Side effects** - updates are saved and everything re-fetched from google +- ✨ **Side effects** - updates are saved and everything re-fetched from google ?> Usually makes more sense to use `sheet.saveUpdatedCells()` to save many cell updates at once diff --git a/docs/classes/google-spreadsheet-row.md b/docs/classes/google-spreadsheet-row.md index b59c914..4406f9a 100644 --- a/docs/classes/google-spreadsheet-row.md +++ b/docs/classes/google-spreadsheet-row.md @@ -79,13 +79,13 @@ await row.save(); // cell will now contain the value "ASDF", not the formula #### `save()` (async) :id=fn-save > Save any updates made to row values -- :sparkles: **Side effects** - updates are saved and everything re-fetched from google +- ✨ **Side effects** - updates are saved and everything re-fetched from google #### `delete()` (async) :id=fn-delete > Delete this row -- :sparkles: **Side effects** - Row is removed from the sheet +- ✨ **Side effects** - Row is removed from the sheet _also available as `_row.del()`_ diff --git a/docs/classes/google-spreadsheet-worksheet.md b/docs/classes/google-spreadsheet-worksheet.md index fbb6cc1..2520a9f 100644 --- a/docs/classes/google-spreadsheet-worksheet.md +++ b/docs/classes/google-spreadsheet-worksheet.md @@ -66,7 +66,7 @@ The row-based interface is provided as a simplified way to deal with sheets that #### `loadHeaderRow()` (async) :id=fn-loadHeaderRow > Loads the header row (first row) of the sheet _usually do not need to call this directly_ -- :sparkles: **Side effects** - `sheet.headerValues` is populated +- ✨ **Side effects** - `sheet.headerValues` is populated #### `setHeaderRow(headerValues)` (async) :id=fn-setHeaderRow > Set the header row (first row) of the sheet @@ -75,7 +75,7 @@ Param|Type|Required|Description ---|---|---|--- `headerValues`|[String]|✅|Array of strings to set as cell values in first row -- :sparkles: **Side effects** - first row of the sheet is filled, `sheet.headerValues` is populated +- ✨ **Side effects** - first row of the sheet is filled, `sheet.headerValues` is populated #### `addRow(rowValues)` (async) :id=fn-addRow > Append a new row to the sheet @@ -87,8 +87,8 @@ Param|Type|Required|Description -- :leftwards_arrow_with_hook: **Returns** - [GoogleSpreadsheetRow](classes/google-spreadsheet-row) (in a promise) -- :sparkles: **Side effects** - row is added to the sheet +- ↩️ **Returns** - [GoogleSpreadsheetRow](classes/google-spreadsheet-row) (in a promise) +- ✨ **Side effects** - row is added to the sheet #### `addRows(arrayOfRowValues)` (async) :id=fn-addRows @@ -98,8 +98,8 @@ Param|Type|Required|Description ---|---|---|--- `arrayOfRowValues`|Array|✅|Array of rows values to append to the sheet
_see [`sheet.addRow()`](#fn-addRow) above for more info_ -- :leftwards_arrow_with_hook: **Returns** - [[GoogleSpreadsheetRow](classes/google-spreadsheet-row)] (in a promise) -- :sparkles: **Side effects** - rows are added to the sheet +- ↩️ **Returns** - [[GoogleSpreadsheetRow](classes/google-spreadsheet-row)] (in a promise) +- ✨ **Side effects** - rows are added to the sheet #### `getRows(options)` (async) :id=fn-getRows @@ -111,8 +111,8 @@ Param|Type|Required|Description `options.offset`|Number
_int >= 0_|-|How many rows to skip from the top `options.limit`|Number
_int > 0_|-|Max number of rows to fetch -- :leftwards_arrow_with_hook: **Returns** - [[GoogleSpreadsheetRow](classes/google-spreadsheet-row)] (in a promise) -- :sparkles: **Side effects** - row is added to the sheet +- ↩️ **Returns** - [[GoogleSpreadsheetRow](classes/google-spreadsheet-row)] (in a promise) +- ✨ **Side effects** - row is added to the sheet !> The older version of this module allowed you to filter and order the rows as you fetched them, but this is no longer supported by google @@ -140,7 +140,7 @@ Param|Type|Required|Description ---|---|---|--- `filters`|*|-|Can be a single filter or array of filters -- :sparkles: **Side effects** - cells are loaded in the doc, `cellStats` is updated +- ✨ **Side effects** - cells are loaded in the doc, `cellStats` is updated #### `getCell(rowIndex, columnIndex)` :id=fn-getCell @@ -151,7 +151,7 @@ Param|Type|Required|Description `rowIndex`|Number
_int >= 0_|✅|Row of the cell `columnIndex`|Number
_int >= 0_|✅|Column of the cell to retrieve -- :leftwards_arrow_with_hook: **Returns** - [GoogleSpreadsheetCell](classes/google-spreadsheet-cell) +- ↩️ **Returns** - [GoogleSpreadsheetCell](classes/google-spreadsheet-cell) #### `getCellByA1(a1Address)` :id=fn-getCellByA1 @@ -161,24 +161,25 @@ Param|Type|Required|Description ---|---|---|--- `a1Address`|String|✅|Address of the cell
_ex: "B5"_ -- :leftwards_arrow_with_hook: **Returns** - [GoogleSpreadsheetCell](classes/google-spreadsheet-cell) +- ↩️ **Returns** - [GoogleSpreadsheetCell](classes/google-spreadsheet-cell) #### `saveUpdatedCells()` (async) :id=fn-saveUpdatedCells -> saves all cells that have unsaved changes +> saves all cells in the sheet that have unsaved changes -- :sparkles: **Side effects** - cells are saved, data refreshed from google +- ✨ **Side effects** - cells are saved, data refreshed from google #### `saveCells(cells)` (async) :id=fn-saveCells -> saves all cells that have unsaved changes +> saves specific cells Param|Type|Required|Description ---|---|---|--- `cells`|[[GoogleSpreadsheetCell](classes/google-spreadsheet-cell)]|✅|Array of cells to save -- :sparkles: **Side effects** - cells are saved, data refreshed from google +- 🚨 **Warning** - At least one cell must have something to save +- ✨ **Side effects** - cells are saved, data refreshed from google -?> Easier to just use `sheet.saveUpdatedCells` +?> Usually easier to just use `sheet.saveUpdatedCells` #### `resetLocalCache(dataOnly)` :id=fn-resetLocalCache @@ -188,7 +189,7 @@ Param|Type|Required|Description ---|---|---|--- `dataOnly`|Boolean|-|If true, only affects data, not properties -- :sparkles: **Side effects** - cache is emptied so props and cells must be re-fetched +- ✨ **Side effects** - cache is emptied so props and cells must be re-fetched @@ -200,7 +201,7 @@ Param|Type|Required|Description For example: `await sheet.updateProperties({ title: 'New sheet title' });`
See [basic sheet properties](#basic-sheet-properties) above for props documentation. -- :sparkles: **Side Effects -** props are updated +- ✨ **Side Effects -** props are updated #### `resize(props)` (async) :id=fn-resize > Update grid properties / dimensions @@ -208,7 +209,7 @@ See [basic sheet properties](#basic-sheet-properties) above for props documentat Just a shorcut for `(props) => sheet.updateProperties({ gridProperties: props })`
Example: `await sheet.resize({ rowCount: 1000, columnCount: 20 });` -- :sparkles: **Side Effects -** grid properties / dimensions are updated +- ✨ **Side Effects -** grid properties / dimensions are updated _also available as `sheet.updateGridProperties()`_ @@ -223,7 +224,7 @@ Param|Type|Required|Description `bounds.startIndex`|Number
_int >= 0_|-|Start row/column `bounds.endIndex`|Number
_int >= 0_|-|End row/column -- :sparkles: **Side effects** - sheet is updated +- ✨ **Side effects** - sheet is updated ### Other @@ -231,12 +232,12 @@ Param|Type|Required|Description #### `clear()` (async) :id=fn-clear > Clear all data/cells in the sheet -- :sparkles: **Side Effects -** clears the entire sheet, resets local cache +- ✨ **Side Effects -** clears the entire sheet, resets local cache #### `delete()` (async) :id=fn-delete > Delete this sheet -- :sparkles: **Side Effects -** sheet is deleted and removed from `doc.sheetsById` and `doc.sheetsByIndex` +- ✨ **Side Effects -** sheet is deleted and removed from `doc.sheetsById` and `doc.sheetsByIndex` _also available as `sheet.del()`_ @@ -247,7 +248,7 @@ Param|Type|Required|Description ---|---|---|--- `destinationSpreadsheetId`|String|✅|ID of another spreadsheet document -- :sparkles: **Side Effects -** sheet is copied to the other doc +- ✨ **Side Effects -** sheet is copied to the other doc ?> The authentication method being used must have access to the destination document as well diff --git a/docs/classes/google-spreadsheet.md b/docs/classes/google-spreadsheet.md index aa56a84..63d695e 100644 --- a/docs/classes/google-spreadsheet.md +++ b/docs/classes/google-spreadsheet.md @@ -58,7 +58,7 @@ Param|Type|Required|Description `creds.client_email`|String
_email_|✅|The email of your service account `creds.private_key`|String|✅|The private key for your service account -- :sparkles: **Side effects** - all requests will now authenticate using these credentials +- ✨ **Side effects** - all requests will now authenticate using these credentials > See [Getting Started > Authentication](getting-started/authentication) for more details @@ -70,7 +70,7 @@ Param|Type|Required|Description ---|---|---|--- `key`|String|✅|API key for your google project -- :sparkles: **Side effects** - all requests will now authenticate using this api key only +- ✨ **Side effects** - all requests will now authenticate using this api key only > See [Getting Started > Authentication](getting-started/authentication) for more details @@ -80,7 +80,7 @@ Param|Type|Required|Description #### `loadInfo()` (async) :id=fn-loadInfo > Load basic document props and child sheets -- :sparkles: **Side Effects -** props are populated, sheets are populated +- ✨ **Side Effects -** props are populated, sheets are populated #### `updateProperties(props)` (async) :id=fn-updateProperties > Update basic document properties @@ -91,7 +91,7 @@ await doc.updateProperties({ title: 'New title' }); ``` See [basic document properties](#basic-document-properties) above for props documentation. -- :sparkles: **Side Effects -** props are updated +- ✨ **Side Effects -** props are updated #### `resetLocalCache()` :id=fn-resetLocalCache @@ -99,7 +99,7 @@ See [basic document properties](#basic-document-properties) above for props docu You must call `loadInfo()` again to re-load the properties and sheets -- :sparkles: **Side Effects -** basic props and sheets are gone +- ✨ **Side Effects -** basic props and sheets are gone ### Managing Sheets @@ -115,8 +115,8 @@ Param|Type|Required|Description `props.[more]`|...|-|_See [GoogleSpreadsheetWorksheet](classes/google-spreadsheet-worksheet#basic-document-properties) for more props_ -- :leftwards_arrow_with_hook: **Returns** - [GoogleSpreadsheetWorksheet](classes/google-spreadsheet-worksheet) (in a promise) -- :sparkles: **Side effects** - new sheet is now added to `doc.sheetsByIndex` and `doc.sheetsById` +- ↩️ **Returns** - [GoogleSpreadsheetWorksheet](classes/google-spreadsheet-worksheet) (in a promise) +- ✨ **Side effects** - new sheet is now added to `doc.sheetsByIndex` and `doc.sheetsById` _Also available as `addWorksheet()`_ @@ -128,7 +128,7 @@ Param|Type|Required|Description ---|---|---|--- `sheetId`|String|✅|ID of the sheet to remove -- :sparkles: **Side effects** - sheet is removed from `doc.sheetsByIndex` and `doc.sheetsById` +- ✨ **Side effects** - sheet is removed from `doc.sheetsByIndex` and `doc.sheetsById` ?> **TIP** - Usually easier to use GoogleSpreadsheetWorksheet instance method `delete()`