{"id":31976765,"url":"https://github.com/steinhq/js-client","last_synced_at":"2025-10-14T21:15:40.485Z","repository":{"id":40948754,"uuid":"187653980","full_name":"SteinHQ/JS-Client","owner":"SteinHQ","description":"JavaScript client library to interact with the Stein API","archived":false,"fork":false,"pushed_at":"2023-01-03T22:12:15.000Z","size":729,"stargazers_count":32,"open_issues_count":10,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T13:37:47.992Z","etag":null,"topics":["api-client","google-sheets","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SteinHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-20T14:14:41.000Z","updated_at":"2024-09-30T23:36:09.000Z","dependencies_parsed_at":"2023-02-01T11:02:07.676Z","dependency_job_id":null,"html_url":"https://github.com/SteinHQ/JS-Client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SteinHQ/JS-Client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteinHQ%2FJS-Client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteinHQ%2FJS-Client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteinHQ%2FJS-Client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteinHQ%2FJS-Client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SteinHQ","download_url":"https://codeload.github.com/SteinHQ/JS-Client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteinHQ%2FJS-Client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021379,"owners_count":26087020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","google-sheets","hacktoberfest"],"created_at":"2025-10-14T21:15:35.891Z","updated_at":"2025-10-14T21:15:40.480Z","avatar_url":"https://github.com/SteinHQ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stein JavaScript Client\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e9bb8398b72743f3b7b04e20283194b5)](https://www.codacy.com?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=SteinHQ/JS-Client\u0026utm_campaign=Badge_Grade)\n\nThis JavaScript client helps you interact with the Stein API, both in the browser and in Node.js setups.\n\n## Installation\n\n### HTML\n\nTo setup the client on your front-end, add this external script in the `\u003chead\u003e` of your page.\n\n```html\n\u003cscript src=\"https://unpkg.com/stein-js-client\"\u003e\u003c/script\u003e\n```\n\n### Node.js\n\nTo install the package via NPM, run\n\n```bash\nnpm install stein-js-client\n```\n\nAnd import it in your files.\n\n```javascript\nconst SteinStore = require(\"stein-js-client\");\n```\n\n## Initialise - Create a store\n\nA store is a reference to a spreadsheet API.\n\nEach store is initialised by providing the API URL.\n\n```javascript\nconst store = new SteinStore(\n  \"https://api.steinhq.com/v1/storages/5cca0542e52a3545102c1665\"\n);\n```\n\nYou can now interact with the API using the methods on the store.\n\n## Read \u0026 Search Data\n\n#### `store.read(sheetName, {limit, offset, authentication, search})`\n\n### Valid Options\n\n| Parameter      | Description                                        | Format               | Requirement |\n| -------------- | -------------------------------------------------- | -------------------- | ----------- |\n| limit          | Maximum number of rows to be returned              | Number               | Optional    |\n| offset         | Number of rows to be skipped (from the start)      | Number               | Optional    |\n| authentication | Basic HTTP Authentication , if required by the API | {username, password} | Optional    |\n| search         | The column values to search for                    | {column: value, ...} | Optional    |\n|                |                                                    |                      |             |\n\n### Return Value\n\nThis returns a promise which resolves providing an array of rows, with each row in the format `{column: value}`. On error, the promise rejects with the message.\n\n```javascript\nconst store = new SteinStore(\n  \"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40\"\n);\n\nstore\n  .read(\"Sheet1\", { limit: 1, offset: 2, search: { author: \"Shiven Sinha\" } })\n  .then(data =\u003e {\n    console.log(data);\n  });\n```\n\n## Add Rows\n\n#### `store.append(sheetName, rows, {authentication})`\n\n### Valid Options\n\n| Parameter      | Description                                        | Format               | Requirement |\n| -------------- | -------------------------------------------------- | -------------------- | ----------- |\n| authentication | Basic HTTP Authentication , if required by the API | {username, password} | Optional    |\n|                |                                                    |                      |             |\n\n### Return Value\n\nThis returns a promise which resolves providing the updated range, e.g. `{ \"updatedRange\": \"Sheet1!A6:D6\" }`. On error, the promise rejects with the message.\n\n```javascript\nconst store = new SteinStore(\n  \"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40\"\n);\n\nstore\n  .append(\"Sheet2\", [\n    {\n      title: \"Awesome article\",\n      author: \"Me!\",\n      content: \"A brief summary\",\n      link: \"blog.me.com/awesome-article\"\n    }\n  ])\n  .then(res =\u003e {\n    console.log(res);\n  });\n```\n\n## Update Rows\n\n#### `store.edit(sheetName, {search, set, limit, authentication})`\n\n### Valid Options\n\n| Parameter      | Description                                        | Format               | Requirement |\n| -------------- | -------------------------------------------------- | -------------------- | ----------- |\n| search         | The column values to search for                    | {column: value, ...} | Required    |\n| set            | The column values to set                           | {column: value, ...} | Required    |\n| limit          | Maximum number of rows to be updated               | Number               | Optional    |\n| authentication | Basic HTTP Authentication , if required by the API | {username, password} | Optional    |\n\n### Return Value\n\nThis returns a promise which resolves providing the updated range, e.g. `{ \"updatedRange\": \"Sheet1!A6:D6\" }`. On error, the promise rejects with the message.\n\n```javascript\nconst store = new SteinStore(\n  \"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40\"\n);\n\nstore\n  .edit(\"Sheet1\", {\n    search: { author: \"Shiven Sinha\" },\n    set: { title: \"Currently Unavailable\" }\n  })\n  .then(res =\u003e {\n    console.log(res);\n  });\n```\n\n## Delete Rows\n\n#### `store.delete(sheetName, {search, limit, authentication})`\n\n### Valid Options\n\n| Parameter      | Description                                        | Format               | Requirement |\n| -------------- | -------------------------------------------------- | -------------------- | ----------- |\n| search         | The column values to search for                    | {column: value, ...} | Required    |\n| limit          | Maximum number of rows to be updated               | Number               | Optional    |\n| authentication | Basic HTTP Authentication , if required by the API | {username, password} | Optional    |\n\n### Return Value\n\nThis returns a promise which resolves providing the updated range, e.g. `{ \"updatedRange\": \"Sheet1!A6:D6\" }`. On error, the promise rejects with the message.\n\n```javascript\nconst store = new SteinStore(\n  \"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40\"\n);\n\nstore\n  .delete(\"Sheet1\", {\n    search: { author: \"Shiven Sinha\" }\n  })\n  .then(res =\u003e {\n    console.log(res);\n  });\n```\n\n## Additional Guides\n\nFind additional documentation and guides on [docs.steinhq.com](https://docs.steinhq.com).\n\n## License\n\nThe Stein JavaScript client is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinhq%2Fjs-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinhq%2Fjs-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinhq%2Fjs-client/lists"}