NAME

WWW::MetaForge::GameMapData - Perl client for the MetaForge Game Map Data API

VERSION

version 0.001

SYNOPSIS

use WWW::MetaForge::GameMapData;

my $api = WWW::MetaForge::GameMapData->new;

# Get map markers for a specific map
my $markers = $api->map_data(map => 'dam');
for my $marker (@$markers) {
    say $marker->type . " at " . $marker->x . "," . $marker->y;
}

# Filter by marker type
my $loot = $api->map_data(map => 'dam', type => 'loot');

DESCRIPTION

Perl interface to the MetaForge Game Map Data API. This API provides map marker data (POIs, loot locations, quest markers, etc.) for games supported by MetaForge.

This is a generic base module. Game-specific distributions (like WWW::MetaForge::ArcRaiders) can use this module and extend the result classes with game-specific attributes.

ATTRIBUTES

ua

LWP::UserAgent instance. Built lazily with sensible defaults.

request

WWW::MetaForge::GameMapData::Request instance for creating HTTP::Request objects.

cache

WWW::MetaForge::Cache instance for response caching.

use_cache

Boolean, default true. Set to false to disable caching.

cache_dir

Optional Path::Tiny path for cache directory. Defaults to XDG cache dir on Unix, LOCALAPPDATA on Windows.

marker_class

Class to use for map marker objects. Defaults to WWW::MetaForge::GameMapData::Result::MapMarker. Override this to use a subclass with game-specific attributes.

debug

Boolean. Enable debug output. Also settable via $ENV{WWW_METAFORGE_GAMEMAPDATA_DEBUG}.

METHODS

map_data

my $markers = $api->map_data(map => 'dam');
my $markers = $api->map_data(map => 'dam', type => 'loot');

Returns ArrayRef of WWW::MetaForge::GameMapData::Result::MapMarker (or subclass specified by marker_class).

Required parameter: map - name of the map to fetch markers for. Optional parameter: type - filter by marker type.

map_data_raw

Same as map_data but returns raw HashRef/ArrayRef instead of objects.

clear_cache

$api->clear_cache('map_data');  # Clear specific endpoint
$api->clear_cache;              # Clear all

Clear cached responses.

ATTRIBUTION

This module uses the MetaForge API: https://metaforge.app

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.