NAME
Net::RDAP::Service - a module which provides an interface to an RDAP server.
SYNOPSIS
use Net::RDAP::Service;
#
# create a new service object:
#
my $svc = Net::RDAP::Service->new('https://www.example.com/rdap');
#
# get a domain:
#
my $domain = $svc->domain(Net::DNS::Domain->new('example.com'));
#
# do a search:
#
my $result = $svc->domains('name' => 'ex*mple.com');
#
# get help:
#
my $help = $svc->help;
DESCRIPTION
While Net::RDAP provides a unified interface to the universe of RIR, domain registry, and domain registrar RDAP services, Net::RDAP::Service provides an interface to a specify RDAP service.
You can do direct lookup of objects using methods of the same name that Net::RDAP provides. In addition, this module allows you to perform searches.
METHODS
Constructor
my $svc = Net::RDAP::Service->new($url);
Creates a new Net::RDAP::Service object. $url
is a string or a URI object representing the base URL of the service.
You can also provide a second argument which should be an existing Net::RDAP instance. This is used when fetching resources from the server.
Lookup Methods
You can do direct lookups of objects using the following methods:
domain()
ip()
autnum()
entity()
nameserver()
They all work the same way as the methods of the same name on Net::RDAP.
Search Methods
You can perform searches using the following methods. Note that different services will support different search functions.
$result = $svc->domains(%QUERY);
$result = $svc->entities(%QUERY);
$result = $svc->nameservers(%QUERY);
In all cases, %QUERY
is a set of search parameters. Here are some examples:
$result = $svc->domains('name' => 'ex*mple.com');
$result = $svc->entities('fn' => 'Ex*ample, Inc');
$result = $svc->nameservers('ip' => '192.168.0.1');
The following parameters can be specified:
domains:
name
(domain name),nsLdhName
(nameserver name),nsIp
(nameserver IP address)nameservers:
name
(host name),ip
(IP address)entities:
handle
,fn
(Formatted Name)
Search parameters can contain the wildcard character "*" anywhere in the string.
These methods all return Net::RDAP::SearchResult objects.
Help
Each RDAP server has a "help" endpoint which provides "helpful information" (command syntax, terms of service, privacy policy, rate-limiting policy, supported authentication methods, supported extensions, technical support contact, etc.). This information may be obtained by performing a help
query:
my $help = $svc->help;
The return value is a Net::RDAP::Help object.
COPYRIGHT
Copyright 2018-2023 CentralNic Ltd, 2024 Gavin Brown. For licensing information, please see the LICENSE
file in the Net::RDAP distribution.