Skip to content

Commit 7cc3ff2

Browse files
Update Notecard API from upstream schema changes (fa302108ceb8f32bc267740c33ffac154a29c27f)
1 parent 0279d21 commit 7cc3ff2

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

notecard/note.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def template(card, file, body=None, delete=None, format=None, length=None, port=
188188

189189

190190
@validate_card_object
191-
def update(card, file, note, body=None, payload=None, verify=None):
191+
def update(card, file, note, body=None, payload=None, sync=None, verify=None):
192192
"""Update a Note in a DB Notefile by its ID, replacing the existing `body` and/or `payload`.
193193
194194
Args:
@@ -197,6 +197,7 @@ def update(card, file, note, body=None, payload=None, verify=None):
197197
file (str): The name of the DB Notefile that contains the Note to update.
198198
note (str): The unique Note ID.
199199
payload (str): A base64-encoded binary payload. A Note must have either a `body` or `payload`, and can have both.
200+
sync (bool): Set to `true` to sync the Notefile immediately after updating the Note. Only the specified Notefile is guaranteed to sync.
200201
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.
201202
202203
Returns:
@@ -211,6 +212,8 @@ def update(card, file, note, body=None, payload=None, verify=None):
211212
req["note"] = note
212213
if payload:
213214
req["payload"] = payload
215+
if sync is not None:
216+
req["sync"] = sync
214217
if verify is not None:
215218
req["verify"] = verify
216219
return card.Transaction(req)

notecard/ntn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def gps(card, off=None, on=None):
1919
Args:
2020
card (Notecard): The current Notecard object.
2121
off (bool): When `true`, a paired Starnote will use its own GPS/GNSS location. This is the default configuration.
22-
on (bool): When `true`, a Starnote will use the GPS/GNSS location from its paired Notecard, instead of its own GPS/GNSS location.
22+
on (bool): When `true`, a Starnote will use the location known to its paired Notecard, instead of the Starnote's own GPS/GNSS module.
2323
2424
Returns:
2525
dict: The result of the Notecard request.

0 commit comments

Comments
 (0)