net6.0net7.0
Provides an interface to the Binner Swarm Api.
Published
Jan 26, 2023
3y ago
Total Downloads
4.7K
4,657
Install
dotnet add package Binner.SwarmApi --version 1.0.1
| Product | Versions |
|---|---|
| .NET |
README
Binner.SwarmApi
Provides an api interface to the Binner Swarm Api.
Description
A C# restful client for working with the open source Binner Swarm Api.
Usage
using Binner.SwarmApi;
var config = new SwarmApiConfiguration();
var client = new SwarmApiClient(config);
var response = await client.GetPartInformationAsync("LM358");
// process part information results
Error Handling
using Binner.SwarmApi;
var config = new SwarmApiConfiguration();
var client = new SwarmApiClient(config);
var response = await client.GetPartInformationAsync("LM358");
if (response.IsSuccessful)
{
// process part information results
foreach (var part in response.Response.Parts)
{
Console.WriteLine($"Part Number: {part.BasePartNumber}");
Console.WriteLine($"Type: {part.PartType}");
Console.WriteLine($"Mfr: {part.Manufacturer} = {part.ManufacturerPartNumber}");
Console.WriteLine($"Datasheets: {string.Join(", ", part.DatasheetUrls)}");
Console.WriteLine();
}
} else {
var x = 0;
foreach (var error in response.Errors)
{
x++;
Console.WriteLine($" [{x}] {error}");
}
}
Changes from Previous Version
v1.0.0v1.0.1
Added Dependencies
Newtonsoft.Json(net6.0)
Newtonsoft.Json(net7.0)
Removed Dependencies
Binner.Model(net6.0)
Binner.Model(net7.0)
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.