From 7cc3ff25bb96b9a84dd34c9bd9d44fa328f3d096 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 7 Jul 2026 12:19:14 +0000 Subject: [PATCH] Update Notecard API from upstream schema changes (fa302108ceb8f32bc267740c33ffac154a29c27f) --- notecard/note.py | 5 ++++- notecard/ntn.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/notecard/note.py b/notecard/note.py index b562609..f5484c3 100644 --- a/notecard/note.py +++ b/notecard/note.py @@ -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: @@ -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: @@ -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) diff --git a/notecard/ntn.py b/notecard/ntn.py index d224d0a..23d0558 100644 --- a/notecard/ntn.py +++ b/notecard/ntn.py @@ -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.