Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 53e290e

Browse files
author
Benjamin E. Coe
authored
docs: new synthtool generated README (#645)
1 parent 9916cc5 commit 53e290e

5 files changed

Lines changed: 58 additions & 29 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ google-cloud-logging-winston-*.tgz
1313
google-cloud-logging-bunyan-*.tgz
1414
.vscode
1515
package-lock.json
16+
__pycache__

.readme-partials.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
introduction: |-
2+
> Node.js idiomatic client for [Cloud Storage][product-docs].
3+
4+
[Cloud Storage](https://cloud.google.com/storage/docs) allows world-wide
5+
storage and retrieval of any amount of data at any time. You can use Google
6+
Cloud Storage for a range of scenarios including serving website content,
7+
storing data for archival and disaster recovery, or distributing large data
8+
objects to users via direct download.

.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "storage",
33
"name_pretty": "Google Cloud Storage",
44
"product_documentation": "https://cloud.google.com/storage",
5-
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/storage/2.3.x/",
5+
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/storage/latest/",
66
"issue_tracker": "https://issuetracker.google.com/savedsearches/559782",
77
"release_level": "ga",
88
"language": "nodejs",

README.md

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,76 @@
99
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-storage/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-storage)
1010

1111

12-
Cloud Storage Client Library for Node.js
1312

1413

15-
* [Using the client library](#using-the-client-library)
14+
> Node.js idiomatic client for [Cloud Storage][product-docs].
15+
16+
[Cloud Storage](https://cloud.google.com/storage/docs) allows world-wide
17+
storage and retrieval of any amount of data at any time. You can use Google
18+
Cloud Storage for a range of scenarios including serving website content,
19+
storing data for archival and disaster recovery, or distributing large data
20+
objects to users via direct download.
21+
22+
23+
* [Google Cloud Storage Node.js Client API Reference][client-docs]
24+
* [Google Cloud Storage Documentation][product-docs]
25+
* [github.com/googleapis/nodejs-storage](https://github.com/googleapis/nodejs-storage)
26+
27+
Read more about the client libraries for Cloud APIs, including the older
28+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
29+
30+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
31+
32+
**Table of contents:**
33+
34+
35+
* [Quickstart](#quickstart)
36+
* [Before you begin](#before-you-begin)
37+
* [Installing the client library](#installing-the-client-library)
38+
* [Using the client library](#using-the-client-library)
1639
* [Samples](#samples)
1740
* [Versioning](#versioning)
1841
* [Contributing](#contributing)
1942
* [License](#license)
2043

21-
## Using the client library
44+
## Quickstart
45+
46+
### Before you begin
2247

2348
1. [Select or create a Cloud Platform project][projects].
2449
1. [Enable billing for your project][billing].
2550
1. [Enable the Google Cloud Storage API][enable_api].
2651
1. [Set up authentication with a service account][auth] so you can access the
2752
API from your local workstation.
2853

29-
1. Install the client library:
54+
### Installing the client library
3055

31-
npm install @google-cloud/storage
56+
```bash
57+
npm install @google-cloud/storage
58+
```
3259

3360

34-
1. Try an example:
61+
### Using the client library
3562

3663
```javascript
37-
async function quickstart(
38-
projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID
39-
bucketName = 'my-new-bucket' // The name for the new bucket
40-
) {
4164
// Imports the Google Cloud client library
4265
const {Storage} = require('@google-cloud/storage');
4366

4467
// Creates a client
45-
const storage = new Storage({projectId});
68+
const storage = new Storage();
69+
70+
/**
71+
* TODO(developer): Uncomment these variables before running the sample.
72+
*/
73+
// const bucketName = 'bucket-name';
74+
75+
async function createBucket() {
76+
// Creates the new bucket
77+
await storage.createBucket(bucketName);
78+
console.log(`Bucket ${bucketName} created.`);
79+
}
4680

47-
// Creates the new bucket
48-
await storage.createBucket(bucketName);
49-
console.log(`Bucket ${bucketName} created.`);
50-
}
81+
createBucket();
5182

5283
```
5384

@@ -103,18 +134,7 @@ Apache Version 2.0
103134

104135
See [LICENSE](https://github.com/googleapis/nodejs-storage/blob/master/LICENSE)
105136

106-
## What's Next
107-
108-
* [Google Cloud Storage Documentation][product-docs]
109-
* [Google Cloud Storage Node.js Client API Reference][client-docs]
110-
* [github.com/googleapis/nodejs-storage](https://github.com/googleapis/nodejs-storage)
111-
112-
Read more about the client libraries for Cloud APIs, including the older
113-
Google APIs Client Libraries, in [Client Libraries Explained][explained].
114-
115-
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
116-
117-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/storage/2.3.x/
137+
[client-docs]: https://cloud.google.com/nodejs/docs/reference/storage/latest/
118138
[product-docs]: https://cloud.google.com/storage
119139
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
120140
[projects]: https://console.cloud.google.com/project

synth.metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"updateTime": "2019-03-27T11:27:46.413216Z",
2+
"updateTime": "2019-03-27T23:29:22.642318Z",
33
"sources": [
44
{
55
"template": {

0 commit comments

Comments
 (0)