# retrosheet-ts

> Thanks to : [Retrosheet by theApache64](https://github.com/theapache64/retrosheet)

Latest version **0.2.0-0** (published 2023-10-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install retrosheet-ts
pnpm add retrosheet-ts
yarn add retrosheet-ts
bun add retrosheet-ts
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0-0 |
| Published | 2023-10-28 |
| First published | 2023-08-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Yogesh Choudhary Paliyal |
| Maintainers | yogeshpaliyal |
| Keywords | retrosheet, google sheets, google forms, sheets db |

## Links

- npm: https://www.npmjs.com/package/retrosheet-ts
- Repository: git@yogesh.github.com:yogeshpaliyal/RetroSheet-TS
- Homepage: https://github.com/yogeshpaliyal/RetroSheet-TS
- Issues: https://github.com/yogeshpaliyal/RetroSheet-TS/issues
- npm.io page: https://npm.io/package/retrosheet-ts

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) 2.7.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.0-0 (latest) — 2023-10-28
- 0.1.3-0 — 2023-10-28
- 0.1.2-SNAPSHOT.1 — 2023-10-21
- 0.1.2 — 2023-09-08
- 0.1.1-testing.1 — 2023-09-06
- 0.1.1 — 2023-08-27
- 0.1.0 — 2023-08-27

## README

# RetroSheet-TS

Thanks to : [Retrosheet by theApache64](https://github.com/theapache64/retrosheet)

## Install
![NPM](https://img.shields.io/npm/v/retrosheet-ts)

```shell
npm i retrosheet-ts
```


## Usage ⌨️

### Fetch Google Sheet Data.

#### Get Spreadsheet ID
Get Spreadsheet ID from spreadsheet url.
![get_spreadsheet_id.png](images/get_spreadsheet_id.png)

#### Get Data
```js
import { fetchRetrosheetData } from 'retrosheet-ts';

const response = await fetchRetrosheetData("<Spreadsheet ID>", { sheetName: "notess", query: "select * limit 2" })
```

<details>
<summary>Output</summary>

```json
[
  {
    "created_at": "26/08/2023 17:37:06",
    "title": "Hello",
    "description": "Description"
  },
  {
    "created_at": "26/08/2023 17:37:28",
    "title": "Yogesh",
    "description": "Description"
  }
]
```

</details>

### Write Data to Google Sheet.

Follow steps 1 - 4 from [here](https://github.com/theapache64/retrosheet)

#### Get Form ID
Get form id Form URL
![get-form-id.png](images/get-form-id.png)

#### Write data
```js
import { writeRetrosheetData } from 'retrosheet-ts';

const request = {
    'Title': "test title",
    'Description': 'test Description'
}
writeRetrosheetData("<FORM_ID>", request)
```
**_Note: Keys of request must be the same as Form Field name._**

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