Skip to content

Commit 286d893

Browse files
authored
[hotfix] Fix pagination example docs (#600)
1 parent b9f724a commit 286d893

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/viam/app/data_client.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,7 @@ async def main():
113113

114114
@dataclass
115115
class TabularData:
116-
"""Class representing a piece of tabular data and associated metadata.
117-
118-
Args:
119-
data (Mapping[str, Any]): the requested data.
120-
metadata (viam.proto.app.data.CaptureMetadata): the metadata from the request.
121-
time_requested (datetime): the time the data request was sent.
122-
time_received (datetime): the time the requested data was received.
123-
"""
116+
"""Class representing a piece of tabular data and associated metadata."""
124117

125118
data: Mapping[str, Any]
126119
"""The requested data"""
@@ -145,12 +138,7 @@ def __eq__(self, other: object) -> bool:
145138
# TODO (RSDK-6684): Revisit if this shadow type is necessary
146139
@dataclass
147140
class BinaryData:
148-
"""Class representing a piece of binary data and associated metadata.
149-
150-
Args:
151-
data (bytes): the requested data.
152-
metadata (viam.proto.app.data.BinaryMetadata): the metadata from the request.
153-
"""
141+
"""Class representing a piece of binary data and associated metadata."""
154142

155143
data: bytes
156144
"""The request data"""
@@ -207,7 +195,7 @@ async def tabular_data_by_filter(
207195
last = None
208196
my_filter = Filter(component_name="left_motor")
209197
while True:
210-
tabular_data, last = await data_client.tabular_data_by_filter(my_filter, last)
198+
tabular_data, count, last = await data_client.tabular_data_by_filter(my_filter, last)
211199
if not tabular_data:
212200
break
213201
my_data.extend(tabular_data)
@@ -284,7 +272,7 @@ async def binary_data_by_filter(
284272
last = None
285273
my_filter = Filter(component_name="camera")
286274
while True:
287-
data, last = await data_client.binary_data_by_filter(my_filter, last)
275+
data, count, last = await data_client.binary_data_by_filter(my_filter, last)
288276
if not data:
289277
break
290278
my_data.extend(data)

0 commit comments

Comments
 (0)