88[ ![ npm version] ( https://img.shields.io/npm/v/@google-cloud/storage.svg )] ( https://www.npmjs.org/package/@google-cloud/storage )
99[ ![ codecov] ( https://img.shields.io/codecov/c/github/googleapis/nodejs-storage/master.svg?style=flat )] ( https://codecov.io/gh/googleapis/nodejs-storage )
1010
11- <<<<<<< HEAD
1211
13- <<<<<<< HEAD
14- <<<<<<< HEAD
15- Cloud Storage Client Library for Node.js
16- =======
17- =======
1812
1913
20- >>>>>>> chore: some additional tweaks to README generation
2114> Node.js idiomatic client for [ Cloud Storage] [ product-docs ] .
2215
2316[ Cloud Storage] ( https://cloud.google.com/storage/docs ) allows world-wide
2417storage and retrieval of any amount of data at any time. You can use Google
2518Cloud Storage for a range of scenarios including serving website content,
2619storing data for archival and disaster recovery, or distributing large data
2720objects to users via direct download.
28- >>>>>>> docs: playing with header
2921
3022
31- <<<<<<< HEAD
32- =======
33- Cloud Storage Client Library for Node.js
34-
35- >>>>>>> docs: new synthtool generated README
36- * [ Using the client library] ( #using-the-client-library )
37- =======
3823* [ Google Cloud Storage Node.js Client API Reference] [ client-docs ]
3924* [ Google Cloud Storage Documentation] [ product-docs ]
4025* [ github.com/googleapis/nodejs-storage] ( https://github.com/googleapis/nodejs-storage )
@@ -51,7 +36,6 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
5136 * [ Before you begin] ( #before-you-begin )
5237 * [ Installing the client library] ( #installing-the-client-library )
5338 * [ Using the client library] ( #using-the-client-library )
54- >>>>>>> chore: some additional tweaks to README generation
5539* [ Samples] ( #samples )
5640* [ Versioning] ( #versioning )
5741* [ Contributing] ( #contributing )
@@ -77,24 +61,25 @@ npm install @google-cloud/storage
7761### Using the client library
7862
7963``` javascript
80- async function quickstart (
81- projectId = ' YOUR_PROJECT_ID' , // Your Google Cloud Platform project ID
82- bucketName = ' my-new-bucket' // The name for the new bucket
83- ) {
8464 // Imports the Google Cloud client library
8565 const {Storage } = require (' @google-cloud/storage' );
8666
8767 // Creates a client
88- 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+ }
8980
90- // Creates the new bucket
91- await storage .createBucket (bucketName);
92- console .log (` Bucket ${ bucketName} created.` );
93- }
81+ createBucket ();
9482
95- // process.env.GOOGLE_APPLICATION_CREDENTIALS points to service account JSON.
96- // process.env.GOOGLE_CLOUD_PROJECT points to your project in GCP.
97- quickstart (process .env .GOOGLE_CLOUD_PROJECT )
9883```
9984
10085
@@ -149,35 +134,7 @@ Apache Version 2.0
149134
150135See [ LICENSE] ( https://github.com/googleapis/nodejs-storage/blob/master/LICENSE )
151136
152- <<<<<<< HEAD
153- ## What's Next
154- <<<<<<< HEAD
155-
156- * [ Google Cloud Storage Documentation] [ product-docs ]
157- * [ Google Cloud Storage Node.js Client API Reference] [ client-docs ]
158- * [ github.com/googleapis/nodejs-storage] ( https://github.com/googleapis/nodejs-storage )
159-
160- Read more about the client libraries for Cloud APIs, including the older
161- Google APIs Client Libraries, in [ Client Libraries Explained] [ explained ] .
162-
163- [ explained ] : https://cloud.google.com/apis/docs/client-libraries-explained
164-
165- =======
166-
167- * [ Google Cloud Storage Documentation] [ product-docs ]
168- * [ Google Cloud Storage Node.js Client API Reference] [ client-docs ]
169- * [ github.com/googleapis/nodejs-storage] ( https://github.com/googleapis/nodejs-storage )
170-
171- Read more about the client libraries for Cloud APIs, including the older
172- Google APIs Client Libraries, in [ Client Libraries Explained] [ explained ] .
173-
174- [ explained ] : https://cloud.google.com/apis/docs/client-libraries-explained
175-
176- >>>>>>> docs: new synthtool generated README
177- [ client-docs ] : https://cloud.google.com/nodejs/docs/reference/storage/2.3.x/
178- =======
179137[ client-docs ] : https://cloud.google.com/nodejs/docs/reference/storage/latest/
180- >>>>>>> chore: some additional tweaks to README generation
181138[ product-docs ] : https://cloud.google.com/storage
182139[ shell_img ] : https://gstatic.com/cloudssh/images/open-btn.png
183140[ projects ] : https://console.cloud.google.com/project
0 commit comments