EveOnline::SSO::Client - base class for any Eve Online ESI API calls
use EveOnline::SSO::Client; my $client = EveOnline::SSO::Client->new(token => '************', x_user_agent => 'Pilot Name <email@gmail.com>'); $api->get(['characters', 90922771, 'location'] ); # url converting to https://esi.tech.ccp.is/latest/characters/90922771/location/?datasource=tranquility
EveOnline::SSO::Client is base class for any EveOnline ESI API Contains get, post, put, delete methods for calls to any APIs.
Require arguments: token, x_user_agent
my $client = EveOnline::SSO::Client->new( token => 'lPhJ_DLk345334532yfssfdJgFsnKI9rR4EZpcQnJ2', x_user_agent => 'Pilot Name <email@gmail.com>', endpoint => 'https://esi.tech.ccp.is/latest/', # optional datasource => 'tranquility', # optional );
For module based on EveOnline::SSO::Client you can override atributes:
extends 'EveOnline::SSO::Client'; has '+endpoint' => ( is => 'rw', default => 'https://esi.tech.ccp.is/dev/', ); has '+datasource' => ( is => 'rw', default => 'singularity', );
Send GET request.
$client->get(['array', 'of', 'path', 'blocks'], { # query string hash ref. Optional }); $client->get(['characters', $character_id, 'location']); # or $api->get(['characters', 90922771, 'contacts'], { page => 1 } ); # or full link $client->get('https://esi.tech.ccp.is/latest/incursions/');
You can add any params for query hashref, it should be added to query_string
Send POST request.
$client->post(['array', 'of', 'path', 'blocks'], { # query string hash ref. Can be empty }, [ {}, [] ] # Body structure. Converting to json. Optional ); $client->post(['universe', 'names'], {}, [90922771,188956223]);
Send PUT request.
$client->put(['characters', 90922771, 'contacts'], { standing => 5, watched => 'false' }, [188956223] );
Send DELETE request.
$client->delete(['characters', 90922771, 'contacts'], {}, [188956223] );
Copyright (C) Andrey Kuzmin.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Andrey Kuzmin <chipsoid@cpan.org>
To install EveOnline::SSO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EveOnline::SSO
CPAN shell
perl -MCPAN -e shell install EveOnline::SSO
For more information on module installation, please visit the detailed CPAN module installation guide.