ThinkBase.Client 1.0.22

There is a newer version of this package available.
See the version list below for details.
dotnet add package ThinkBase.Client --version 1.0.22                
NuGet\Install-Package ThinkBase.Client -Version 1.0.22                
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="ThinkBase.Client" Version="1.0.22" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ThinkBase.Client --version 1.0.22                
#r "nuget: ThinkBase.Client, 1.0.22"                
#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 ThinkBase.Client as a Cake Addin
#addin nuget:?package=ThinkBase.Client&version=1.0.22

// Install ThinkBase.Client as a Cake Tool
#tool nuget:?package=ThinkBase.Client&version=1.0.22                

ThinkBase.Client

ThinkBase .net 5 client This is a simple client for accessing, inferring from and creating ThinkBase models on the SaaS site darl.dev. ThinkBase is a Knowledge Graph inference engine. Read more about ThinkBase at the documentation.

The most recent nuget package can be found here.

Usage

Create a client with your ThinkBase API key and the name of the graph

var client = new Client("<API key>", "graphName");
var topLevelModel = await client.FetchModel();
topLevelModel.Init();

Create some knowledge states and link them. In this case "c" is a country object with name and id. "m" is a monarch with name and id and a link to a country ks via its subject ID.

var countryKS = new KnowledgeState();
await client.SetDataValue(countryKS, "country", "name", c.Name);
await client.SetDataValue(countryKS, "country", "id", c.Id.ToString());
countryKS.subjectId = "country:" + c.Id.ToString();
await client.CreateKnowledgeState(countryKS);
var monarchKS = new KnowledgeState();
await client.SetDataValue(monarchKS, "monarch", "name", m.Name);
await client.SetDataValue(monarchKS, "monarch", "id", m.Id.ToString());
await client.SetConnectionPresence(monarchKS, "monarch", "country", "country:" + m.CountryId.ToString());
monarchKS.subjectId = "monarch:" + m.Id.ToString();
await client.CreateKnowledgeState(monarchKS);

In each case above, if the "country" or "monarch" objects in the graph don't contain the matching properties an exception is thrown. Similarly, the SetConnectionPresence call checks to see if a connection exists between the two nodes described. Knowledge states are linked by subject ID. If a subjectId specified in a link does not exist no error is thrown at runtime but the path described will be ignored.

You can fetch a knowledge state by its subject Id.

var customerKS = await client.GetKnowledgeState("customer:" + customerId.ToString());
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 netcoreapp3.1 is compatible. 
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
1.0.46 496 5/24/2022
1.0.45 450 5/20/2022
1.0.44 464 5/6/2022
1.0.43 470 4/24/2022
1.0.42 459 4/19/2022
1.0.41 447 4/18/2022
1.0.40 449 4/7/2022
1.0.39 459 4/5/2022
1.0.38 437 4/5/2022
1.0.37 454 4/1/2022
1.0.36 471 2/4/2022
1.0.35 485 2/4/2022
1.0.34 461 2/4/2022
1.0.33 472 2/4/2022
1.0.32 482 2/4/2022
1.0.31 469 2/1/2022
1.0.30 455 1/31/2022
1.0.29 466 1/28/2022
1.0.28 451 1/22/2022
1.0.27 450 1/22/2022
1.0.26 450 1/21/2022
1.0.25 443 1/20/2022
1.0.24 460 1/17/2022
1.0.23 294 1/1/2022
1.0.22 291 1/1/2022
1.0.21 303 12/7/2021
1.0.20 286 12/7/2021
1.0.19 1,039 12/3/2021
1.0.18 281 12/2/2021
1.0.17 287 12/2/2021
1.0.16 356 10/26/2021
1.0.15 431 10/23/2021
1.0.14 350 7/23/2021
1.0.13 469 7/17/2021
1.0.12 355 7/11/2021
1.0.10 352 7/11/2021
1.0.9 344 7/10/2021
1.0.8 333 7/7/2021
1.0.7 346 7/6/2021
1.0.6 355 7/6/2021
1.0.5 356 7/6/2021
1.0.4 329 7/6/2021
1.0.3 369 7/6/2021
1.0.1 322 7/6/2021
1.0.0 318 7/6/2021