Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion notecard/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def template(card, file, body=None, delete=None, format=None, length=None, port=


@validate_card_object
def update(card, file, note, body=None, payload=None, verify=None):
def update(card, file, note, body=None, payload=None, sync=None, verify=None):
"""Update a Note in a DB Notefile by its ID, replacing the existing `body` and/or `payload`.

Args:
Expand All @@ -197,6 +197,7 @@ def update(card, file, note, body=None, payload=None, verify=None):
file (str): The name of the DB Notefile that contains the Note to update.
note (str): The unique Note ID.
payload (str): A base64-encoded binary payload. A Note must have either a `body` or `payload`, and can have both.
sync (bool): Set to `true` to sync the Notefile immediately after updating the Note. Only the specified Notefile is guaranteed to sync.
verify (bool): If set to `true` and using a templated Notefile, the Notefile will be written to flash immediately, rather than being cached in RAM and written to flash later.

Returns:
Expand All @@ -211,6 +212,8 @@ def update(card, file, note, body=None, payload=None, verify=None):
req["note"] = note
if payload:
req["payload"] = payload
if sync is not None:
req["sync"] = sync
if verify is not None:
req["verify"] = verify
return card.Transaction(req)
2 changes: 1 addition & 1 deletion notecard/ntn.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def gps(card, off=None, on=None):
Args:
card (Notecard): The current Notecard object.
off (bool): When `true`, a paired Starnote will use its own GPS/GNSS location. This is the default configuration.
on (bool): When `true`, a Starnote will use the GPS/GNSS location from its paired Notecard, instead of its own GPS/GNSS location.
on (bool): When `true`, a Starnote will use the location known to its paired Notecard, instead of the Starnote's own GPS/GNSS module.

Returns:
dict: The result of the Notecard request.
Expand Down
Loading