Skip to content

Commit 62bfc98

Browse files
authored
Fix Readme.md in /samples (#73)
Delete tests for sendgrid and mailjet. Add vms_api to the list of samples. Add descriptions, fix sample code, and fix broken links
1 parent 13cecad commit 62bfc98

File tree

6 files changed

+34
-10
lines changed

6 files changed

+34
-10
lines changed

packages/google-cloud-compute/.cloud-repo-tools.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
"samples": [
88
{
99
"id": "vms",
10-
"name": "Virtual Machines",
10+
"name": "List Virtual Machines",
1111
"file": "vms.js",
12-
"docs_link": "https://cloud.google.com/compute/docs"
12+
"docs_link": "https://cloud.google.com/compute/docs",
13+
"description": "Get a list of virtual machine instances and log the first result.\n\n"
14+
},
15+
{
16+
"id": "vms_api",
17+
"name": "Use Google Auth and list Virtual Machines",
18+
"file": "vms_api.js",
19+
"docs_link": "https://cloud.google.com/compute/docs",
20+
"description": "After explicit authentication, get a list of virtual machine instances and log the first result.\n\n"
1321
}
1422
]
1523
}

packages/google-cloud-compute/CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CRoed <[email protected]>
1212
Dave Gramlich <[email protected]>
1313
Eric Uldall <[email protected]>
1414
F. Hinkelmann <[email protected]>
15+
Franziska Hinkelmann <[email protected]>
1516
Jason Dobry <[email protected]>
1617
Jason Dobry <[email protected]>
1718
Kevin Leung <[email protected]>

packages/google-cloud-compute/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ has instructions for running the samples.
9898

9999
| Sample | Source Code | Try it |
100100
| --------------------------- | --------------------------------- | ------ |
101-
| Virtual Machines | [source code](https://github.com/googleapis/nodejs-compute/blob/master/samples/vms.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/vms.js,samples/README.md) |
101+
| List Virtual Machines | [source code](https://github.com/googleapis/nodejs-compute/blob/master/samples/vms.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/vms.js,samples/README.md) |
102+
| Use Google Auth and list Virtual Machines | [source code](https://github.com/googleapis/nodejs-compute/blob/master/samples/vms_api.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/vms_api.js,samples/README.md) |
102103

103104
The [Compute Engine Node.js Client API Reference][client-docs] documentation
104105
also contains samples.

packages/google-cloud-compute/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"Dave Gramlich <[email protected]>",
3838
"Eric Uldall <[email protected]>",
3939
"F. Hinkelmann <[email protected]>",
40+
"Franziska Hinkelmann <[email protected]>",
4041
"Jason Dobry <[email protected]>",
4142
"Jason Dobry <[email protected]>",
4243
"Kevin Leung <[email protected]>",

packages/google-cloud-compute/samples/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
* [Before you begin](#before-you-begin)
1414
* [Samples](#samples)
15-
* [Virtual Machines](#virtual-machines)
15+
* [List Virtual Machines](#list-virtual-machines)
16+
* [Use Google Auth and list Virtual Machines](#use-google-auth-and-list-virtual-machines)
1617

1718
## Before you begin
1819

@@ -22,12 +23,27 @@ library's README.
2223

2324
## Samples
2425

25-
### Virtual Machines
26+
### List Virtual Machines
2627

2728
View the [source code][vms_0_code].
2829

29-
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/vms.js,samples/README.md)[vms_0_docs]: https://cloud.google.com/compute/docs
30+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/vms.js,samples/README.md)
31+
32+
Get a list of virtual machine instances and log the first result.
33+
34+
[vms_0_docs]: https://cloud.google.com/compute/docs
3035
[vms_0_code]: vms.js
3136

37+
### Use Google Auth and list Virtual Machines
38+
39+
View the [source code][vms_api_1_code].
40+
41+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/vms_api.js,samples/README.md)
42+
43+
After explicit authentication, get a list of virtual machine instances and log the first result.
44+
45+
[vms_api_1_docs]: https://cloud.google.com/compute/docs
46+
[vms_api_1_code]: vms_api.js
47+
3248
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
3349
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-compute&page=editor&open_in_editor=samples/README.md

packages/google-cloud-compute/samples/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@google-cloud/compute": "0.10.0",
19-
"googleapis": "22.2.0",
20-
"nodemailer": "4.3.1",
21-
"nodemailer-smtp-transport": "2.7.4",
22-
"sendgrid": "5.2.3"
19+
"googleapis": "22.2.0"
2320
},
2421
"devDependencies": {
2522
"@google-cloud/nodejs-repo-tools": "2.2.3",

0 commit comments

Comments
 (0)