WoW::Armory::API - Perl interface to WoW API
use WoW::Armory::API; $api = WoW::Armory::API->new(Region => 'eu', Locale => 'ru_RU'); $char_data = $api->GetCharacter('realm', 'Character', 'items,pets,mounts'); $guild_data = $api->GetGuild('realm', 'Guild'); print $char_data->{items}{head}{name}; print $guild_data->{name}; use WoW::Armory::Class::Character; use WoW::Armory::Class::Guild; $char = WoW::Armory::Class::Character->new($char_data); $guild = WoW::Armory::Class::Guild->new($guild_data); print $char->items->head->name; print $guild->name;
@fields = @{WOW_CHARACTER_FIELDS()}; $data = $api->GetCharacter($realmId, $characterName, join(',', @fields));
@fields = @{WOW_GUILD_FIELDS()}; $data = $api->GetGuild($realmId, $guildName, join(',', @fields));
$data = $api->GetArena($realmId, WOW_ARENA_TEAM_2, $teamName);
$data = $api->GetArena($realmId, WOW_ARENA_TEAM_3, $teamName);
$data = $api->GetArena($realmId, WOW_ARENA_TEAM_5, $teamName);
$api = WoW::Armory::API->new; $api = WoW::Armory::API->new(Region => $regionId, Locale => $locale);
$data = WoW::Armory::API->GetRegions(); $data = $api->GetRegions();
$api->SetRegion($regionId); $api->SetRegion($regionId, $locale);
$hasLocale = $api->HasLocale($locale);
$api->SetLocale($locale);
$host = $api->GetApiHost();
$data = $api->DoApiCall($method, @params);
All of these methods return the appropriate data structure or undef. See http://blizzard.github.com/api-wow-docs/ for more details.
$data = $api->GetAchievement($achievementId);
$data = $api->GetAuctionData($realmId);
$data = $api->GetBattlePetAbility($abilityId);
$data = $api->GetBattlePetSpecies($speciesId);
$data = $api->GetBattlePetStats($speciesId); $data = $api->GetBattlePetStats($speciesId, $level, $breedId, $qualityId);
$data = $api->GetChallenge($realmId);
$data = $api->GetChallengeRegion();
$data = $api->GetCharacter($realmId, $characterName); $data = $api->GetCharacter($realmId, $characterName, $fields);
$data = $api->GetItem($itemId);
$data = $api->GetItemSet($itemSetId);
$data = $api->GetGuild($realmId, $guildName); $data = $api->GetGuild($realmId, $guildName, $fields);
$data = $api->GetArena($realmId, $teamSize, $teamName);
$data = $api->GetPvpArena($battleGroup, $teamSize); $data = $api->GetPvpArena($battleGroup, $teamSize, $page, $pageSize, $asc);
$data = $api->GetPvpRatedbgLadder(); $data = $api->GetPvpRatedbgLadder($page, $pageSize, $asc);
$data = $api->GetQuest($questId);
$data = $api->GetRealmStatus();
$data = $api->GetRecipe($recipeId);
$data = $api->GetSpell($spellId);
$data = $api->GetDataBattlegroups();
$data = $api->GetDataCharacterRaces();
$data = $api->GetDataCharacterClasses();
$data = $api->GetDataCharacterAchievements();
$data = $api->GetDataGuildRewards();
$data = $api->GetDataGuildPerks();
$data = $api->GetDataGuildAchievements();
$data = $api->GetDataItemClasses();
$data = $api->GetDataTalents();
$data = $api->GetDataPetTypes();
http://blizzard.github.com/api-wow-docs/
The source code for the WoW::Armory::API is held in a public git repository on Github: https://github.com/Silencer2K/perl-wow-api
Aleksandr Aleshin <silencer@cpan.org>
This software is copyright (c) 2012 by Aleksandr Aleshin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WoW::Armory::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WoW::Armory::API
CPAN shell
perl -MCPAN -e shell install WoW::Armory::API
For more information on module installation, please visit the detailed CPAN module installation guide.