An open API service indexing awesome lists of open source software.

https://github.com/hemulgm/ipinfo_api

ipinfo.io API for Delphi
https://github.com/hemulgm/ipinfo_api

api-wrapper delphi ipinfo

Last synced: 3 months ago
JSON representation

ipinfo.io API for Delphi

Awesome Lists containing this project

README

          

# [IPinfo](https://ipinfo.io/) IPinfo Delphi Client Library

```Pascal
uses
HGM.IpInfo;
...
var
Details: TDetails;
begin
with TIpInfo.Create('') do
try
if GetDetails(Details, '8.8.8.8') then
try
Memo1.Lines.Add(Details.Country);
finally
Details.Free;
end;
finally
Free;
end;
end;
```

```Pascal
var
IpInfo: IIpInfo;
ASN: TASN;
begin
IpInfo := TIpInfo.Create('', True);
IpInfo.RaiseErrors := True;
if IpInfo.GetASN(ASN, 'AS7922') then
try
Memo1.Lines.Add(ASN.Domain);
finally
ASN.Free;
end;
end;
```

```Pascal
Memo1.Lines.Add(IpInfo.GetItem('city', '2001:4860:4860::8888'));
```

Получить токен можно здесь: https://ipinfo.io/account/home