EveOnline-Api

 view release on metacpan or  search on metacpan

lib/EveOnline/Api.pm  view on Meta::CPAN

            $obj->endSP($xml->{eveapi}{result}{rowset}{row}{endSP});
            $obj->startTime($xml->{eveapi}{result}{rowset}{row}{startTime});
            $obj->endTime($xml->{eveapi}{result}{rowset}{row}{endTime});
            $obj->cachedUntil($xml->{eveapi}->{cachedUntil});
        }

        push(@skillQueueList, $obj);
                                
    }
    
    return \@skillQueueList;
}

sub get_contact_list {
    my $self     = shift;
    my $charlist = shift;

    my @charlist = @{$charlist};
    my $path     = '/char/ContactList.xml.aspx';

	# TODO #

#    my $text = &connect($self, $keyID, $vCode, $path, $char);
#    my $obj  = EveOnline::Contact->new();
#    my $xml  = XMLin($text, KeepRoot => 1);
#    my $data = $xml->{eveapi}->{result};

    return;
}

#=head2 connect

#This is the most impotant method of the API. The method recieves the API keys and verification codes from the class and execute a request to the Eve Server.

#=cut

sub connect {
    my ($self, $keyID, $vCode, $path, $char)  = @_;

    my $ua = LWP::UserAgent->new;
    my $req;

    if ( $char ) {

        $req = POST $self->apiroot.$path, [ keyID => $keyID, vCode => $vCode, characterID => $char->characterID ];

    } else {
        
        $req = POST $self->apiroot.$path, [ keyID => $keyID, vCode => $vCode ];

    }

    my $res = $ua->request($req);

    unless ( $res->is_success ) {

        die "Error: " . $res->status_line . "\n";

    }

    my $text = $res->decoded_content;
       
    return $text;
}

1;

=head1 AUTHOR

Felipe da Veiga Leprevost, C<< <leprevost@cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-myapp at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MyApp>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc EveOnline::Api


You can also look for information at:

=over 4

=item * RT: CPAN's request tracker (report bugs here)

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=EveOnline-Api>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/EveOnline-Api>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/EveOnline-Api>

=item * Search CPAN

L<http://search.cpan.org/dist/EveOnline-Api/>

=back


=head1 ACKNOWLEDGEMENTS


=head1 LICENSE AND COPYRIGHT

Copyright 2014 Felipe da Veiga Leprevost.

This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:

L<http://www.perlfoundation.org/artistic_license_2_0>

Any use, modification, and distribution of the Standard or Modified



( run in 1.528 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )