Class TxClient
The SDK client to perform Tx API calls.
Inheritance
Inherited Members
Namespace: Textkernel.Tx
Assembly: Textkernel.Tx.SDK.dll
Syntax
public class TxClient : ITxClient, IDisposable
Constructors
| Improve this Doc View SourceTxClient(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>();
Declaration
public TxClient(HttpClient httpClient, TxClientSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpClient | httpClient | The HttpClient to use |
TxClientSettings | settings | The settings for this client |
Properties
| Improve this Doc View SourceFormatter
Contains all endpoints/methods for the Resume Formatter
Declaration
public IFormatterService Formatter { get; }
Property Value
Type | Description |
---|---|
IFormatterService |
Geocoder
Contains all endpoints/methods for the Geocoder
Declaration
public IGeocoderService Geocoder { get; }
Property Value
Type | Description |
---|---|
IGeocoderService |
Parser
Contains all endpoints/methods for the Resume & Job Parsers
Declaration
public IParserService Parser { get; }
Property Value
Type | Description |
---|---|
IParserService |
SearchMatchV1
Contains all endpoints/methods for Search & Match
Declaration
public ISearchMatchService SearchMatchV1 { get; }
Property Value
Type | Description |
---|---|
ISearchMatchService |
SearchMatchV2
Contains all endpoints/methods for Match V2
Declaration
public IMatchV2Service SearchMatchV2 { get; set; }
Property Value
Type | Description |
---|---|
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
Declaration
public static bool ShowFullRequestBodyInExceptions { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SkillsIntelligence
Contains all endpoints/methods for Skills Intelligence
Declaration
public ISkillsIntelligenceClient SkillsIntelligence { get; }
Property Value
Type | Description |
---|---|
ISkillsIntelligenceClient |
Methods
| Improve this Doc View SourceDispose()
Disposes this object and the contained HttpClient
Declaration
public void Dispose()
GetAccountInfo()
Get the account info (remaining credits, max concurrency, etc).
Declaration
public async Task<GetAccountInfoResponse> GetAccountInfo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GetAccountInfoResponse> |
Exceptions
Type | Condition |
---|---|
TxException | Thrown when an API error occurs |