NAME

WWW::MetaForge::ArcRaiders::Result::EventTimer - Event timer/schedule result object

VERSION

version 0.001

SYNOPSIS

my $events = $api->event_timers;
for my $event (@$events) {
    say $event->name;
    say "  Active!" if $event->is_active_now;
    if (my $next = $event->next_time) {
        say "  Next: ", $next->start, " - ", $next->end;
    }
}

DESCRIPTION

Represents an event timer/schedule from the ARC Raiders game.

ATTRIBUTES

name

Event name.

map

Map where event occurs.

icon

URL to event icon image.

times

ArrayRef of WWW::MetaForge::ArcRaiders::Result::EventTimer::TimeSlot objects.

METHODS

from_hashref

my $event = WWW::MetaForge::ArcRaiders::Result::EventTimer->from_hashref(\%data);

Construct from API response (legacy format with times array).

from_grouped

my $event = WWW::MetaForge::ArcRaiders::Result::EventTimer->from_grouped(
  $name, $map, \@events
);

Construct from grouped API data. Takes an array of raw event entries (with startTime/endTime timestamps) that share the same name and map.

is_active_now

if ($event->is_active_now) { ... }

Returns true if current time is within a scheduled time slot.

next_time

my $slot = $event->next_time;
say "Starts at ", $slot->start if $slot;

Returns next upcoming TimeSlot object, or undef if none scheduled.

current_slot

my $slot = $event->current_slot;
say "Ends at ", $slot->end if $slot;

Returns currently active TimeSlot object, or undef if not active.

time_until_start

my $duration = $event->time_until_start;
say "Event starts in $duration" if $duration;

Returns human-readable duration until next event start (e.g., "2h 30m", "45m"). Returns undef if no upcoming events.

minutes_until_start

my $minutes = $event->minutes_until_start;

Returns numeric minutes until next event start. Useful for sorting events. Returns undef if no upcoming events.

time_until_end

my $duration = $event->time_until_end;
say "Event ends in $duration" if $duration;

Returns human-readable duration until current event ends (e.g., "1h 15m"). Returns undef if event is not currently active.

minutes_until_end

my $minutes = $event->minutes_until_end;

Returns numeric minutes until current active event ends. Useful for sorting. Returns undef if event is not currently active.

SUPPORT

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/Getty/p5-www-metaforge

git clone https://github.com/Getty/p5-www-metaforge.git

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.