Module: Masklen

Defined in:
lib/masklen.rb,
lib/masklen/error.rb,
lib/masklen/types.rb,
lib/masklen/client.rb,
lib/masklen/version.rb

Overview

Masklen is the official Ruby SDK for the masklen.dev IP intelligence API.

Quick start:

require "masklen"

client = Masklen::Client.new(api_key: "your-api-key")

# Look up a specific IP
result = client.lookup("8.8.8.8")
puts result.location.country

# Look up the caller's own IP
self_result = client.lookup_self(fields: ["location", "privacy"])
puts self_result.privacy.vpn

# Batch lookup
batch = client.lookup_batch(["8.8.8.8", "1.1.1.1"])
batch.results.each { |r| puts r.ip }

Defined Under Namespace

Classes: BatchItemError, BatchResult, Client, Error, Locale, Location, LookupResult, Network, Privacy

Constant Summary collapse

VERSION =
"1.0.0"