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

Update storage in auth sample #750

Merged
merged 2 commits into from
Oct 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
function authCloudImplicit () {
// [START auth_cloud_implicit]
// Imports the Google Cloud client library.
const Storage = require('@google-cloud/storage');
const {Storage} = require('@google-cloud/storage');

// Instantiates a client. If you don't specify credentials when constructing
// the client, the client library will look for credentials in the
Expand All @@ -50,12 +50,13 @@ function authCloudImplicit () {
function authCloudExplicit () {
// [START auth_cloud_explicit]
// Imports the Google Cloud client library.
const Storage = require('@google-cloud/storage');
const {Storage} = require('@google-cloud/storage');

// Instantiates a client. Explicitly use service account credentials by
// specifying the private key file. All clients in google-cloud-node have this
// helper, see https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/docs/authentication.md
const storage = new Storage({
projectId: 'project-id',
keyFilename: '/path/to/keyfile.json'
});

Expand Down
2 changes: 1 addition & 1 deletion auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test": "repo-tools test run --cmd ava -- -T 20s --verbose system-test/*.test.js"
},
"dependencies": {
"@google-cloud/storage": "1.6.0",
"@google-cloud/storage": "^2.0.3",
"yargs": "11.0.0"
},
"devDependencies": {
Expand Down