SolidCompany.Interop.Gus is a .NET Core/.NET StandardNET Core/.NET Standard interop package for Statistics Poland (pol. Główny Urząd Statystyczny, GUS) API. Enables downoading legal entity data using Polish TAX Id (NIP).
You can get SolidCompany.Interop.Gus package by downloading it from NuGet feed.
SolidCompany.Interop.Gus requires a key that you can obtain from GUS. The whole instruction is available here.
When you receive your key then you are free to use the client:
await using var client = new GusBirClient("your_key", GusEnironment.Production);
var result = await client.FindByNipAsync("5261040828");
if (result.Success)
{
var found = result.Entities;
}If you'd like to use GusBirClient with dependency injection then you can install a companion package SolidCompany.Interop.Gus.DependencyInjection.
The only thing you need to do then is to add the following line of code to your service configuration:
services.AddGusClient(c =>
{
c.Environment = GusEnironment.Production;
c.Key = "your_key";
});You'll be able to access GusBirClient through IGusBirClient interface.