NAME

Net::RDAP::Link - a module representing an RDAP link.

DESCRIPTION

Links are used throughout RDAP; the following objects may contain zero or more links:

In all cases, the modules representing these types of object inherit from Net::RDAP::Base and therefore provide a links() method which will return a (potentially empty) array of Net::RDAP::Link objects.

METHODS

Value

$value = $link->value;

Returns a string containing the value of the value property of the link object, if any.

Context URI

$uri = $link->context;

Returns a URI object representing the context URI of the link, as described in Section 3.2 of RFC 8288.

This URI object is constructed from the value of the value property (described above). If the value of this property is a relative URL, then an absolute URL will be computed using the URI of the RDAP response that contains the link object.

Relationship

$rel = $link->rel;

Returns the "relationship" attribute. The possible values are defined by an IANA registry; see:

URL

$url = $link->href;

Returns a URI object corresponding to the target of the link.

Language

@languages = $link->hreflang;

Returns a (potentially empty) array containing the ISO-639-2 codes which describe the language that the target is available in.

Title

$title = $link->title;

Returns the "title" attribute of the link. This labels the destination of a link such that it can be used as a human-readable identifier in the language of the context in which the link appears.

Media

$media = $link->media;

Returns the "media" attribute of the link. This corresponds to the media/device the target resource is optimized for.

Media Type

$type = $link->type;

Returns a MIME::Type object corresponding to the media type of the target resource.

$is = $link->is_rdap;

Returns true if the media type of the target resource suggests that it is in an RDAP resource.

COPYRIGHT

Copyright 2018-2023 CentralNic Ltd, 2024 Gavin Brown. For licensing information, please see the LICENSE file in the Net::RDAP distribution.