Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add .readme-metadata.json and generate new README.md #595

Merged
merged 5 commits into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .cloud-repo-tools.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build/
package-lock.json
.vscode
.DS_Store
__pycache__
10 changes: 10 additions & 0 deletions .readme-partials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
introduction: |-
This is the Node.js Server SDK for [Google Cloud Firestore](https://firebase.google.com/docs/firestore/). Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.

This Cloud Firestore Server SDK uses Google’s Cloud Identity and Access Management for authentication and should only be used in trusted environments. Your Cloud Identity credentials allow you bypass all access restrictions and provide read and write access to all data in your Cloud Firestore project.

The Cloud Firestore Server SDKs are designed to manage the full set of data in your Cloud Firestore project and work best with reliable network connectivity. Data operations performed via these SDKs directly access the Cloud Firestore backend and all document reads and writes are optimized for high throughput.

Applications that use Google's Server SDKs should not be used in end-user environments, such as on phones or on publicly hosted websites. If you are developing a Web or Node.js application that accesses Cloud Firestore on behalf of end users, use the firebase Client SDK.

**Note:** This Cloud Firestore Server SDK does not support Firestore databases created in [Datastore mode](https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode). To access these databases, use the [Datastore SDK](https://www.npmjs.com/package/@google-cloud/datastore).
13 changes: 13 additions & 0 deletions .repo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "firestore",
"name_pretty": "Cloud Firestore",
"product_documentation": "https://cloud.google.com/firestore",
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/firestore/latest/",
"issue_tracker":"https://issuetracker.google.com/savedsearches/5337669",
"release_level": "ga",
"language": "nodejs",
"repo": "googleapis/nodejs-firestore",
"distribution_name": "@google-cloud/firestore",
"api_id": "firestore.googleapis.com",
"requires_billing ": false
}
79 changes: 54 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
[//]: # "To regenerate it, use `python -m synthtool`."
<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"/>

# [Google Cloud Firestore: Node.js Server SDK](https://github.com/googleapis/nodejs-firestore)
# [Cloud Firestore: Node.js Client](https://github.com/googleapis/nodejs-firestore)

[![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)
[![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)
[![npm version](https://img.shields.io/npm/v/@google-cloud/firestore.svg)](https://www.npmjs.org/package/@google-cloud/firestore)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-firestore/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-firestore)




This is the Node.js Server SDK for [Google Cloud Firestore](https://firebase.google.com/docs/firestore/). Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.

This Cloud Firestore Server SDK uses Google’s Cloud Identity and Access Management for authentication and should only be used in trusted environments. Your Cloud Identity credentials allow you bypass all access restrictions and provide read and write access to all data in your Cloud Firestore project.
Expand All @@ -19,25 +22,44 @@ Applications that use Google&#x27;s Server SDKs should not be used in end-user e
**Note:** This Cloud Firestore Server SDK does not support Firestore databases created in [Datastore mode](https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode). To access these databases, use the [Datastore SDK](https://www.npmjs.com/package/@google-cloud/datastore).


* [Using the client library](#using-the-client-library)
* [Cloud Firestore Node.js Client API Reference][client-docs]
* [Cloud Firestore Documentation][product-docs]
* [github.com/googleapis/nodejs-firestore](https://github.com/googleapis/nodejs-firestore)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].

[explained]: https://cloud.google.com/apis/docs/client-libraries-explained

**Table of contents:**


* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)
* [Using the client library](#using-the-client-library)
* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)

## Using the client library

1. [Select or create a Cloud Platform project][projects].
## Quickstart

1. [Enable the Google Cloud Firestore API][enable_api].
### Before you begin

1. [Select or create a Cloud Platform project][projects].
1. [Enable the Cloud Firestore API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.

1. Install the client library:
### Installing the client library

```bash
npm install @google-cloud/firestore
```

npm install --save @google-cloud/firestore

1. Try an example:
### Using the client library

```javascript
const Firestore = require('@google-cloud/firestore');
Expand Down Expand Up @@ -71,22 +93,40 @@ async function main() {
};

main().catch(console.error);

```


The [Cloud Firestore Node.js Server SDK API Reference][client-docs] documentation

## Samples

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

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Quickstart | [source code](https://github.com/googleapis/nodejs-firestore/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-firestore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |



The [Cloud Firestore Node.js Client API Reference][client-docs] documentation
also contains samples.

## Versioning

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


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





More Information: [Google Cloud Platform Launch Stages][launch_stages]

[launch_stages]: https://cloud.google.com/terms/launch-stages
Expand All @@ -101,21 +141,10 @@ Apache Version 2.0

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

## What's Next

* [Cloud Firestore Documentation][product-docs]
* [Cloud Firestore Node.js Server SDK API Reference][client-docs]
* [github.com/googleapis/nodejs-firestore](https://github.com/googleapis/nodejs-firestore)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].

[explained]: https://cloud.google.com/apis/docs/client-libraries-explained

[client-docs]: https://cloud.google.com/nodejs/docs/reference/firestore/latest/
[product-docs]: https://firebase.google.com/docs/firestore/
[product-docs]: https://cloud.google.com/firestore
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=firestore.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/getting-started
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"codecov": "nyc report --reporter=json && codecov -f .coverage/*.json",
"predocs": "npm run compile",
"docs": "jsdoc -c .jsdoc.js",
"generate-scaffolding": "repo-tools generate all",
"system-test": "mocha build/system-test --timeout 600000",
"samples-test": "npm link && cd samples/ && npm link ../ && npm test && cd ../",
"conformance": "mocha build/conformance",
Expand All @@ -55,7 +54,6 @@
"through2": "^3.0.0"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"@types/assert": "^1.4.0",
"@types/chai": "^4.1.7",
"@types/chai-as-promised": "^7.1.0",
Expand Down
53 changes: 53 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `python -m synthtool`."
<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"/>

# [Cloud Firestore: Node.js Samples](https://github.com/googleapis/nodejs-firestore)

[![Open in Cloud Shell][shell_img]][shell_link]

This is the Node.js Server SDK for [Google Cloud Firestore](https://firebase.google.com/docs/firestore/). Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.

This Cloud Firestore Server SDK uses Google’s Cloud Identity and Access Management for authentication and should only be used in trusted environments. Your Cloud Identity credentials allow you bypass all access restrictions and provide read and write access to all data in your Cloud Firestore project.

The Cloud Firestore Server SDKs are designed to manage the full set of data in your Cloud Firestore project and work best with reliable network connectivity. Data operations performed via these SDKs directly access the Cloud Firestore backend and all document reads and writes are optimized for high throughput.

Applications that use Google&#x27;s Server SDKs should not be used in end-user environments, such as on phones or on publicly hosted websites. If you are developing a Web or Node.js application that accesses Cloud Firestore on behalf of end users, use the firebase Client SDK.

**Note:** This Cloud Firestore Server SDK does not support Firestore databases created in [Datastore mode](https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode). To access these databases, use the [Datastore SDK](https://www.npmjs.com/package/@google-cloud/datastore).

## Table of Contents

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Quickstart](#quickstart)

## Before you begin

Before running the samples, make sure you've followed the steps in the
[Using the client library](https://github.com/googleapis/nodejs-firestore#using-the-client-library) of the client
library's README.

## Samples



### Quickstart

View the [source code](https://github.com/googleapis/nodejs-firestore/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-firestore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after discussion with @JustinBeckwith last week, we opted to significantly simplify the samples README.md, until we can pull in more information from DRIFT.


__Usage:__


`node quickstart.js`






[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/README.md
[product-docs]: https://cloud.google.com/firestore