DataVision.BeeYard.Sdk 12.12.0

Prefix Reserved
dotnet add package DataVision.BeeYard.Sdk --version 12.12.0                
NuGet\Install-Package DataVision.BeeYard.Sdk -Version 12.12.0                
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="DataVision.BeeYard.Sdk" Version="12.12.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DataVision.BeeYard.Sdk --version 12.12.0                
#r "nuget: DataVision.BeeYard.Sdk, 12.12.0"                
#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 DataVision.BeeYard.Sdk as a Cake Addin
#addin nuget:?package=DataVision.BeeYard.Sdk&version=12.12.0

// Install DataVision.BeeYard.Sdk as a Cake Tool
#tool nuget:?package=DataVision.BeeYard.Sdk&version=12.12.0                

C# SDK for BeeYard

Documentation

See https://docs.beeyard.ai/docs/beeyard-sdks/csharp/getting-started/.

Installation

dotnet add package DataVision.BeeYard.Sdk

Example usage

Authentication

  • Create HiveClient to interact with Hive. This example uses the client credentials grant, see the docs for other options. HiveClient uses HttpClient internally, so the same rules concerning disposability apply.

    using System.Reflection;
    using DataVision.BeeYard.Sdk;
    using DataVision.BeeYard.Sdk.Tokens;
    
    var uri = new Uri("https://demo.beeyard.ai/hive/");
    
    // optional user agent
    var version = typeof(HiveClient).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
    var agent = new UserAgent("csharp-sdk", version);
    
    var clientCredentials = new ClientCredentials("{client id}", "{client secret}");
    var tokenUri = new Uri("https://demo.beeyard.ai/id/oauth/token");
    var client = HiveClient.CreateWithClientCredentials(uri, tokenUri, clientCredentials, userAgent: agent);
    

Working with Cells

  • Create a Cell in the default Workspace. Read errors if Cell creation fails.

    using DataVision.BeeYard.Sdk.Hive.Cells;
    using DataVision.BeeYard.Sdk.Hive.Cells.Tags;
    using DataVision.BeeYard.Sdk.Hive.Cells.Properties;
    
    var cellId = Guid.NewGuid();
    var @namespace = "workspace0";
    var workspaceTag = Tag.CreateWorkspaceTag(@namespace);
    var property42 = Property.FromLong("Number", 42);
    
    var cellDescriptorInput = new CellDescriptorInput();
    cellDescriptorInput.Id = cellId;
    cellDescriptorInput.Description = "Cell created from C# SDK";
    cellDescriptorInput.Created = DateTime.UtcNow - TimeSpan.FromDays(1);
    cellDescriptorInput.Tags.Add(workspaceTag);
    cellDescriptorInput.Properties.Add(property42);
    
    using var response = await client.CreateCellAsync(cellDescriptorInput);
    if(!response.IsSuccessStatusCode)
    {
        Console.WriteLine("Failed to create cell");
        var errors = await response.ReadErrorsAsync();
        foreach(var error in errors)
        {
            Console.WriteLine(error.Message);
        }
    }
    
  • Add Tag to the just created Cell.

    var tagA = Tag.FromTagTemplate(templateA, @namespace);
    using var response = await client.AddTagAsync(cellId, tagA);
    response.EnsureSuccessStatusCode();
    
  • Add image to Cell.

    using System.IO;
    
    var imageName = "image.png";
    using var stream = File.OpenRead("{path to image}");
    using var response = await client.AddImageAsync(cellId, imageName, stream);
    response.EnsureSuccessStatusCode();
    
  • Read image from Cell.

    using var response = await client.ReadFileAsync(cellId, imageName);
    response.EnsureSuccessStatusCode();
    
    Console.WriteLine($"{response.FileType} - {response.MimeType}: {response.Size} bytes");
    using var content = await response.ReadPayloadAsStreamAsync();
    // process image content
    
  • Remove image from Cell.

    using var response = await client.RemoveFileAsync(cellId, imageName);
    response.EnsureSuccessStatusCode();
    
  • Remove Cell.

    using var response = await client.RemoveCellAsync(id);
    response.EnsureSuccessStatusCode();
    
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on DataVision.BeeYard.Sdk:

Package Downloads
DataVision.BeeYard.Sdk.HalconXL-23.11-Progress

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.HalconXL-23.05-Progress

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.Halcon-23.05-Progress

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.Halcon-23.11-Progress

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.HalconXL-22.11-Progress

BeeYard Halcon SDK

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
12.12.0 87 10/11/2024
12.11.5 197 9/3/2024
12.11.4 59 7/17/2024
12.11.3 110 5/30/2024
12.11.2 257 5/14/2024
12.11.1 116 4/11/2024
12.11.0 649 4/5/2024
12.10.0 117 3/15/2024
12.9.2 497 2/2/2024
12.9.1 110 1/25/2024
12.9.0 1,021 1/10/2024
12.8.0 149 1/2/2024
12.7.0 419 12/14/2023
12.6.0 145 11/13/2023
12.5.0 1,030 10/20/2023
12.4.0 150 8/28/2023
12.3.1 141 6/30/2023
12.3.0 321 6/23/2023
12.2.1 245 5/25/2023
12.2.0 122 5/24/2023
12.1.1 192 4/19/2023
12.1.0 200 4/18/2023
12.0.3 341 3/29/2023
12.0.2 191 3/28/2023
12.0.1 221 3/27/2023
12.0.0 272 3/23/2023
11.0.2 237 2/10/2023
11.0.1 260 2/9/2023
11.0.0 1,376 2/2/2023
10.18.1 1,031 1/3/2023
10.18.0 344 12/20/2022
10.17.5 1,430 11/8/2022
10.17.4 326 11/2/2022
10.17.3 388 10/24/2022
10.17.2 1,580 10/20/2022
10.17.1 394 10/17/2022
10.17.0 405 10/11/2022
10.16.2 467 9/23/2022
10.16.1 458 9/22/2022
10.16.0 384 9/20/2022
10.15.2 1,754 9/2/2022
10.15.1 1,513 8/29/2022
10.15.0 393 8/25/2022
10.14.1 389 8/12/2022
10.14.0 389 8/11/2022