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

Update snapshot fetch documentation #268

Merged
merged 1 commit into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Get a read-only snapshot of a document at the requested version.
* `id` _(String)_
ID of the snapshot
* `version` _(number) [optional]_
The version number of the desired snapshot
The version number of the desired snapshot. If `null`, the latest version is fetched.
* `callback` _(Function)_
Called with `(error, snapshot)`, where `snapshot` takes the following form:

Expand All @@ -277,7 +277,7 @@ Get a read-only snapshot of a document at the requested version.
* `id` _(String)_
ID of the snapshot
* `timestamp` _(number) [optional]_
The timestamp of the desired snapshot. The returned snapshot will be the latest snapshot before the provided timestamp
The timestamp of the desired snapshot. The returned snapshot will be the latest snapshot before the provided timestamp. If `null`, the latest version is fetched.
* `callback` _(Function)_
Called with `(error, snapshot)`, where `snapshot` takes the following form:

Expand Down
4 changes: 2 additions & 2 deletions lib/client/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ Connection.prototype._firstSnapshotRequest = function () {
*
* @param collection - the collection name of the snapshot
* @param id - the ID of the snapshot
* @param version (optional) - the version number to fetch
* @param version (optional) - the version number to fetch. If null, the latest version is fetched.
* @param callback - (error, snapshot) => void, where snapshot takes the following schema:
*
* {
Expand Down Expand Up @@ -646,7 +646,7 @@ Connection.prototype.fetchSnapshot = function(collection, id, version, callback)
*
* @param collection - the collection name of the snapshot
* @param id - the ID of the snapshot
* @param timestamp (optional) - the timestamp to fetch
* @param timestamp (optional) - the timestamp to fetch. If null, the latest version is fetched.
* @param callback - (error, snapshot) => void, where snapshot takes the following schema:
*
* {
Expand Down