File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2323function authCloudImplicit ( ) {
2424 // [START auth_cloud_implicit]
2525 // Imports the Google Cloud client library.
26- const Storage = require ( '@google-cloud/storage' ) ;
26+ const { Storage} = require ( '@google-cloud/storage' ) ;
2727
2828 // Instantiates a client. If you don't specify credentials when constructing
2929 // the client, the client library will look for credentials in the
@@ -50,12 +50,13 @@ function authCloudImplicit () {
5050function authCloudExplicit ( ) {
5151 // [START auth_cloud_explicit]
5252 // Imports the Google Cloud client library.
53- const Storage = require ( '@google-cloud/storage' ) ;
53+ const { Storage} = require ( '@google-cloud/storage' ) ;
5454
5555 // Instantiates a client. Explicitly use service account credentials by
5656 // specifying the private key file. All clients in google-cloud-node have this
5757 // helper, see https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
5858 const storage = new Storage ( {
59+ projectId : 'project-id' ,
5960 keyFilename : '/path/to/keyfile.json'
6061 } ) ;
6162
Original file line number Diff line number Diff line change 1717 "test" : " repo-tools test run --cmd ava -- -T 20s --verbose system-test/*.test.js"
1818 },
1919 "dependencies" : {
20- "@google-cloud/storage" : " 1.6.0 " ,
20+ "@google-cloud/storage" : " ^2.0.3 " ,
2121 "yargs" : " 11.0.0"
2222 },
2323 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments