|
1 | 1 |
|
2 | | -# ipdata |
3 | | -[](https://github.com/alexkhil/IPData/blob/master/LICENSE) [](https://www.nuget.org/packages/IPData/) [](https://dev.azure.com/alexkhildev/IPData/_build/latest?definitionId=4?branchName=master) [](https://img.shields.io/azure-devops/coverage/alexkhildev/ipdata/4/master) |
| 2 | +# ipdata |
| 3 | +[](https://github.com/alexkhil/IPData/blob/master/LICENSE) [](https://www.nuget.org/packages/IPData/) |
| 4 | + |
| 5 | +> **v3.0.0 Breaking Changes** — All public types have been renamed to follow .NET naming conventions for two-letter acronyms. See the [Migration Guide](#migrating-from-v2-to-v3) for details. |
4 | 6 |
|
5 | 7 | [ipdata.co](https://ipdata.co/) is a fast, reliable and clean service that allows you to look up the location of an IP Address and other data. |
6 | 8 |
|
|
17 | 19 | - [Currency](#currency) |
18 | 20 | - [Threat](#threat) |
19 | 21 | - [EU Endpoint](#eu-endpoint) |
| 22 | +- [Migrating from v2 to v3](#migrating-from-v2-to-v3) |
20 | 23 | - [Contributing](#contributing) |
21 | 24 | - [Versioning](#versioning) |
22 | 25 | - [License](#license) |
@@ -140,6 +143,47 @@ var client = new IPDataClient("API_KEY", new Uri("https://eu-api.ipdata.co")); |
140 | 143 | var ipInfo = await client.Lookup("8.8.8.8"); |
141 | 144 | ``` |
142 | 145 |
|
| 146 | +## Migrating from v2 to v3 |
| 147 | + |
| 148 | +v3.0.0 renames all public types to follow [.NET naming conventions](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions) for two-letter acronyms. It also adds EU endpoint support and a `Company` lookup. |
| 149 | + |
| 150 | +### Renamed types |
| 151 | + |
| 152 | +| v2 | v3 | |
| 153 | +|---|---| |
| 154 | +| `IpDataClient` | `IPDataClient` | |
| 155 | +| `IIpDataClient` | `IIPDataClient` | |
| 156 | +| `IpInfo` | `IPInfo` | |
| 157 | + |
| 158 | +### Namespace change |
| 159 | + |
| 160 | +```diff |
| 161 | +- using IpData; |
| 162 | +- using IpData.Models; |
| 163 | ++ using IPData; |
| 164 | ++ using IPData.Models; |
| 165 | +``` |
| 166 | + |
| 167 | +### NuGet package |
| 168 | + |
| 169 | +The package ID has changed from `IpData` to `IPData`: |
| 170 | + |
| 171 | +```bash |
| 172 | +dotnet remove package IpData |
| 173 | +dotnet add package IPData --version 3.0.0 |
| 174 | +``` |
| 175 | + |
| 176 | +### New features in v3 |
| 177 | + |
| 178 | +- **EU endpoint** — Pass a custom base URL to route requests through EU servers: |
| 179 | + ```csharp |
| 180 | + var client = new IPDataClient("API_KEY", new Uri("https://eu-api.ipdata.co")); |
| 181 | + ``` |
| 182 | +- **Company lookup** — Fetch company info for an IP: |
| 183 | + ```csharp |
| 184 | + var companyInfo = await client.Company("8.8.8.8"); |
| 185 | + ``` |
| 186 | + |
143 | 187 | ## Contributing |
144 | 188 |
|
145 | 189 | Please read [CONTRIBUTING.md][CONTRIBUTING] for details on our code of conduct, and the process for submitting pull requests to us. |
|
0 commit comments