KanBo.Client 3.0.1

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

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

Namepsaces

KanBo.Client - Main namespace containg all helpers for creating tokens and calling api
KanBo.Api - Namespace containg all api methods and data structures
        .GetData - methods that return kanbo data
        .Action - methods that make some actions in kanbo
        .Data - kanbo data types used for varoius calls nad responses

General properties required for creating kanbo token and requester

string kanboCertificatePath = @"F:\Certs\SomeGeneratedCertificate.pfx";    
string kanboCertificatePassword = @"$#testPassWord123#$";    
or
string thumbprint = "06 ac 19 8c 89 c3 f7 cb bd 9d 49 f8 64 15 42 2a ea 15 da 5e".Replace(" ", "");

string kanboUrl = @"https://somekanbo.azurewebsites.net";    
string kanboCertificateIssuer = "kanbo-client";    

Token properties

Properties required for creating user impersonating token
        int kanboUserId = 1; // Id of a user that will be impersonated 
        string kanboUserLogin = "t.name@somesp.onmicrosoft.com"; // Login of a user that will be impersonated
        string kanboLoginType = "upn-graph"; // Login type - used only in .AsLogin() operation
        
Available types:
.AsService() - service token
.AsServiceWithEmail("name@test.onmicrosoft.com") - service token with email impersonation
.AsKanBoUserId(kanboUserId) - user token
.AsLogin(kanboUserLogin, kanboLoginType) - login token
.AsEmail("name@test.onmicrosoft.com") - email token

//AsLogin has build in wrappers showed below

.AsSpOnpremLogin("i:0#.w|domain/login") 
.AsSpOnlineLogin("i:0#.f|membership|login@domain.onmicrosoft.com")
.AsSpOnlineUpn("name@test.onmicrosoft.com")
.AsO365UserId("2980b5dc-6c76-4867-9808-7fd00ae234c4")
.AsO365Upn("name@test.onmicrosoft.com")

//AsEmail has build in wrapper showed below

.AsServiceWithEmail("name@test.onmicrosoft.com")
Extra Token options
.WithAuthRoles(string[] roles) - adding roles for token

Create certificate object

Example 1
    var kanboCertificate = new X509Certificate2(kanboCertificatePath, kanboCertificatePassword);    
Example 2
    var thumbprint = "06 ac 19 8c 89 c3 f7 cb bd 9d 49 f8 64 15 42 2a ea 15 da 5e".Replace(" ", "");
    using var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
    store.Open(OpenFlags.ReadOnly);
    var certificates = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false);

Creating requester

var req = ApiBuilder.New.WithJsonApi(kanboUrl).WithIssuer(kanboCertificateIssuer)
            .WithRsaSignature(kanboCertificate).AsService().Build();
        

Calling api

Task.Run(async () =>
{
    /* Get board with Id=1 */
    var board = await req.GetData(new KanBo.Api.GetData.Board {Id = 1});
}).Wait();

Using Rich text editor

//Each line of text is equal to new rich text block
var rtEd = new KanBo.Client.Helpers.RTEditor();
RichText rt = rtEd
    .CreateTextBlock("Some Text").CreateBold(0,4) //line of text in which 'Some' is bold
    .CreateCheckedItemBlock("Done item").CreateBold(0,4).GetRichText() //in new line add checked item with 'Done' bold
    .CreateEmptyLine() //create an empty line
    .CreateTextBlock("Some Text").CreateItalic(5,4) //new line with text in wich 'Text' is italic
    .GetRichText();

Using Config Manager to generate json config for KanBo

var cm = new ConfigManager()
            .SetIssuer("ui-path-actions-cert")
            .AddCertFromFile(kanboConfigCertificatePath)
            .AddServiceMapper("UiPathservice", new string[2] {"service","external-services"})
            .AddUserMapper()
            .AddEmailMapper(new string[1] {"external-services"})
            .AddLoginMapper(new string[1] {"*"})
            .GetJsonConfig();
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.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
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
3.0.3 575 8/19/2024
3.0.2 87 7/26/2024
3.0.1 106 7/12/2024
3.0.0 110 6/19/2024
1.0.3 104 6/18/2024
1.0.2 2,386 2/11/2022