File tree Expand file tree Collapse file tree 5 files changed +30
-29
lines changed Expand file tree Collapse file tree 5 files changed +30
-29
lines changed Original file line number Diff line number Diff line change 14
14
'use strict' ;
15
15
16
16
// [START auth]
17
- // By default, gcloud will authenticate using the service account file specified
18
- // by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
19
- // project specified by the GCLOUD_PROJECT environment variable. See
20
- // https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
21
- var gcloud = require ( 'gcloud ' ) ;
17
+ // By default, the client will authenticate using the service account file
18
+ // specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
19
+ // the project specified by the GCLOUD_PROJECT environment variable. See
20
+ // https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/ guides/authentication
21
+ var Vision = require ( '@google-cloud/vision ' ) ;
22
22
23
- // Get a reference to the vision component
24
- var vision = gcloud . vision ( ) ;
23
+ // Instantiate a vision client
24
+ var vision = Vision ( ) ;
25
25
// [END auth]
26
26
27
27
var fs = require ( 'fs' ) ;
Original file line number Diff line number Diff line change 15
15
16
16
// [START app]
17
17
// [START import_libraries]
18
- var gcloud = require ( 'gcloud ' ) ;
18
+ var Vision = require ( '@google-cloud/vision ' ) ;
19
19
// [END import_libraries]
20
20
21
21
// [START authenticate]
22
- // By default, gcloud will authenticate using the service account file specified
23
- // by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
24
- // project specified by the GCLOUD_PROJECT environment variable. See
25
- // https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
22
+ // By default, the client will authenticate using the service account file
23
+ // specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
24
+ // the project specified by the GCLOUD_PROJECT environment variable. See
25
+ // https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/ guides/authentication
26
26
27
- // Get a reference to the vision component
28
- var vision = gcloud . vision ( ) ;
27
+ // Instantiate a vision client
28
+ var vision = Vision ( ) ;
29
29
// [END authenticate]
30
30
31
31
/**
Original file line number Diff line number Diff line change 15
15
16
16
// [START app]
17
17
// [START import_libraries]
18
- var gcloud = require ( 'gcloud ' ) ;
18
+ var Vision = require ( '@google-cloud/vision ' ) ;
19
19
// [END import_libraries]
20
20
21
21
// [START authenticate]
22
- // By default, gcloud will authenticate using the service account file specified
23
- // by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
24
- // project specified by the GCLOUD_PROJECT environment variable. See
25
- // https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
22
+ // By default, the client will authenticate using the service account file
23
+ // specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
24
+ // the project specified by the GCLOUD_PROJECT environment variable. See
25
+ // https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/ guides/authentication
26
26
27
- // Get a reference to the vision component
28
- var vision = gcloud . vision ( ) ;
27
+ // Instantiate a vision client
28
+ var vision = Vision ( ) ;
29
29
// [END authenticate]
30
30
31
31
/**
Original file line number Diff line number Diff line change 9
9
"system-test" : " mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js"
10
10
},
11
11
"dependencies" : {
12
+ "@google-cloud/vision" : " ^0.1.1" ,
12
13
"async" : " ^1.5.0" ,
13
- "gcloud" : " ^0.37.0" ,
14
14
"natural" : " ^0.4.0" ,
15
15
"redis" : " ^2.6.0-2"
16
16
},
Original file line number Diff line number Diff line change @@ -19,15 +19,16 @@ var async = require('async');
19
19
var fs = require ( 'fs' ) ;
20
20
var path = require ( 'path' ) ;
21
21
22
- // By default, gcloud will authenticate using the service account file specified
23
- // by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use the
24
- // project specified by the GCLOUD_PROJECT environment variable. See
25
- // https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication
26
- var gcloud = require ( 'gcloud ' ) ;
22
+ // By default, the client will authenticate using the service account file
23
+ // specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
24
+ // the project specified by the GCLOUD_PROJECT environment variable. See
25
+ // https://googlecloudplatform.github.io/gcloud-node/#/docs/google-cloud/latest/ guides/authentication
26
+ var Vision = require ( '@google-cloud/vision ' ) ;
27
27
var natural = require ( 'natural' ) ;
28
28
var redis = require ( 'redis' ) ;
29
- // Get a reference to the vision component
30
- var vision = gcloud . vision ( ) ;
29
+
30
+ // Instantiate a vision client
31
+ var vision = Vision ( ) ;
31
32
// [END import_libraries]
32
33
33
34
function Index ( ) {
You can’t perform that action at this time.
0 commit comments