Skip to content

damiansire/google-api-wrappers

Repository files navigation

google-api-wrappers

CI License: MIT

Small, typed, low-dependency Node.js wrappers for Google APIs — each one hides the boilerplate (auth plumbing, pagination cursors, quota errors) behind a tiny surface you can actually remember. Organized as an npm-workspaces monorepo: every wrapper ships to npm under its own name, but they evolve, test and release together here.

Packages

Package Version What it does Why reach for it
youtube-fast-api npm YouTube Data API v3 client: comments, channel videos/playlists, video metadata, search. Zero runtime dependencies. Stateless async-iterator pagination, typed error hierarchy (QuotaExceededError / RateLimitError), automatic backoff honoring Retry-After.
google-sheets-wizard npm Read Google Sheets ranges as arrays — or map them straight to objects. One call (getRange) instead of the full googleapis Sheets ceremony, with clearer errors for the usual traps (permissions, missing sheet).

Why these wrappers

  • Low / zero dependency (ADR). youtube-fast-api pulls in nothing at runtime; google-sheets-wizard only expects googleapis as a peer. No transitive surprise in your node_modules.
  • Typed, and verified typed. Each package ships .d.ts and CI checks them against node10, node16 (CJS + ESM) and bundlers with arethetypeswrong + publint on the real tarball — so the types resolve for your setup, not just the author's.
  • Tested behavior, not just happy paths. The tricky real-world cases — quota exhaustion, rate-limit retry, pagination of two resources at once — are covered by node --test / Jest suites.
  • Quality-gated on every PR. CI runs lint, tests, type-tests, package checks (publint + arethetypeswrong on the real tarball), circular-import checks (dpdm), a bundle-size budget (size-limit), and monorepo consistency (sherif, blocking). Dead-code (knip) also runs in CI but is not yet blocking: it currently reports some internal exports that look unused to static analysis but may be part of the intended public surface of a CJS package — pending manual triage before promoting it to a hard gate.

Install

Install only the package you need:

npm i youtube-fast-api
# or
npm i google-sheets-wizard googleapis   # googleapis is a peer dependency

Quickstart

// youtube-fast-api — every comment on a video, no manual pagination
const YoutubeClient = require("youtube-fast-api");
const yt = new YoutubeClient(process.env.YT_API_KEY);

for await (const comment of yt.comments("dQw4w9WgXcQ", { pageSize: 100 })) {
  console.log(comment.textDisplay);
}

Full API, auth setup and error handling live in each package's README: youtube-fast-api → · google-sheets-wizard →

Development

npm install            # installs every workspace
npm test               # run all package test suites
npm run test:types     # type-tests (tsd) across workspaces
npm run lint           # eslint across workspaces

Releases are automated with Changesets: a changeset per user-facing change, and release.yml publishes the affected packages to npm and tags them. Add one with npm run changeset. Current registry-vs-local version drift and the pending "Version Packages" PR: docs/release-status.md.

License

MIT © damiansire

About

Lightweight Node.js wrappers for Google APIs (YouTube Data API, Google Sheets) organized as an npm-workspaces monorepo.

Topics

Resources

License

Contributing

Stars

11 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors