@robinpath/ip
0.1.1Node.jsPublicIP module for RobinPath.
IP
IP module for RobinPath.
Package: @robinpath/ip | Category: Utility | Type: Utility
Authentication
No authentication required. All functions are available immediately.
Use Cases
Use the ip module when you need to:
- getMyIp -- Use
ip.getMyIpto perform this operation - geolocate -- Use
ip.geolocateto perform this operation - geolocateBatch -- Use
ip.geolocateBatchto perform this operation - isPrivate -- Use
ip.isPrivateto perform this operation - isValid -- Use
ip.isValidto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
getMyIp | getMyIp | object |
geolocate | geolocate | object |
geolocateBatch | geolocateBatch | object |
isPrivate | isPrivate | object |
isValid | isValid | object |
isIpv4 | isIpv4 | object |
isIpv6 | isIpv6 | object |
cidrContains | cidrContains | object |
cidrRange | cidrRange | object |
subnetInfo | subnetInfo | object |
reverseDns | reverseDns | object |
checkBlacklist | checkBlacklist | object |
Functions
getMyIp
getMyIp
Module: ip | Returns: object -- API response.
ip.getMyIp
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
geolocate
geolocate
Module: ip | Returns: object -- API response.
ip.geolocate
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
geolocateBatch
geolocateBatch
Module: ip | Returns: object -- API response.
ip.geolocateBatch
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
isPrivate
isPrivate
Module: ip | Returns: object -- API response.
ip.isPrivate
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
isValid
isValid
Module: ip | Returns: object -- API response.
ip.isValid
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
isIpv4
isIpv4
Module: ip | Returns: object -- API response.
ip.isIpv4
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
isIpv6
isIpv6
Module: ip | Returns: object -- API response.
ip.isIpv6
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
cidrContains
cidrContains
Module: ip | Returns: object -- API response.
ip.cidrContains
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
cidrRange
cidrRange
Module: ip | Returns: object -- API response.
ip.cidrRange
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
subnetInfo
subnetInfo
Module: ip | Returns: object -- API response.
ip.subnetInfo
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
reverseDns
reverseDns
Module: ip | Returns: object -- API response.
ip.reverseDns
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
checkBlacklist
checkBlacklist
Module: ip | Returns: object -- API response.
ip.checkBlacklist
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Ip API error (${res.status}): ${t} | Check the error message for details |
Ip: "..." not configured. Call ip.setCredentials first. | Check the error message for details |
@desc "Get my ip and validate result"
do
set $result as ip.getMyIp
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate MyIp
Retrieve all items and loop through them.
@desc "Get my ip and iterate results"
do
set $result as ip.getMyIp
each $item in $result
print $item
end
enddo
2. Multi-step IP workflow
Chain multiple ip operations together.
@desc "Get my ip, geolocate, and more"
do
set $r_getMyIp as ip.getMyIp
set $r_geolocate as ip.geolocate
set $r_geolocateBatch as ip.geolocateBatch
print "All operations complete"
enddo
3. Safe getMyIp with validation
Check results before proceeding.
@desc "Get my ip and validate result"
do
set $result as ip.getMyIp
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- json -- JSON module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | 1 months ago |
Related Modules
@robinpathv0.1.4
SMTP email sending and address parsing for RobinPath
hash
JS@robinpathv0.1.3
Cryptographic hashing utilities: MD5, SHA family, HMAC, CRC32, file hashing, UUID v5 generation, secure random bytes, and content fingerprinting
csv
JS@robinpathv0.1.2
Parse and stringify CSV data
apollo
JS@robinpathv0.1.2
Apollo module for RobinPath.
$ robinpath add @robinpath/ip
