googleapis / googleapis/google-cloud-node

[translate] V3: Confusing docs, invalid parent parameter

Open
#4,126 1 comment 0 reactions 1 assignee Claimed by @sofisl View on GitHub
api: translate priority: p2
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

I feel like the Google Node APIs are getting worse with each version..

On V2 we had this

`const translate: TranslationServiceClient = new TranslationServiceClient();`
`let [detections] = await translate.detect(text);`

Nice and easy, uses the current environment and service account details.

On V3, we now need to include this 'request' object that has unnecessary items; such as 'parent'

When I entered the parent it fails with

`Error: 3 INVALID_ARGUMENT: Invalid 'parent'.; Invalid location name. Unsupported location 'europe-west1'. Must be 'us-central1' or 'global'.`

I enter global and it fails with an unknown error?
Is there any reason to make the API worse?
Shouldn't the 'parent' be dictated from the meta service inside the environment?

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.