![]() |
VOOZH | about |
dotnet add package Scarx.Public.Api --version 2.3.2
NuGet\Install-Package Scarx.Public.Api -Version 2.3.2
<PackageReference Include="Scarx.Public.Api" Version="2.3.2" />
<PackageVersion Include="Scarx.Public.Api" Version="2.3.2" />Directory.Packages.props
<PackageReference Include="Scarx.Public.Api" />Project file
paket add Scarx.Public.Api --version 2.3.2
#r "nuget: Scarx.Public.Api, 2.3.2"
#:package Scarx.Public.Api@2.3.2
#addin nuget:?package=Scarx.Public.Api&version=2.3.2Install as a Cake Addin
#tool nuget:?package=Scarx.Public.Api&version=2.3.2Install as a Cake Tool
The intended way to use the Scarx API client is to use dependency injection.
Within the ConfigureServices function, the Grpc Scarx Client can be added as follows:
Simple-Usage (without Api-Token):
services.AddGrpcScarxClient();
Simple-Usage (with Api-Token):
services.AddGrpcScarxClient("apiToken");
This makes the “IScarxApi” interface available as a transient service.
An exemplary use is:
public class Test
{
private readonly IScarxApi _api;
public Test(IScarxApi api)
{
this._api = api;
}
public async Task<IpDetails> GetIpInfo(string ip)
{
return await _api.Ip.GetIpDetailsAsync(new IpRequest(){Ip = ip});
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.