googleapis / googleapis/google-cloud-node
README client constructor example incorrect (likely out of date).
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
In the [Using the client library](https://github.com/googleapis/nodejs-logging?tab=readme-ov-file#using-the-client-library) part of the readme, we have the following snippet of code:
```typescript
// Creates a client
const logging = new Logging({projectId});
```
However, I believe this should be changed to:
```typescript
// Creates a client
const logging = new Logging();
logging.setProjectId({projectId});
```
My assumption is that projectId was removed from the constructor in order to allow the client to dynamically connect to several projects; that is during the running of the program it may dynamically switch which project it is connect to.
I am using `"@google-cloud/logging": "^11.2.0"`
Contributor guide
Assessment
This issue has not been assessed yet.