Skip to content

[hotfix] Fix pagination example docs #600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2024
Merged
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
20 changes: 4 additions & 16 deletions src/viam/app/data_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,7 @@ async def main():

@dataclass
class TabularData:
"""Class representing a piece of tabular data and associated metadata.

Args:
data (Mapping[str, Any]): the requested data.
metadata (viam.proto.app.data.CaptureMetadata): the metadata from the request.
time_requested (datetime): the time the data request was sent.
time_received (datetime): the time the requested data was received.
"""
"""Class representing a piece of tabular data and associated metadata."""

data: Mapping[str, Any]
"""The requested data"""
Expand All @@ -145,12 +138,7 @@ def __eq__(self, other: object) -> bool:
# TODO (RSDK-6684): Revisit if this shadow type is necessary
@dataclass
class BinaryData:
"""Class representing a piece of binary data and associated metadata.

Args:
data (bytes): the requested data.
metadata (viam.proto.app.data.BinaryMetadata): the metadata from the request.
"""
"""Class representing a piece of binary data and associated metadata."""

data: bytes
"""The request data"""
Expand Down Expand Up @@ -207,7 +195,7 @@ async def tabular_data_by_filter(
last = None
my_filter = Filter(component_name="left_motor")
while True:
tabular_data, last = await data_client.tabular_data_by_filter(my_filter, last)
tabular_data, count, last = await data_client.tabular_data_by_filter(my_filter, last)
if not tabular_data:
break
my_data.extend(tabular_data)
Expand Down Expand Up @@ -284,7 +272,7 @@ async def binary_data_by_filter(
last = None
my_filter = Filter(component_name="camera")
while True:
data, last = await data_client.binary_data_by_filter(my_filter, last)
data, count, last = await data_client.binary_data_by_filter(my_filter, last)
if not data:
break
my_data.extend(data)
Expand Down
Loading