File tree 3 files changed +9
-55
lines changed
packages/google-cloud-resourcemanager/samples
3 files changed +9
-55
lines changed Original file line number Diff line number Diff line change 5
5
"license" : " Apache Version 2.0" ,
6
6
"author" : " Google Inc." ,
7
7
"scripts" : {
8
- "test" : " cd ..; npm run t -- resource/test/*.test.js" ,
9
- "system-test" : " cd ..; npm run st -- resource/system-test/*.test.js"
8
+ "test" : " cd ..; npm run st -- resource/system-test/*.test.js"
10
9
},
11
10
"dependencies" : {
12
- "@google-cloud/resource" : " 0.5.0 " ,
13
- "yargs" : " 6.5 .0"
11
+ "@google-cloud/resource" : " 0.5.1 " ,
12
+ "yargs" : " 6.6 .0"
14
13
},
15
14
"engines" : {
16
15
"node" : " >=4.3.2"
Original file line number Diff line number Diff line change @@ -28,13 +28,11 @@ const resourceClient = Resource({
28
28
} ) ;
29
29
30
30
// Lists current projects
31
- resourceClient . getProjects ( ( err , projects ) => {
32
- if ( err ) {
33
- console . error ( err ) ;
34
- return ;
35
- }
31
+ resourceClient . getProjects ( )
32
+ . then ( ( results ) => {
33
+ const projects = results [ 0 ] ;
36
34
37
- console . log ( 'Projects:' ) ;
38
- projects . forEach ( ( project ) => console . log ( project . id ) ) ;
39
- } ) ;
35
+ console . log ( 'Projects:' ) ;
36
+ projects . forEach ( ( project ) => console . log ( project . id ) ) ;
37
+ } ) ;
40
38
// [END resource_quickstart]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments