Skip to content

Commit a915adf

Browse files
committed
Rename IpData to IPData and bump to version 3.0.0
BREAKING CHANGE: Rename all public types to follow .NET naming conventions for two-letter acronyms (IP should be all-caps): - Namespace: IpData → IPData - IpDataClient → IPDataClient - IIpDataClient → IIPDataClient - IpInfo → IPInfo Also renames all directories, project files, and solution file. Bumps package version from 2.0.1 to 3.0.0. https://claude.ai/code/session_01GqyDyB2zrpxr1ZVw8vFVg3
1 parent a6519d6 commit a915adf

47 files changed

Lines changed: 210 additions & 252 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Describe the big picture of your changes here to communicate to the maintainers
44

55
## Types of changes
66

7-
What types of changes does your code introduce to IpData?
7+
What types of changes does your code introduce to IPData?
88
_Put an `x` in the boxes that apply_
99

1010
- [ ] Bugfix (non-breaking change which fixes an issue)
@@ -15,7 +15,7 @@ _Put an `x` in the boxes that apply_
1515

1616
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
1717

18-
- [ ] I have read the [CONTRIBUTING](https://github.com/alexkhil/IpData/blob/master/.github/CONTRIBUTING.md) doc
18+
- [ ] I have read the [CONTRIBUTING](https://github.com/alexkhil/IPData/blob/master/.github/CONTRIBUTING.md) doc
1919
- [ ] Lint and unit tests pass locally with my changes
2020
- [ ] I have added tests that prove my fix is effective or that my feature works
2121
- [ ] I have added necessary documentation (if appropriate)

.github/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# ipdata
3-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/alexkhil/IpData/blob/master/LICENSE) [![IpData](https://img.shields.io/nuget/v/IpData.svg)](https://www.nuget.org/packages/IpData/) [![Build Status](https://dev.azure.com/alexkhildev/IpData/_apis/build/status/outer-loop?branchName=master)](https://dev.azure.com/alexkhildev/IpData/_build/latest?definitionId=4?branchName=master) [![Coverage Status](https://img.shields.io/azure-devops/coverage/alexkhildev/ipdata/4/master)](https://img.shields.io/azure-devops/coverage/alexkhildev/ipdata/4/master)
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/alexkhil/IPData/blob/master/LICENSE) [![IPData](https://img.shields.io/nuget/v/IPData.svg)](https://www.nuget.org/packages/IPData/) [![Build Status](https://dev.azure.com/alexkhildev/IPData/_apis/build/status/outer-loop?branchName=master)](https://dev.azure.com/alexkhildev/IPData/_build/latest?definitionId=4?branchName=master) [![Coverage Status](https://img.shields.io/azure-devops/coverage/alexkhildev/ipdata/4/master)](https://img.shields.io/azure-devops/coverage/alexkhildev/ipdata/4/master)
44

55
[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.
66

@@ -26,13 +26,13 @@
2626
NuGet package install using package manager:
2727

2828
```bash
29-
Install-Package IpData -Version 2.0.1
29+
Install-Package IPData -Version 3.0.0
3030
```
3131

3232
NuGet package install using .NET CLI:
3333

3434
```bash
35-
dotnet add package IpData --version 2.0.1
35+
dotnet add package IPData --version 3.0.0
3636
```
3737

3838
## Lookup
@@ -42,11 +42,11 @@ All usage examples you can find on `samples` folder.
4242
### Basic
4343

4444
```csharp
45-
var client = new IpDataClient("API_KEY");
45+
var client = new IPDataClient("API_KEY");
4646

4747
// Get IP data from my IP
48-
var myIpInfo = await client.Lookup();
49-
Console.WriteLine($"Country name for {myIpInfo.Ip} is {myIpInfo.CountryName}");
48+
var myIPInfo = await client.Lookup();
49+
Console.WriteLine($"Country name for {myIPInfo.Ip} is {myIPInfo.CountryName}");
5050

5151
// Get IP data from IP
5252
var ipInfo = await client.Lookup("8.8.8.8");
@@ -67,7 +67,7 @@ From ipdata.co docs:
6767
> Note that bulk lookups are only available to paid users and are currently limited to a 100 at a time. Reach out to support if you need to lookup larger batches.
6868
6969
```csharp
70-
var client = new IpDataClient("API_KEY");
70+
var client = new IPDataClient("API_KEY");
7171

7272
var ipInfoList = await client.Lookup(new string[] { "1.1.1.1", "2.2.2.2", "3.3.3.3" });
7373
foreach (var ipInfo in ipInfoList)
@@ -79,7 +79,7 @@ foreach (var ipInfo in ipInfoList)
7979
### Carrier
8080

8181
```csharp
82-
var client = new IpDataClient("API_KEY");
82+
var client = new IPDataClient("API_KEY");
8383

8484
var carrierInfo = await client.Carrier("69.78.70.144");
8585
Console.WriteLine($"Carrier name: {carrierInfo.Name}");
@@ -88,7 +88,7 @@ Console.WriteLine($"Carrier name: {carrierInfo.Name}");
8888
### Company
8989

9090
```csharp
91-
var client = new IpDataClient("API_KEY");
91+
var client = new IPDataClient("API_KEY");
9292

9393
var companyInfo = await client.Company("69.78.70.144");
9494
Console.WriteLine($"Company name: {companyInfo.Name}");
@@ -97,7 +97,7 @@ Console.WriteLine($"Company name: {companyInfo.Name}");
9797
### ASN
9898

9999
```csharp
100-
var client = new IpDataClient("API_KEY");
100+
var client = new IPDataClient("API_KEY");
101101

102102
var asnInfo = await client.Asn("69.78.70.144");
103103
Console.WriteLine($"ASN name: {asnInfo.Name}");
@@ -106,7 +106,7 @@ Console.WriteLine($"ASN name: {asnInfo.Name}");
106106
### Timezone
107107

108108
```csharp
109-
var client = new IpDataClient("API_KEY");
109+
var client = new IPDataClient("API_KEY");
110110

111111
var timezoneInfo = await client.TimeZone("69.78.70.144");
112112
Console.WriteLine($"TimeZone name: {timezoneInfo.Name}");
@@ -115,7 +115,7 @@ Console.WriteLine($"TimeZone name: {timezoneInfo.Name}");
115115
### Currency
116116

117117
```csharp
118-
var client = new IpDataClient("API_KEY");
118+
var client = new IPDataClient("API_KEY");
119119

120120
var currencyInfo = await client.Currency("69.78.70.144");
121121
Console.WriteLine($"Currency name: {currencyInfo.Name}");
@@ -124,7 +124,7 @@ Console.WriteLine($"Currency name: {currencyInfo.Name}");
124124
### Threat
125125

126126
```csharp
127-
var client = new IpDataClient("API_KEY");
127+
var client = new IPDataClient("API_KEY");
128128

129129
var threatInfo = await client.Threat("69.78.70.144");
130130
Console.WriteLine($"Threat is Tor: {threatInfo.IsTor}");
@@ -135,7 +135,7 @@ Console.WriteLine($"Threat is Tor: {threatInfo.IsTor}");
135135
To ensure your data stays in the EU, use the EU endpoint by passing a custom base URL:
136136

137137
```csharp
138-
var client = new IpDataClient("API_KEY", new Uri("https://eu-api.ipdata.co"));
138+
var client = new IPDataClient("API_KEY", new Uri("https://eu-api.ipdata.co"));
139139

140140
var ipInfo = await client.Lookup("8.8.8.8");
141141
```
@@ -153,8 +153,8 @@ We use [SemVer] for versioning. For the versions available, see the tags on this
153153
This project is licensed under the MIT License - see the [LICENSE.md][LICENSE] file for details
154154

155155

156-
[AzureStatus]: https://dev.azure.com/alexkhildev/IpData/_apis/build/status/gated?branchName=master
157-
[IpDataLogo]: https://image.ibb.co/iDQdUS/ipdatalogo.png
156+
[AzureStatus]: https://dev.azure.com/alexkhildev/IPData/_apis/build/status/gated?branchName=master
157+
[IPDataLogo]: https://image.ibb.co/iDQdUS/ipdatalogo.png
158158
[SemVer]: http://semver.org/
159-
[CONTRIBUTING]: https://github.com/alexkhil/IpData/blob/master/.github/CONTRIBUTING.md
160-
[LICENSE]: https://github.com/alexkhil/IpData/blob/master/LICENSE
159+
[CONTRIBUTING]: https://github.com/alexkhil/IPData/blob/master/.github/CONTRIBUTING.md
160+
[LICENSE]: https://github.com/alexkhil/IPData/blob/master/LICENSE

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: dotnet test --configuration Release --no-build --verbosity normal
2727

2828
- name: Pack
29-
run: dotnet pack src/IpData/IpData.csproj --configuration Release --no-build --output ./nupkg
29+
run: dotnet pack src/IPData/IPData.csproj --configuration Release --no-build --output ./nupkg
3030

3131
- name: Publish to NuGet
3232
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

IpData.sln renamed to IPData.sln

Lines changed: 5 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.28902.138
@@ -9,43 +9,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E961
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0FD24B4A-2B2B-4DCC-88F4-F13398F0CB18}"
1111
EndProject
12-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{CFFA9471-EC37-451E-BA20-3DA090F0A683}"
13-
EndProject
14-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tasks", "Tasks", "{C0FF3B0D-BE20-4F54-ACD3-D8B45CAD5B57}"
15-
ProjectSection(SolutionItems) = preProject
16-
build\cake\Tasks\build.cake = build\cake\Tasks\build.cake
17-
build\cake\Tasks\clean.cake = build\cake\Tasks\clean.cake
18-
build\cake\Tasks\create-nuget-package.cake = build\cake\Tasks\create-nuget-package.cake
19-
build\cake\Tasks\default.cake = build\cake\Tasks\default.cake
20-
build\cake\Tasks\publish-nuget-package.cake = build\cake\Tasks\publish-nuget-package.cake
21-
build\cake\Tasks\restore-nuget-packages.cake = build\cake\Tasks\restore-nuget-packages.cake
22-
build\cake\Tasks\run-unit-tests.cake = build\cake\Tasks\run-unit-tests.cake
23-
EndProjectSection
24-
EndProject
25-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cake", "cake", "{5CF04261-17B9-44F2-AD3F-C19C92796442}"
26-
ProjectSection(SolutionItems) = preProject
27-
build\cake\build.cake = build\cake\build.cake
28-
build\cake\build.ps1 = build\cake\build.ps1
29-
build\cake\build.sh = build\cake\build.sh
30-
build\cake\cake.config = build\cake\cake.config
31-
EndProjectSection
32-
EndProject
3312
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit", "Unit", "{6F037AC1-A8B5-4D89-B33A-BCDDB78553A6}"
3413
EndProject
35-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IpData", "src\IpData\IpData.csproj", "{7EE175C0-1309-4AA7-BC80-2F01A3855D9A}"
36-
EndProject
37-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IpData.Tests", "test\Unit\IpData.Tests\IpData.Tests.csproj", "{65B7BCF3-82C8-480E-ADC3-B45DD67BD565}"
38-
EndProject
39-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{049BFCD0-AD71-4357-91CF-62CC03D8FB39}"
40-
ProjectSection(SolutionItems) = preProject
41-
build\cake\tools\packages.config = build\cake\tools\packages.config
42-
EndProjectSection
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPData", "src\IPData\IPData.csproj", "{7EE175C0-1309-4AA7-BC80-2F01A3855D9A}"
4315
EndProject
44-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "azure-devops", "azure-devops", "{3A111F6A-56C3-4952-B45F-5CDA714D059F}"
45-
ProjectSection(SolutionItems) = preProject
46-
build\azure-devops\gated.yaml = build\azure-devops\gated.yaml
47-
build\azure-devops\outer-loop.yaml = build\azure-devops\outer-loop.yaml
48-
EndProjectSection
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPData.Tests", "test\Unit\IPData.Tests\IPData.Tests.csproj", "{65B7BCF3-82C8-480E-ADC3-B45DD67BD565}"
4917
EndProject
5018
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{3B7FCB46-B3B6-41EF-9495-3FA4D027E3FC}"
5119
ProjectSection(SolutionItems) = preProject
@@ -61,19 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEM
6129
.github\ISSUE_TEMPLATE\Feature_request.md = .github\ISSUE_TEMPLATE\Feature_request.md
6230
EndProjectSection
6331
EndProject
64-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{4C55C81D-E924-4BA9-9A6C-92B74EC4F7AE}"
65-
ProjectSection(SolutionItems) = preProject
66-
build\cake\Utils\paths.cake = build\cake\Utils\paths.cake
67-
EndProjectSection
68-
EndProject
6932
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70F5FBDA-9DAA-4675-938E-EC6E450852CE}"
7033
ProjectSection(SolutionItems) = preProject
7134
.editorconfig = .editorconfig
7235
.gitignore = .gitignore
7336
LICENSE = LICENSE
7437
EndProjectSection
7538
EndProject
76-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IpData.Lookup", "samples\IpData.Lookup\IpData.Lookup.csproj", "{3546F4B5-7D43-4332-914A-6A657D95CEB1}"
39+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPData.Lookup", "samples\IPData.Lookup\IPData.Lookup.csproj", "{3546F4B5-7D43-4332-914A-6A657D95CEB1}"
7740
EndProject
7841
Global
7942
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -98,15 +61,10 @@ Global
9861
HideSolutionNode = FALSE
9962
EndGlobalSection
10063
GlobalSection(NestedProjects) = preSolution
101-
{C0FF3B0D-BE20-4F54-ACD3-D8B45CAD5B57} = {5CF04261-17B9-44F2-AD3F-C19C92796442}
102-
{5CF04261-17B9-44F2-AD3F-C19C92796442} = {CFFA9471-EC37-451E-BA20-3DA090F0A683}
103-
{6F037AC1-A8B5-4D89-B33A-BCDDB78553A6} = {0FD24B4A-2B2B-4DCC-88F4-F13398F0CB18}
10464
{7EE175C0-1309-4AA7-BC80-2F01A3855D9A} = {6EF86008-5993-4F7A-8B4B-F30A85BC6EE8}
10565
{65B7BCF3-82C8-480E-ADC3-B45DD67BD565} = {6F037AC1-A8B5-4D89-B33A-BCDDB78553A6}
106-
{049BFCD0-AD71-4357-91CF-62CC03D8FB39} = {5CF04261-17B9-44F2-AD3F-C19C92796442}
107-
{3A111F6A-56C3-4952-B45F-5CDA714D059F} = {CFFA9471-EC37-451E-BA20-3DA090F0A683}
66+
{6F037AC1-A8B5-4D89-B33A-BCDDB78553A6} = {0FD24B4A-2B2B-4DCC-88F4-F13398F0CB18}
10867
{C92F6AF1-C354-4965-AD3C-938BC870F853} = {3B7FCB46-B3B6-41EF-9495-3FA4D027E3FC}
109-
{4C55C81D-E924-4BA9-9A6C-92B74EC4F7AE} = {5CF04261-17B9-44F2-AD3F-C19C92796442}
11068
{3546F4B5-7D43-4332-914A-6A657D95CEB1} = {E961F502-9430-4E81-95AE-C202E0AE643F}
11169
EndGlobalSection
11270
GlobalSection(ExtensibilityGlobals) = postSolution

samples/IpData.Lookup/IpData.Lookup.csproj renamed to samples/IPData.Lookup/IPData.Lookup.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<ProjectReference Include="..\..\src\IpData\IpData.csproj" />
12+
<ProjectReference Include="..\..\src\IPData\IPData.csproj" />
1313
</ItemGroup>
1414

1515
</Project>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
using System.Globalization;
33
using System.Threading.Tasks;
44

5-
namespace IpData.Lookup
5+
namespace IPData.Lookup
66
{
77
public static class Program
88
{
99
public static async Task Main()
1010
{
11-
var client = new IpDataClient("API_KEY");
11+
var client = new IPDataClient("API_KEY");
1212

1313
// Get IP data from my IP
14-
var myIpInfo = await client.Lookup();
15-
Console.WriteLine($"Country name for {myIpInfo.Ip} is {myIpInfo.CountryName}");
14+
var myIPInfo = await client.Lookup();
15+
Console.WriteLine($"Country name for {myIPInfo.Ip} is {myIPInfo.CountryName}");
1616

1717
// Get IP data from IP
1818
var ipInfo = await client.Lookup("8.8.8.8");
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
using System.Diagnostics.CodeAnalysis;
33
using System.Net;
44
using System.Runtime.Serialization;
5-
using IpData.Http.Serializer;
6-
using IpData.Models;
5+
using IPData.Http.Serializer;
6+
using IPData.Models;
77

8-
namespace IpData.Exceptions
8+
namespace IPData.Exceptions
99
{
1010
[Serializable]
1111
public class ApiException : Exception

src/IpData/Exceptions/BadRequestException.cs renamed to src/IPData/Exceptions/BadRequestException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Net;
44
using System.Runtime.Serialization;
55

6-
namespace IpData.Exceptions
6+
namespace IPData.Exceptions
77
{
88
[Serializable]
99
public class BadRequestException : ApiException

src/IpData/Exceptions/Factory/ApiExceptionFactory.cs renamed to src/IPData/Exceptions/Factory/ApiExceptionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Net;
44

5-
namespace IpData.Exceptions.Factory
5+
namespace IPData.Exceptions.Factory
66
{
77
internal class ApiExceptionFactory : IApiExceptionFactory
88
{

src/IpData/Exceptions/Factory/IApiExceptionFactory.cs renamed to src/IPData/Exceptions/Factory/IApiExceptionFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Net;
33

4-
namespace IpData.Exceptions.Factory
4+
namespace IPData.Exceptions.Factory
55
{
66
internal interface IApiExceptionFactory
77
{

0 commit comments

Comments
 (0)