Socket
Socket
Sign inDemoInstall

gootenberg

Package Overview
Dependencies
127
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.3 to 1.5.0

docs/sheets.appendRows.md

31

dist/index.js

@@ -376,6 +376,35 @@ 'use strict';

function appendRows (spreadsheetId, values) {
var _this = this;
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$valueInputOption = _ref.valueInputOption,
valueInputOption = _ref$valueInputOption === void 0 ? 'RAW' : _ref$valueInputOption;
return new Promise(function (resolve, reject) {
_this.sheetsAPI.spreadsheets.values.append({
auth: _this.client,
spreadsheetId: spreadsheetId,
range: 'A1',
insertDataOption: 'INSERT_ROWS',
valueInputOption: valueInputOption,
resource: {
majorDimension: 'ROWS',
values: values
}
}, function (err, resp) {
if (err) {
reject(err);
} else {
resolve(resp.data);
}
});
});
}
var sheetsMethods = /*#__PURE__*/Object.freeze({
getAll: getAll
getAll: getAll,
appendRows: appendRows
});

@@ -382,0 +411,0 @@

@@ -372,6 +372,35 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';

function appendRows (spreadsheetId, values) {
var _this = this;
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$valueInputOption = _ref.valueInputOption,
valueInputOption = _ref$valueInputOption === void 0 ? 'RAW' : _ref$valueInputOption;
return new Promise(function (resolve, reject) {
_this.sheetsAPI.spreadsheets.values.append({
auth: _this.client,
spreadsheetId: spreadsheetId,
range: 'A1',
insertDataOption: 'INSERT_ROWS',
valueInputOption: valueInputOption,
resource: {
majorDimension: 'ROWS',
values: values
}
}, function (err, resp) {
if (err) {
reject(err);
} else {
resolve(resp.data);
}
});
});
}
var sheetsMethods = /*#__PURE__*/Object.freeze({
getAll: getAll
getAll: getAll,
appendRows: appendRows
});

@@ -378,0 +407,0 @@

2

package.json
{
"name": "gootenberg",
"version": "1.4.3",
"version": "1.5.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -60,2 +60,3 @@ ![POLITICO](https://www.politico.com/interactives/cdn/images/badge.svg)

### sheets
- [appendRows](docs/sheets.appendRows.md)
- [getAll](docs/sheets.getAll.md)

@@ -62,0 +63,0 @@

@@ -60,3 +60,2 @@ import expect from 'expect.js';

expect(files).to.be.an('array');
expect(files).to.have.length(5);

@@ -63,0 +62,0 @@ expect(!!find(files, { name: 'append' })).to.be(true);

export { default as getAll } from './getAll';
export { default as appendRows } from './appendRows';

@@ -8,2 +8,3 @@ import expect from 'expect.js';

forbidden: '1VbreUEtZ8DAD_6LCWSXqkWw-OPGfdalQamHH6zVINJ4',
appendRow: '1HDTu6MjRZdQbNlAbJNkVau2SsnKDVXWDP17Ace3-I4U',
};

@@ -46,2 +47,20 @@

});
it('Appends rows', async function() {
const now = new Date();
const data = [
[
now.getTime(),
now.getDate(),
now.getMonth() + 1,
now.getFullYear(),
],
];
await goot.sheets.appendRows(TEST_DOCS.appendRow, data);
const confirmData = await goot.parse.table(TEST_DOCS.appendRow);
const lastRow = confirmData.test[confirmData.test.length - 1];
expect(lastRow.time).to.be(`${data[0][0]}`);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc