Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back .withDefaultParam #278

Closed
ryanseys opened this issue Sep 2, 2014 · 5 comments · Fixed by #307
Closed

Bring back .withDefaultParam #278

ryanseys opened this issue Sep 2, 2014 · 5 comments · Fixed by #307
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@ryanseys
Copy link
Contributor

ryanseys commented Sep 2, 2014

@proppy found the feature useful. Used to set default params for every request. I always thought it was more unpredictable so it was never transitioned to the new library.

See discussion: https://github.com/GoogleCloudPlatform/google-cloud-datastore/pull/47/files#r17020602

@proppy
Copy link
Contributor

proppy commented Sep 2, 2014

Maybe this could be make more predictable by making those params immutable, for example they could be passed to the client initializer function.

@ryanseys
Copy link
Contributor Author

ryanseys commented Sep 2, 2014

Yes this the only place I would condone putting the change.

What are your thoughts on something like the following:

var google = require('googleapis');
var datastore = google.datastore({ 
  version: 'v1beta2', 
  defaultParams: { datasetId: 'abc123' }, 
  auth: auth 
});

@ryanseys
Copy link
Contributor Author

ryanseys commented Sep 2, 2014

Or instead of defaultParams: a less verbose defaults: key?

@proppy
Copy link
Contributor

proppy commented Sep 2, 2014

Maybe just params them. Since those are parameters that will get passed on each request.

@ryanseys
Copy link
Contributor Author

ryanseys commented Sep 3, 2014

Yes, params would work.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants