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 23
23
function authCloudImplicit ( ) {
24
24
// [START auth_cloud_implicit]
25
25
// Imports the Google Cloud client library.
26
- const Storage = require ( '@google-cloud/storage' ) ;
26
+ const { Storage} = require ( '@google-cloud/storage' ) ;
27
27
28
28
// Instantiates a client. If you don't specify credentials when constructing
29
29
// the client, the client library will look for credentials in the
@@ -50,12 +50,13 @@ function authCloudImplicit () {
50
50
function authCloudExplicit ( ) {
51
51
// [START auth_cloud_explicit]
52
52
// Imports the Google Cloud client library.
53
- const Storage = require ( '@google-cloud/storage' ) ;
53
+ const { Storage} = require ( '@google-cloud/storage' ) ;
54
54
55
55
// Instantiates a client. Explicitly use service account credentials by
56
56
// specifying the private key file. All clients in google-cloud-node have this
57
57
// helper, see https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
58
58
const storage = new Storage ( {
59
+ projectId : 'project-id' ,
59
60
keyFilename : '/path/to/keyfile.json'
60
61
} ) ;
61
62
Original file line number Diff line number Diff line change 17
17
"test" : " repo-tools test run --cmd ava -- -T 20s --verbose system-test/*.test.js"
18
18
},
19
19
"dependencies" : {
20
- "@google-cloud/storage" : " 1.6.0 " ,
20
+ "@google-cloud/storage" : " ^2.0.3 " ,
21
21
"yargs" : " 11.0.0"
22
22
},
23
23
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments