IpStack 2.2.0
See the version list below for details.
dotnet add package IpStack --version 2.2.0
NuGet\Install-Package IpStack -Version 2.2.0
<PackageReference Include="IpStack" Version="2.2.0" />
paket add IpStack --version 2.2.0
#r "nuget: IpStack, 2.2.0"
// Install IpStack as a Cake Addin #addin nuget:?package=IpStack&version=2.2.0 // Install IpStack as a Cake Tool #tool nuget:?package=IpStack&version=2.2.0
IpStack
.NET wrapper to query the IpStack API for IP address data.
Installation
To use IpStack in your C# project, you can either download the IpStack C# .NET libraries directly from the Github repository or, if you have the NuGet package manager installed, you can grab them automatically.
PM> Install-Package IpStack
Once you have the IpStack libraries properly referenced in your project, you can include calls to them in your code.
Add the following namespaces to use the library:
using IpStack;
using IpStack.Models;
Usage
The client is intended to be used via Dependency Injection and added using the AddIpStack
extension.
// Add API client
serviceCollection.AddIpStack(
"<API KEY>"
);
The injected client can then be used as expected.
public class App
{
private readonly ILogger<App> _logger;
private readonly IIpStackService _IpStackService;
public App(ILoggerFactory loggerFactory, IIpStackService IpStackService)
{
_logger = loggerFactory.CreateLogger<App>();
_IpStackService = IpStackService;
}
public async Task RunAsync()
{
var ipAddressDetails = await _IpStackService.GetIpAddressDetailsAsync();
}
}
See the debug project for an example.
Product | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.WebUtilities (>= 8.0.3)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.FileExtensions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- Microsoft.Extensions.Logging.Debug (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- RestSharp (>= 110.2.0)
- Serilog (>= 3.1.1)
- Serilog.Extensions.Logging (>= 8.0.0)
- Serilog.Sinks.Console (>= 5.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Refactor