ip-api.Net48
1.0.0
dotnet add package ip-api.Net48 --version 1.0.0
NuGet\Install-Package ip-api.Net48 -Version 1.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="ip-api.Net48" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ip-api.Net48" Version="1.0.0" />
<PackageReference Include="ip-api.Net48" />
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 ip-api.Net48 --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ip-api.Net48, 1.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 ip-api.Net48@1.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=ip-api.Net48&version=1.0.0
#tool nuget:?package=ip-api.Net48&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ip-api
A .NET Framework 4.8 client wrapper for accessing the ip-api API.
Installation
To use ip-api in your C# project, you can either download the ip-api 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 ip-api.Net48
Once you have the ip-api libraries properly referenced in your project, you can include calls to them in your code.
Add the following namespaces to use the library:
using ip_api.Net48;
using ip_api.Net48.Models;
Usage
The below code can be used in a .NET project.
public class Program
{
public static void Main(string[] args)
{
IpApiClient client = new IpApiClient();
// Get single IP address with defaults
IpAddressDetails singleDetails = client.GetIpAddressDetails("134.201.250.155");
// Get single IP address in Chinese
IpAddressDetails singleDetails = client.GetIpAddressDetails("134.201.250.155", LanguageOpition.Chinese);
// Get multiple IP addresses with defaults
List<IpAddressDetails> bulkDetails = client.GetIpAddressDetails(new List<string>() { "134.201.250.155", "72.229.28.185", "110.174.165.78" });
// Upgrade client to https
client = new IpApiClient(true);
// Get requestors address details
IpAddressDetails requestorDetails = client.GetRequesterIpAddressDetails();
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- RestSharp (>= 106.10.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 774 | 4/22/2020 |