# gsheet-api-helper

> Google Spreadsheet API Helper is a Node.js package that provides a helper for simplifies the process of accessing, retrieving and updating data from Gsheet using the Gsheet API.

Latest version **0.2.0** (published 2023-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install gsheet-api-helper
pnpm add gsheet-api-helper
yarn add gsheet-api-helper
bun add gsheet-api-helper
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-07-10 |
| First published | 2023-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tedante |

## Links

- npm: https://www.npmjs.com/package/gsheet-api-helper
- npm.io page: https://npm.io/package/gsheet-api-helper

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.0

## Recent versions

- 0.2.0 (latest) — 2023-07-10
- 0.1.0 — 2023-05-13

## README

# Google Spreadsheet API Helper

Google Spreadsheet API Helper is a Node.js package that provides a helper for simplifies the process of accessing, retrieving and updating data from Gsheet using the Gsheet API.

# Prerequesite

- Create OAuth 2.0 Google [click here](https://support.google.com/workspacemigrate/answer/9222992?hl=en)
- Invite **iam account** to the spreadsheet you want to access

## Installation

To install the package, you can use npm:

```bash
npm install gsheet-api-helper
```

## The Basic
```js
import GoogleSheetHelper from 'GoogleSheetHelper';

const gsheet = new GoogleSheetHelper(<googleApisIss>, <googleApisPrivateKey>);
```

## Get Data
```js
const response = gsheet.get(<sheetId>, <sheetName>, <range>);

console.log(response) // <-- see the response

console.log(response.values) // <-- get the values
```

Example Response:
```json
{
  range: '<sheetName>!<range>',
  majorDimension: 'ROWS',
  values: [<data>]
}
```

## Batch Update
```js
const response = gsheet.batchUpdate(<sheetId>, <sheetName>, <range>, <values>);

console.log(response) // <-- see the response

console.log(response.values) // <-- get the values
```

## Append
```js
const response = gsheet.append(<sheetId>, <sheetName>, <values>);

console.log(response) // <-- see the response

console.log(response.values) // <-- get the values
```

---
_Source: https://npm.io/package/gsheet-api-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
