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
HttpClientThe HttpClient to use
settings
TxClientSettingsThe settings for this client
Properties
Formatter
Contains all endpoints/methods for the Resume Formatter
public IFormatterService Formatter { get; }
Property Value
Geocoder
Contains all endpoints/methods for the Geocoder
public IGeocoderService Geocoder { get; }
Property Value
Parser
Contains all endpoints/methods for the Resume & Job Parsers
public IParserService Parser { get; }
Property Value
SearchMatchV1
Contains all endpoints/methods for Search & Match
public ISearchMatchService SearchMatchV1 { get; }
Property Value
SearchMatchV2
Contains all endpoints/methods for Match V2
public IMatchV2Service SearchMatchV2 { get; set; }
Property Value
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
SkillsIntelligence
Contains all endpoints/methods for Skills Intelligence
public ISkillsIntelligenceClient SkillsIntelligence { get; }
Property Value
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
Exceptions
- TxException
Thrown when an API error occurs