Skip to content

Commit 0008854

Browse files
sguequierrestuqdog
andauthored
DOCS-2347: Update example on GetLatestTabularData (#807)
Co-authored-by: Ethan <[email protected]>
1 parent bd3ab37 commit 0008854

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/viam/app/data_client.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,21 @@ async def get_latest_tabular_data(
374374
375375
::
376376
377-
time_captured, time_synced, payload = await data_client.get_latest_tabular_data(
378-
part_id="<PART-ID>",
379-
resource_name="<RESOURCE-NAME>",
380-
resource_subtype="<RESOURCE-SUBTYPE>",
381-
method_name="<METHOD-NAME>"
377+
tabular_data = await data_client.get_latest_tabular_data(
378+
part_id="77ae3145-7b91-123a-a234-e567cdca8910",
379+
resource_name="camera-1",
380+
resource_subtype="rdk:component:camera",
381+
method_name="GetImage"
382382
)
383383
384+
if tabular_data:
385+
time_captured, time_synced, payload = tabular_data
386+
print(f"Time Captured: {time_captured}")
387+
print(f"Time Synced: {time_synced}")
388+
print(f"Payload: {payload}")
389+
else:
390+
print(f"No data returned: {tabular_data}")
391+
384392
Args:
385393
part_id (str): The ID of the part that owns the data.
386394
resource_name (str): The name of the requested resource that captured the data. Ex: "my-sensor".

0 commit comments

Comments
 (0)