Skip to content
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

RSDK-9636: Add deprecation warning with date the Discover Components will be deprecated to the flutter SDK #331

Merged
merged 3 commits into from
Jan 27, 2025
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
5 changes: 5 additions & 0 deletions lib/src/robot/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class RobotClientOptions {

/// {@category Viam SDK}
/// Represents a discovery query in the SDK to query for discoverable components.
///
/// deprecated, remove on march 10th
class DiscoveryQuery {
final String subtype;
final String model;
Expand Down Expand Up @@ -334,6 +336,8 @@ class RobotClient {
return await _client.getCloudMetadata(rpb.GetCloudMetadataRequest());
}

/// Deprecated: use the Discovery Service APIs instead.
///
/// Discover components that the robot can connect to, given specific query metadata.
///
/// ```
Expand All @@ -347,6 +351,7 @@ class RobotClient {
..model = sdkQuery.model
..extra = sdkQuery.extraStruct));

_logger.w("RobotClient.discoverComponents is deprecated. It will be removed on March 10 2025. Use the DiscoveryService APIs instead.");
final response = await _client.discoverComponents(request);
return response.discovery.map((d) => Discovery.fromProto(d)).toList();
}
Expand Down
Loading