-
Notifications
You must be signed in to change notification settings - Fork 106
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
Consolidated Requests #28
Conversation
Cleaned up some logic and added comments.
Issues mentioned in #26 have been fixed.
|
I've deprecated the |
@LaughDonor Awesome. Haven't had a change to do any testing with this one yet, but after a quick read-through it looks like another great PR. I'll get back to you with some more notes after I test it out. I like the idea of consolidating the document creation methods — I say let's delete Again — looks great. I'll get back to you soon! |
README.md
Outdated
See other library methods and details [in the wiki](https://github.com/grahamearley/FirestoreGoogleAppsScript/wiki/Firestore-Method-Documentation). | ||
|
||
### Breaking Changes | ||
* v16: `createDocumentWithId(documentId, path, fields)` will be **removed** in the next update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By this do you mean that method will be removed in v17?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? Unless you would like to just remove it immediately. I'm good either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm leaning toward just removing it in this PR. I don't think this library is used at a large enough scale that this breaking change would wreak any havoc, so I say let's just do it.
Good idea to call it out in the readme!
a71d67b
to
c1343ff
Compare
README.md
Outdated
firestore.createDocument("FirstCollection", data) | ||
``` | ||
|
||
Alternatively, we can create the document in the `FirstCollection` collection called called `FirstDocument`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have two "called"s in a row here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😯
All cleaned up. Thanks for the checks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than my one comment, this is ready to go! I'll approve once you address my comment.
*/ | ||
this.getDocumentIds = function (pathToCollection) { | ||
return getDocumentIds_(pathToCollection, authToken, projectId) | ||
this.updateDocument = function (path, fields) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateDocument
appears twice, and seems to be identical — copy paste error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I was in preparation of the next PR, and forgot to undo. All fixed up @grahamearley
@LaughDonor Do you have any ideas on how to update our method documentation in this repo's wiki more automatically? I'd rather not have to keep manually typing it up when there are changes, but I'm not well-versed in Javascript, so I'm unaware of any nice auto-markdown or documentation generation tools. Any thoughts? We'll have to get the wiki updated when this gets merged in and I release a new version. EDIT: Found a solution! https://github.com/documentationjs/documentation. Just what I was looking for. |
…ection ID. Deprecated createDocumentWithId. Can utilize createDocument with any path. Clean up getDocuments* functions.
Updated README with more details.
Consolidated all the requests to a centralized object. #22
Cleaned up some logic and added comments.