You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can check the **example.rb** file to learn more about usage.
10
+
# Developer Documentation
11
+
To learn more about installation, usage, and code examples, please visit the developer documentation at [https://ip2proxy-ruby.readthedocs.io/en/latest/index.html.](https://ip2proxy-ruby.readthedocs.io/en/latest/index.html)
12
12
13
-
## BIN Database
14
-
An outdated BIN database was provided in the library for your testing. You are recommended to visit the [links](#dependencies) to download the latest BIN database and save it in the ```rb``` folder.
15
-
16
-
Below is the description of the functions available in the **BIN Database** lookup.
17
-
18
-
|Method Name|Description|
19
-
|---|---|
20
-
|open|Open the IP2Proxy BIN data with **File I/O** mode for lookup.|
21
-
|close|Close and clean up the file pointer.|
22
-
|get_package_version|Get the package version (1 to 11 for PX1 to PX11 respectively).|
23
-
|get_module_version|Get the module version.|
24
-
|get_database_version|Get the database version.|
25
-
|is_proxy|Check whether if an IP address was a proxy. Please see [Proxy Type](#proxy-type) for details. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address</li></ul>|
26
-
|get_all|Return the proxy information in array.|
27
-
|get_proxytype|Return the proxy type. Please visit <ahref="https://www.ip2location.com/database/px11-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential-provider"target="_blank">IP2Location</a> for the list of proxy types supported|
28
-
|get_country_short|Return the ISO3166-1 country code (2-digits) of the proxy.|
29
-
|get_country_long|Return the ISO3166-1 country name of the proxy.|
30
-
|get_region|Return the ISO3166-2 region name of the proxy. Please visit <ahref="https://www.ip2location.com/free/iso3166-2"target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
31
-
|get_city|Return the city name of the proxy.|
32
-
|get_isp|Return the ISP name of the proxy.|
33
-
|get_domain|Return the domain name of proxy's IP address or domain name.|
34
-
|get_usagetype|Return the ISP's usage type of proxy's IP address or domain name. Please see [Usage Type](#usage-type) for details.|
35
-
|get_asn|Return the autonomous system number (ASN) of proxy's IP address or domain name.|
36
-
|get_as|Return the autonomous system (AS) name of proxy's IP address or domain name.|
37
-
|get_last_seen|Return the last seen days ago value of proxy's IP address or domain name.|
38
-
|get_threat|Return the threat types reported to proxy's IP address or domain name. Please see [Threat Type](#threat-type) for details.|
39
-
|get_provider|Returns the VPN service provider name if available.|
40
-
41
-
## Web Service
42
-
Below is the description of the functions available in the **Web Service** lookup.
43
-
44
-
| Function Name | Description |
45
-
|---|---|
46
-
| Constructor | Expect 3 input parameters:<ol><li>IP2Proxy API Key.</li><li>Package (PX1 - PX11)</li></li><li>Use HTTPS or HTTP</li></ol> |
47
-
| lookup | Return the proxy information in array.<ul><li>countryCode</li><li>countryName</li><li>regionName</li><li>cityName</li><li>isp</li><li>domain</li><li>usageType</li><li>asn</li><li>as</li><li>lastSeen</li><li>threat</li><li>proxyType</li><li>isProxy</li><li>provider</li><ul> |
48
-
| get_credit | Return remaining credit of the web service account. |
0 commit comments