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
<PackageReference Include="DataVision.BeeYard.Sdk" Version="12.12.0" />
paket add DataVision.BeeYard.Sdk --version 12.12.0
#r "nuget: DataVision.BeeYard.Sdk, 12.12.0"
// 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 | Versions 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. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.Collections.Immutable (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
-
net6.0
- System.Text.Json (>= 8.0.5)
-
net8.0
- System.Text.Json (>= 8.0.5)
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 | 90 | 10/11/2024 |
12.11.5 | 214 | 9/3/2024 |
12.11.4 | 60 | 7/17/2024 |
12.11.3 | 111 | 5/30/2024 |
12.11.2 | 258 | 5/14/2024 |
12.11.1 | 117 | 4/11/2024 |
12.11.0 | 652 | 4/5/2024 |
12.10.0 | 118 | 3/15/2024 |
12.9.2 | 498 | 2/2/2024 |
12.9.1 | 111 | 1/25/2024 |
12.9.0 | 1,032 | 1/10/2024 |
12.8.0 | 150 | 1/2/2024 |
12.7.0 | 420 | 12/14/2023 |
12.6.0 | 148 | 11/13/2023 |
12.5.0 | 1,031 | 10/20/2023 |
12.4.0 | 151 | 8/28/2023 |
12.3.1 | 142 | 6/30/2023 |
12.3.0 | 322 | 6/23/2023 |
12.2.1 | 246 | 5/25/2023 |
12.2.0 | 123 | 5/24/2023 |
12.1.1 | 193 | 4/19/2023 |
12.1.0 | 203 | 4/18/2023 |
12.0.3 | 342 | 3/29/2023 |
12.0.2 | 192 | 3/28/2023 |
12.0.1 | 222 | 3/27/2023 |
12.0.0 | 275 | 3/23/2023 |
11.0.2 | 240 | 2/10/2023 |
11.0.1 | 261 | 2/9/2023 |
11.0.0 | 1,387 | 2/2/2023 |
10.18.1 | 1,032 | 1/3/2023 |
10.18.0 | 345 | 12/20/2022 |
10.17.5 | 1,443 | 11/8/2022 |
10.17.4 | 327 | 11/2/2022 |
10.17.3 | 389 | 10/24/2022 |
10.17.2 | 1,584 | 10/20/2022 |
10.17.1 | 395 | 10/17/2022 |
10.17.0 | 406 | 10/11/2022 |
10.16.2 | 468 | 9/23/2022 |
10.16.1 | 459 | 9/22/2022 |
10.16.0 | 385 | 9/20/2022 |
10.15.2 | 1,755 | 9/2/2022 |
10.15.1 | 1,514 | 8/29/2022 |
10.15.0 | 394 | 8/25/2022 |
10.14.1 | 390 | 8/12/2022 |
10.14.0 | 390 | 8/11/2022 |