Skip to content

Commit c47779b

Browse files
Benjamin E. CoeJustinBeckwith
authored andcommitted
docs: add .repo-metadata.json and regenerate docs (#488)
1 parent bd35e3d commit c47779b

2 files changed

Lines changed: 65 additions & 62 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "bigtable",
3+
"name_pretty": "Cloud Bigtable",
4+
"product_documentation": "https://cloud.google.com/bigtable",
5+
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/bigtable/latest/",
6+
"issue_tracker":"https://issuetracker.google.com/savedsearches/559777",
7+
"release_level": "ga",
8+
"language": "nodejs",
9+
"repo": "googleapis/nodejs-bigtable",
10+
"distribution_name": "@google-cloud/bigtable",
11+
"api_id": "bigtable.googleapis.com",
12+
"requires_billing ": true
13+
}

handwritten/bigtable/README.md

Lines changed: 52 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1+
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
2+
[//]: # "To regenerate it, use `python -m synthtool`."
13
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
24

35
# [Cloud Bigtable: Node.js Client](https://github.com/googleapis/nodejs-bigtable)
46

5-
6-
[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
7+
[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
78
[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.org/package/@google-cloud/bigtable)
89
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-bigtable/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-bigtable)
910

10-
> Node.js idiomatic client for [Cloud Bigtable][product-docs].
1111

12-
[Cloud Bigtable](https://cloud.google.com/bigtable/docs/) is Google&#x27;s NoSQL Big Data database service. It&#x27;s the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail.
12+
13+
14+
Cloud Bigtable Client Library for Node.js
1315

1416

1517
* [Cloud Bigtable Node.js Client API Reference][client-docs]
16-
* [github.com/googleapis/nodejs-bigtable](https://github.com/googleapis/nodejs-bigtable)
1718
* [Cloud Bigtable Documentation][product-docs]
19+
* [github.com/googleapis/nodejs-bigtable](https://github.com/googleapis/nodejs-bigtable)
1820

1921
Read more about the client libraries for Cloud APIs, including the older
2022
Google APIs Client Libraries, in [Client Libraries Explained][explained].
@@ -23,6 +25,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
2325

2426
**Table of contents:**
2527

28+
2629
* [Quickstart](#quickstart)
2730
* [Before you begin](#before-you-begin)
2831
* [Installing the client library](#installing-the-client-library)
@@ -36,81 +39,60 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
3639

3740
### Before you begin
3841

39-
1. Select or create a Cloud Platform project.
40-
41-
[Go to the projects page][projects]
42-
43-
1. Enable billing for your project.
44-
45-
[Enable billing][billing]
46-
47-
1. Enable the Cloud Bigtable and Cloud Bigtable Admin APIs.
48-
49-
[Enable the APIs][enable_api]
50-
42+
1. [Select or create a Cloud Platform project][projects].
43+
1. [Enable the Cloud Bigtable API][enable_api].
5144
1. [Set up authentication with a service account][auth] so you can access the
5245
API from your local workstation.
5346

54-
[projects]: https://console.cloud.google.com/project
55-
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
56-
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com,bigtableadmin.googleapis.com
57-
[auth]: https://cloud.google.com/docs/authentication/getting-started
58-
5947
### Installing the client library
6048

61-
npm install --save @google-cloud/bigtable
49+
```bash
50+
npm install @google-cloud/bigtable
51+
```
52+
6253

6354
### Using the client library
6455

65-
[embedmd]:# (samples/quickstart.js javascript /.*Imports/ /}\)\(\);/)
6656
```javascript
6757
// Imports the Google Cloud client library
6858
const Bigtable = require('@google-cloud/bigtable');
6959

70-
// The name of the Cloud Bigtable instance
71-
const INSTANCE_NAME = 'my-bigtable-instance';
72-
// The name of the Cloud Bigtable table
73-
const TABLE_NAME = 'my-table';
74-
75-
(async () => {
76-
try {
77-
// Creates a Bigtable client
78-
const bigtable = new Bigtable();
79-
80-
// Connect to an existing instance:my-bigtable-instance
81-
const instance = bigtable.instance(INSTANCE_NAME);
82-
83-
// Connect to an existing table:my-table
84-
const table = instance.table(TABLE_NAME);
85-
86-
// Read a row from my-table using a row key
87-
let [singleRow] = await table.row('r1').get();
88-
89-
// Print the row key and data (column value, labels, timestamp)
90-
console.log(
91-
`Row key: ${singleRow.id}\nData: ${JSON.stringify(
92-
singleRow.data,
93-
null,
94-
4
95-
)}`
96-
);
97-
} catch (err) {
98-
// Handle error performing the read operation
99-
console.error(`Error reading row r1:`, err);
100-
}
101-
})();
60+
async function quickstart(
61+
INSTANCE_ID = 'my-instance', // ID of the Cloud Bigtable instance
62+
TABLE_ID = 'my-table' // ID of the Cloud Bigtable table
63+
) {
64+
const bigtable = Bigtable();
65+
66+
// Connect to an existing instance:my-bigtable-instance
67+
const instance = bigtable.instance(INSTANCE_ID);
68+
69+
// Connect to an existing table:my-table
70+
const table = instance.table(TABLE_ID);
71+
72+
// Read a row from my-table using a row key
73+
const [singleRow] = await table.row('r1').get();
74+
75+
// Print the row key and data (column value, labels, timestamp)
76+
const rowData = JSON.stringify(singleRow.data, null, 4);
77+
console.log(`Row key: ${singleRow.id}\nData: ${rowData}`);
78+
}
79+
10280
```
10381

82+
83+
10484
## Samples
10585

10686
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tree/master/samples) directory. The samples' `README.md`
10787
has instructions for running the samples.
10888

10989
| Sample | Source Code | Try it |
11090
| --------------------------- | --------------------------------- | ------ |
111-
| Hello World | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/hello-world/index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/hello-world/index.js,samples/hello-world/README.md) |
112-
| Instance operations | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) |
113-
| Table operations | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/tableadmin.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/tableadmin.js,samples/README.md) |
91+
| Instances | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) |
92+
| Quickstart | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
93+
| Tableadmin | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/tableadmin.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/tableadmin.js,samples/README.md) |
94+
95+
11496

11597
The [Cloud Bigtable Node.js Client API Reference][client-docs] documentation
11698
also contains samples.
@@ -119,12 +101,17 @@ also contains samples.
119101

120102
This library follows [Semantic Versioning](http://semver.org/).
121103

104+
122105
This library is considered to be **General Availability (GA)**. This means it
123106
is stable; the code surface will not change in backwards-incompatible ways
124107
unless absolutely necessary (e.g. because of critical security issues) or with
125108
an extensive deprecation period. Issues and requests against **GA** libraries
126109
are addressed with the highest priority.
127110

111+
112+
113+
114+
128115
More Information: [Google Cloud Platform Launch Stages][launch_stages]
129116

130117
[launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -140,6 +127,9 @@ Apache Version 2.0
140127
See [LICENSE](https://github.com/googleapis/nodejs-bigtable/blob/master/LICENSE)
141128

142129
[client-docs]: https://cloud.google.com/nodejs/docs/reference/bigtable/latest/
143-
[product-docs]: https://cloud.google.com/bigtable/docs/
144-
[shell_img]: //gstatic.com/cloudssh/images/open-btn.png
145-
130+
[product-docs]: https://cloud.google.com/bigtable
131+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
132+
[projects]: https://console.cloud.google.com/project
133+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
134+
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com
135+
[auth]: https://cloud.google.com/docs/authentication/getting-started

0 commit comments

Comments
 (0)