Table of Contents

Class TxClient

Namespace
Textkernel.Tx
Assembly
Textkernel.Tx.SDK.dll

The SDK client to perform Tx API calls.

public class TxClient : ITxClient, IDisposable
Inheritance
TxClient
Implements
Inherited Members

Constructors

TxClient(HttpClient, TxClientSettings)

This constructor allows the user to specify the HttpClient to use. For best practices, see here.
Here is an example of how to inject a TxClient with DI:

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton(_ => new TxClientSettings
{
    AccountId = "12345678",
    ...
});
//requires Microsoft.Extensions.Http package
builder.Services.AddHttpClient<ITxClient, TxClient>();

//now you can retrieve your injected client from the service provider
TxClient client = builder.Services.GetRequiredService<TxClient>();
public TxClient(HttpClient httpClient, TxClientSettings settings)

Parameters

httpClient HttpClient

The HttpClient to use

settings TxClientSettings

The settings for this client

Properties

Formatter

Contains all endpoints/methods for the Resume Formatter

public IFormatterService Formatter { get; }

Property Value

IFormatterService

Geocoder

Contains all endpoints/methods for the Geocoder

public IGeocoderService Geocoder { get; }

Property Value

IGeocoderService

Parser

Contains all endpoints/methods for the Resume & Job Parsers

public IParserService Parser { get; }

Property Value

IParserService

SearchMatchV1

Contains all endpoints/methods for Search & Match

public ISearchMatchService SearchMatchV1 { get; }

Property Value

ISearchMatchService

SearchMatchV2

Contains all endpoints/methods for Match V2

public IMatchV2Service SearchMatchV2 { get; set; }

Property Value

IMatchV2Service

ShowFullRequestBodyInExceptions

Set to true for debugging API errors. It will show the full JSON request body in RequestBody
NOTE: do not set this to true in your production system, as it increases the memory footprint

public static bool ShowFullRequestBodyInExceptions { get; set; }

Property Value

bool

SkillsIntelligence

Contains all endpoints/methods for Skills Intelligence

public ISkillsIntelligenceClient SkillsIntelligence { get; }

Property Value

ISkillsIntelligenceClient

Methods

Dispose()

Disposes this object and the contained HttpClient

public void Dispose()

GetAccountInfo()

Get the account info (remaining credits, max concurrency, etc).

public Task<GetAccountInfoResponse> GetAccountInfo()

Returns

Task<GetAccountInfoResponse>

Exceptions

TxException

Thrown when an API error occurs