SpotSharp 0.1.2

dotnet add package SpotSharp --version 0.1.2
NuGet\Install-Package SpotSharp -Version 0.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpotSharp" Version="0.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SpotSharp --version 0.1.2
#r "nuget: SpotSharp, 0.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SpotSharp as a Cake Addin
#addin nuget:?package=SpotSharp&version=0.1.2

// Install SpotSharp as a Cake Tool
#tool nuget:?package=SpotSharp&version=0.1.2

Spot Sharp

This library is a third party implementation of .NET client for Spot robot of Boston Dynamics.

How to Use

Procedure

  1. Use Robot.Connect(SPOT_URI, CLIENT_NAME, USERNAME, PASSWORD) to create a Robot object, which represents an established connection to Spot.
  2. Use GetService<SERVICE_CLIENT_TYPE>(OPTIONAL_SERVICE_AUTHORITY) on the Robot object, to get a client instance for the specified service.
  3. (Optional) Invoke UpdateToken() method on the Robot object to refresh the token.

Example

The following code example shows how to list all available services on Spot.

var ip = "YOUR_SPOT_IP";
var client = "YOUR_CLIENT_NAME";
var username = "YOUR_USERNAME";
var password = "YOUR_PASSWORD";

var robot = await Robot.Connect(new Uri($"https://{ip}:443"),
                client, username, password);
Console.WriteLine("Connected.");
var service = robot.GetService<DirectoryService.DirectoryServiceClient>();
var response = await service.ListServiceEntriesAsync(new ListServiceEntriesRequest()
{
    Header = robot.Header
});
foreach (var entry in response.ServiceEntries)
{
    Console.WriteLine($"{entry.Name} - #{entry.Type} - @{entry.Authority}");
 }
Console.WriteLine("Robot Connected.");
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.2 86 5/28/2024
0.1.1 36 5/28/2024
0.1.0 80 5/24/2024

Current version contains generated Spot API protocol files and a `Robot` class to manage the connection to Spot.
           Future versions will probably provide encapsulation of more functions.