ThinkBase.Client
1.0.28
See the version list below for details.
dotnet add package ThinkBase.Client --version 1.0.28
NuGet\Install-Package ThinkBase.Client -Version 1.0.28
<PackageReference Include="ThinkBase.Client" Version="1.0.28" />
paket add ThinkBase.Client --version 1.0.28
#r "nuget: ThinkBase.Client, 1.0.28"
// Install ThinkBase.Client as a Cake Addin #addin nuget:?package=ThinkBase.Client&version=1.0.28 // Install ThinkBase.Client as a Cake Tool #tool nuget:?package=ThinkBase.Client&version=1.0.28
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 | Versions 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. |
-
.NETCoreApp 3.1
- GraphQL.Client (>= 4.0.2)
- GraphQL.Client.Serializer.Newtonsoft (>= 4.0.2)
- GraphQL.Client.Serializer.SystemTextJson (>= 4.0.2)
- Newtonsoft.Json (>= 13.0.1)
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 | 498 | 5/24/2022 |
1.0.45 | 452 | 5/20/2022 |
1.0.44 | 466 | 5/6/2022 |
1.0.43 | 472 | 4/24/2022 |
1.0.42 | 461 | 4/19/2022 |
1.0.41 | 449 | 4/18/2022 |
1.0.40 | 451 | 4/7/2022 |
1.0.39 | 461 | 4/5/2022 |
1.0.38 | 439 | 4/5/2022 |
1.0.37 | 456 | 4/1/2022 |
1.0.36 | 473 | 2/4/2022 |
1.0.35 | 487 | 2/4/2022 |
1.0.34 | 465 | 2/4/2022 |
1.0.33 | 474 | 2/4/2022 |
1.0.32 | 484 | 2/4/2022 |
1.0.31 | 471 | 2/1/2022 |
1.0.30 | 457 | 1/31/2022 |
1.0.29 | 468 | 1/28/2022 |
1.0.28 | 453 | 1/22/2022 |
1.0.27 | 452 | 1/22/2022 |
1.0.26 | 452 | 1/21/2022 |
1.0.25 | 445 | 1/20/2022 |
1.0.24 | 462 | 1/17/2022 |
1.0.23 | 296 | 1/1/2022 |
1.0.22 | 293 | 1/1/2022 |
1.0.21 | 305 | 12/7/2021 |
1.0.20 | 288 | 12/7/2021 |
1.0.19 | 1,041 | 12/3/2021 |
1.0.18 | 283 | 12/2/2021 |
1.0.17 | 289 | 12/2/2021 |
1.0.16 | 358 | 10/26/2021 |
1.0.15 | 433 | 10/23/2021 |
1.0.14 | 354 | 7/23/2021 |
1.0.13 | 471 | 7/17/2021 |
1.0.12 | 357 | 7/11/2021 |
1.0.10 | 354 | 7/11/2021 |
1.0.9 | 346 | 7/10/2021 |
1.0.8 | 335 | 7/7/2021 |
1.0.7 | 350 | 7/6/2021 |
1.0.6 | 357 | 7/6/2021 |
1.0.5 | 358 | 7/6/2021 |
1.0.4 | 331 | 7/6/2021 |
1.0.3 | 371 | 7/6/2021 |
1.0.1 | 324 | 7/6/2021 |
1.0.0 | 320 | 7/6/2021 |