summary refs log tree commit diff
path: root/t/lib/WoWArmory.pm
blob: c2715d1014b200b73919baa15e441690dd9b582f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package WoWArmory;
use Moose;
use MooseX::Net::API;
use LWP::UserAgent;

net_api_declare wowarmory => (
    base_url    => 'http://eu.wowarmory.com/',
    format      => 'xml',
    format_mode => 'append',
    useragent   => sub {
        my $ua = LWP::UserAgent->new;
        $ua->agent(
            "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
        );
        return $ua;
    },
);

net_api_method character => (
    method   => 'GET',
    path     => '/character-sheet',
    params   => [qw/r n/],
    required => [qw/r n/],
);
1;