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 453 5/24/2022
1.0.45 426 5/20/2022
1.0.44 432 5/6/2022
1.0.43 439 4/24/2022
1.0.42 427 4/19/2022
1.0.41 425 4/18/2022
1.0.40 424 4/7/2022
1.0.39 435 4/5/2022
1.0.38 406 4/5/2022
1.0.37 429 4/1/2022
1.0.36 437 2/4/2022
1.0.35 442 2/4/2022
1.0.34 430 2/4/2022
1.0.33 443 2/4/2022
1.0.32 449 2/4/2022
1.0.31 440 2/1/2022
1.0.30 423 1/31/2022
1.0.29 436 1/28/2022
1.0.28 425 1/22/2022
1.0.27 422 1/22/2022
1.0.26 422 1/21/2022
1.0.25 415 1/20/2022
1.0.24 429 1/17/2022
1.0.23 266 1/1/2022
1.0.22 263 1/1/2022
1.0.21 278 12/7/2021
1.0.20 259 12/7/2021
1.0.19 1,011 12/3/2021
1.0.18 253 12/2/2021
1.0.17 266 12/2/2021
1.0.16 330 10/26/2021
1.0.15 404 10/23/2021
1.0.14 325 7/23/2021
1.0.13 443 7/17/2021
1.0.12 329 7/11/2021
1.0.10 326 7/11/2021
1.0.9 319 7/10/2021
1.0.8 307 7/7/2021
1.0.7 324 7/6/2021
1.0.6 328 7/6/2021
1.0.5 331 7/6/2021
1.0.4 305 7/6/2021
1.0.3 341 7/6/2021
1.0.1 298 7/6/2021
1.0.0 294 7/6/2021