You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/README.md
+31-10Lines changed: 31 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Firestore for Google Apps Scripts
2
2
3
-

3
+
[](/grahamearley/FirestoreGoogleAppsScript/releases/latest)
@@ -16,12 +16,11 @@ This library allows a user (or service account) to authenticate with Firestore a
16
16
17
17
Read how this project was started [here](http://grahamearley.website/blog/2017/10/18/firestore-in-google-apps-script.html).
18
18
19
-
As of **v27**, this project has been updated to use the [GAS V8 runtime](https://developers.google.com/apps-script/guides/v8-runtime) with [Typescript](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html)! This introduces a number of [breaking changes](#breaking-changes).
19
+
As of **v27**, this project has been updated to use the [GAS V8 runtime](https://developers.google.com/apps-script/guides/v8-runtime) with [Typescript](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html)! This introduces a number of [breaking changes](#breaking-changes). Scripts utilizing the old Rhino runtime must use **v26**.
20
20
21
21
## Installation
22
22
In the Google online script editor, select the `Resources` menu item and choose `Libraries...`. In the "Add a library" input box, enter **`1VUSl4b1r1eoNcRWotZM3e87ygkxvXltOgyDZhixqncz9lQ3MjfT1iKFw`** and click "Add." Choose the most recent version number.
23
23
24
-
25
24
## Quick start
26
25
#### Creating a service account
27
26
The easiest way to use this library is to create a Google Service Account for your application and give it read/write access to your datastore. Giving a service account access to your datastore is like giving access to a user's account, but this account is strictly used by your script, not by a person.
@@ -97,7 +96,6 @@ You can retrieve documents by calling the `getDocument` function:
See other library methods and details [in the wiki](/grahamearley/FirestoreGoogleAppsScript/wiki/).
142
153
154
+
### Frequently Asked Questions
155
+
-**I'm getting the following error:**
156
+
> Missing ; before statement. at \[unknown function\](Auth:12)
157
+
158
+
This is because this library has been updated to utilize the new [V8 Engine](https://developers.google.com/apps-script/guides/v8-runtime), and classes are not supported in the Rhino Engine.
159
+
You can either:
160
+
1.[Migrate your script to use V8](https://developers.google.com/apps-script/guides/v8-runtime/migration), or
161
+
1. Use the last Rhino version of this library (**v26**).
162
+
163
+
143
164
### Breaking Changes
144
-
***v27:** Library rewritten with Typescript and Prettier.
145
-
* Query function names have been capitalized (`Select`, `Where`, `OrderBy`, `Limit`, `Offset`, `Range`).
146
-
***All functions return `Document` or `Document[]` types directly from Firebase. Use `document.obj` to extract the raw object.**
147
-
* Undo breaking change from v23. `document.createTime` and `document.updateTime` will remain as timestamped strings. However `document.created`, `document.updated`, and `document.read` are Date objects.
148
-
***v23:** When retrieving documents the createTime and updateTime document properties are JS Date objects and not Timestamp Strings.
-**v27:** Library rewritten with Typescript and Prettier.
166
+
- Query function names have been capitalized (`Select`, `Where`, `OrderBy`, `Limit`, `Offset`, `Range`).
167
+
-**All functions return `Document` or `Document[]` types directly from Firebase. Use `document.obj` to extract the raw object.**
168
+
- Undo breaking change from v23. `document.createTime` and `document.updateTime` will remain as timestamped strings. However `document.created`, `document.updated`, and `document.read` are Date objects.
169
+
-**v23:** When retrieving documents the createTime and updateTime document properties are JS Date objects and not Timestamp Strings.
0 commit comments