TipsTrade.ApiClient.Core 8.0.0

dotnet add package TipsTrade.ApiClient.Core --version 8.0.0
                    
NuGet\Install-Package TipsTrade.ApiClient.Core -Version 8.0.0
                    
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="TipsTrade.ApiClient.Core" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TipsTrade.ApiClient.Core" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="TipsTrade.ApiClient.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TipsTrade.ApiClient.Core --version 8.0.0
                    
#r "nuget: TipsTrade.ApiClient.Core, 8.0.0"
                    
#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.
#:package TipsTrade.ApiClient.Core@8.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TipsTrade.ApiClient.Core&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=TipsTrade.ApiClient.Core&version=8.0.0
                    
Install as a Cake Tool

TipsTrade.ApiClient.Core NuGet

A collection of interfaces, classes and extension methods commonly used when writing API client libraries.

Versioning

  • As of version 8.x the package major version follows the .NET target version (e.g. 8.x.x targets net8.0).

Supported target frameworks

  • net8.0
  • net481 (for compatibility with older .NET Framework projects, but may not receive all new features going forward).

Packaging

  • Project generates a NuGet package on build (GeneratePackageOnBuild=true) and uses README.md as the package readme.
  • Project depends on Microsoft.Extensions.Logging.Abstractions (core package).

Namespaces and important types

TipsTrade.ApiClient.Core.Caching

  • IAddToCache<TKey> / IAddToCache<TKey, TValue> � methods to add items to a cache (AddToCacheAsync).
  • IGetFromCache<TKey> / IGetFromCache<TKey, TValue> � methods to retrieve items from a cache (GetFromCacheAsync).
  • IReadWriteCache<TKey> / IReadWriteCache<TKey, TValue> � convenience interfaces combining add/get.

TipsTrade.ApiClient.Core.Credential

  • IIsValid � exposes bool IsValid { get; } for credential validation.
  • UserCredential � simple user credentials (Username, Password) with IsValid behavior.
  • ApiKeyCredential � simple API key credentials (ApiKey, optional Secret) with IsValid behavior.
  • IGetCredential<TKey> and IGetCredential<TKey, TCredential> � retrieval methods: GetCredentialAsync<TCredential>(TKey key, ...) and GetCredentialAsync(TKey key, ...).
  • ISetCredential<TKey, TCredential>SetCredentialAsync(TKey key, TCredential credential, ...).
  • Extension methods:
    • GetCredentialOrThrowAsync � wraps GetCredentialAsync and throws a standardized exception (logs failure).
    • TrySetCredentialAsync � calls SetCredentialAsync and returns true on success, false on failure (logs failure).

TipsTrade.ApiClient.Core.Error

  • ApiException � exception type representing API errors. Properties: object? Error, string? Provider, HttpStatusCode? StatusCode. Factory: ApiException.FromHttpError(...).
  • HttpStatusCode.GetErrorMessage() � extension that returns a human-readable fallback message for common HTTP status codes.

TipsTrade.ApiClient.Core.Logging

  • IWithLogger � exposes ILogger? Logger { get; }.
  • Extensions:
    • GetLogger<T>(this T? value) � returns ILogger? if the value implements IWithLogger.
    • LogIf(this ILogger? logger, LogLevel level, Func<string> message) � logs only when the LogLevel is enabled.

TipsTrade.ApiClient.Core.Tenant

  • IGetTenant / IGetTenant<T>GetTenantAsync(...) to obtain tenant values.
  • Extension methods:
    • GetTenantOrDefaultAsync(this IGetTenant? tenant) � returns tenant string or "(default)".
    • GetTenantOrDefaultAsync<T>(this IGetTenant<T>? tenant, T defaultValue) � returns tenant or provided default.
    • GetTenantOrThrowAsync variants � wrap retrieval, log on error and throw standardized exception.

TipsTrade.ApiClient.Core.Threading

  • KeyedSemaphoreSlim<K> � a thread-safe keyed SemaphoreSlim store backed by ConcurrentDictionary<K, SemaphoreSlim>. Features:
    • WaitAsync(K key, ...) to wait on a specific key.
    • Release(K key) / TryRelease(K key) to release.
    • ContainsKey, GetCurrentCount, and configurable default counts.

Tests

  • The repository includes unit tests that exercise credential helpers, error helpers, JSON attribute assertions, threading utilities, and other behaviors.

Notes

  • The README has been synchronized with the codebase: method names, available extension methods, and interfaces reflect the actual source files.
  • For implementation details, public APIs and XML documentation are available in the source under the respective folders (e.g. Credential, Error, Logging, Tenant, Caching, Threading).
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on TipsTrade.ApiClient.Core:

Package Downloads
TipsTrade-HMRC

A strongly typed .NET client for interacting with the HMRC APIs

TipsTrade.Dvla

Provides access to the DVLA APIs.

TipsTrade.VCheck

Package Description

TipsTrade.UkVehicleData

HTTP client and dependency-injection extensions for the UK Vehicle Data REST API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0 287 5/28/2026
1.1.0.9 213 5/27/2026
1.1.0.8 102 5/26/2026
1.1.0.7 260 7/30/2025
1.1.0.6 212 7/30/2025