DataVision.BeeYard.Sdk 12.11.3

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package DataVision.BeeYard.Sdk --version 12.11.3
NuGet\Install-Package DataVision.BeeYard.Sdk -Version 12.11.3
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.11.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DataVision.BeeYard.Sdk --version 12.11.3
#r "nuget: DataVision.BeeYard.Sdk, 12.11.3"
#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.11.3

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

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 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.HalconXL-23.05-Progress The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.Halcon-23.05-Progress The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.Halcon-23.11-Progress The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

BeeYard Halcon SDK

DataVision.BeeYard.Sdk.HalconXL-22.11-Progress The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

BeeYard Halcon SDK

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
12.11.3 80 5/30/2024
12.11.2 104 5/14/2024
12.11.1 84 4/11/2024
12.11.0 344 4/5/2024
12.10.0 88 3/15/2024
12.9.2 438 2/2/2024
12.9.1 89 1/25/2024
12.9.0 658 1/10/2024
12.8.0 124 1/2/2024
12.7.0 325 12/14/2023
12.6.0 122 11/13/2023
12.5.0 951 10/20/2023
12.4.0 128 8/28/2023
12.3.1 118 6/30/2023
12.3.0 300 6/23/2023
12.2.1 240 5/25/2023
12.2.0 102 5/24/2023
12.1.1 169 4/19/2023
12.1.0 173 4/18/2023
12.0.3 318 3/29/2023
12.0.2 173 3/28/2023
12.0.1 203 3/27/2023
12.0.0 254 3/23/2023
11.0.2 220 2/10/2023
11.0.1 240 2/9/2023
11.0.0 1,125 2/2/2023
10.18.1 1,012 1/3/2023
10.18.0 321 12/20/2022
10.17.5 1,176 11/8/2022
10.17.4 301 11/2/2022
10.17.3 367 10/24/2022
10.17.2 1,556 10/20/2022
10.17.1 372 10/17/2022
10.17.0 384 10/11/2022
10.16.2 444 9/23/2022
10.16.1 434 9/22/2022
10.16.0 360 9/20/2022
10.15.2 1,734 9/2/2022
10.15.1 1,491 8/29/2022
10.15.0 365 8/25/2022
10.14.1 366 8/12/2022
10.14.0 364 8/11/2022