NAME

WWW::ARDB::Result::ArcEnemy - ARC Enemy result object for WWW::ARDB

VERSION

version 0.002

SYNOPSIS

my $enemy = $api->arc_enemy('wasp');

print $enemy->name;       # "Wasp"
print $enemy->icon_url;   # Full URL to icon

for my $drop (@{$enemy->drop_table}) {
    printf "- %s (%s)\n", $drop->{name}, $drop->{rarity};
}

# Or just get drop names
my $drops = $enemy->drops;  # ['Wires', 'Medium Ammo', ...]

DESCRIPTION

Result object representing an ARC enemy from the ARC Raiders Database. Created via WWW::ARDB methods like arc_enemies() and arc_enemy().

id

String. Unique identifier for the enemy (e.g., wasp).

name

String. Enemy name.

icon

String or undef. Path to icon image (use icon_url() for full URL).

image

String or undef. Path to full enemy image (use image_url() for full URL).

drop_table

ArrayRef of HashRefs. Items this enemy can drop, each with id, name, rarity, type, foundIn, value, icon. Only populated for detail endpoint (arc_enemy($id)).

ArrayRef of HashRefs. Maps where this enemy appears. Only populated for detail endpoint (arc_enemy($id)).

updated_at

String or undef. ISO 8601 timestamp of last update.

from_hashref

my $enemy = WWW::ARDB::Result::ArcEnemy->from_hashref($data);

Class method. Constructs an ArcEnemy object from API response data (HashRef).

icon_url

my $url = $enemy->icon_url;

Returns the full URL to the enemy's icon image, or undef if no icon is set. Automatically prepends https://ardb.app to relative paths.

image_url

my $url = $enemy->image_url;

Returns the full URL to the enemy's full image, or undef if no image is set. Automatically prepends https://ardb.app to relative paths.

drops

my $names = $enemy->drops;

Returns an ArrayRef of drop item names extracted from the drop table.

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-ardb/issues.

IRC

You can reach Getty on irc.perl.org for questions and support.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.