googleapis / googleapis/google-cloud-node

Feature Request: use client constructors' `options.projectId` as default project ID for client methods

Open
#3,656 1 comment 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

(Originally from https://github.com/googleapis/nodejs-compute/issues/790)

**Is your feature request related to a problem? Please describe.**
It's annoying to have to pass `projectId` to every client method if the project ID never changes for the particular client instance.

**Describe the solution you'd like**
Have client methods default to `options.projectId` passed to the client constructor when an explicit `project` is not passed to client methods.

**Describe alternatives you've considered**
Flipping a table.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.