Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ip2location committed Mar 5, 2024
2 parents 1ec4132 + 9013f19 commit 34deffe
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion docs/source/code.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# IP2Proxy .NET API

## Component Class
```{py:function} Open(DatabasePath)
```{py:function} Open(DatabasePath, IOMode)
Load the IP2Proxy BIN database for lookup.
:param String DatabasePath: (Required) The file path links to IP2Proxy BIN databases.
:param Enum IOMode: (Optional) Specify which mode to use when loading the BIN database. Available values are IOModes.IP2PROXY_FILE_IO and IOModes.IP2PROXY_MEMORY_MAPPED. Default is IOModes.IP2PROXY_FILE_IO.
```

```{py:function} Open(DBStream)
Initialize component with a stream that contains the BIN database then preload BIN file.
:param Stream DBStream: (Required) A stream that contains the BIN database.
```

```{py:function} Close()
Expand Down Expand Up @@ -41,6 +48,32 @@ Retrieve geolocation information for an IP address.
**RETURN FIELDS**
| Field Name | Description |
| ---------------- | ------------------------------------------------------------ |
| Country_Short | Two-character country code based on ISO 3166. |
| Country_Long | Country name based on ISO 3166. |
| Region | Region or state name. |
| City | City name. |
| Isp | Internet Service Provider or company\'s name. |
| Domain | Internet domain name associated with IP address range. |
| Usage_Type | Usage type classification of ISP or company. |
| Asn | Autonomous system number (ASN). |
| As | Autonomous system (AS) name. |
| Last_Seen | Proxy last seen in days. |
| Threat | Security threat reported. |
| Proxy_Type | Type of proxy. |
| Provider | Name of VPN provider if available. |
```

```{py:function} GetAllAsync(IP)
Retrieve geolocation information for an IP address.
:param String IP: (Required) The IP address (IPv4 or IPv6).
:return: Returns the geolocation information in array. Refer below table for the fields avaliable in the array
:rtype: array
**RETURN FIELDS**
| Field Name | Description |
| ---------------- | ------------------------------------------------------------ |
| Country_Short | Two-character country code based on ISO 3166. |
Expand Down

0 comments on commit 34deffe

Please sign in to comment.