
[% package_name %] - An Interface for [% title %]

use [% package_name %];
my $service = [% package_name %]->new();
my $param = {
[% FOREACH key = sort_keys(methods.0.first_good_test.params) -%]
'[% key %]' => [% methods.0.first_good_test.params.$key | $env_param %],
[% END -%]
};
my $res = $service->[% methods.0.interface_name %]( %$param );
my $root = $res->root;
[% FOREACH node = tree_to_array(methods.0.return) -%]
[% LAST IF loop.index > 6 -%]
[% NEXT IF node.depth == 1 -%]
printf("[% node.name %]: %s\n", $root[% node_access(node) %]);
[% END -%]
print "...\n";

[% perl_abstract or abstract %]

This is the constructor method for this class.
my $service = [% package_name %]->new();
This accepts optional parameters.
my $conf = {
utf8_flag => 1,
param => {
# common parameters of this web service
},
};
my $service = [% package_name %]->new( %$conf );
Add common parameter of tihs web service.
$service->add_param( param_key => param_value );
You can add multiple parameters by calling once.
$service->add_param( param_key1 => param_value1,
param_key2 => param_value2,
...);
Returns common parameter value of the specified key.
my $param_value = $service->get( 'param_key' );
[% FOREACH method = methods -%] =head2 [% method.interface_name %]
This makes a request for [% method.name %] API. See "[% "${package_name}::${method.class_name}" %]" for details.
my $res = $service->[% method.interface_name %]( %$param );
[% END -%] =head2 utf8_flag / user_agent / lwp_useragent / http_lite
This modules uses XML::TreePP module internally. Following methods are available to configure it.
$service->utf8_flag( 1 );
$service->user_agent( 'Foo-Bar/1.0 ' );
$service->lwp_useragent( LWP::UserAgent->new() );
$service->http_lite( HTTP::Lite->new() );
[% IF perl_see_also or see_also -%] =head1 SEE ALSO
[% perl_see_also or see_also %]
[% END -%] =head1 AUTHOR
[% join(",\n", author) %]
[% IF perl_copyright or copyright -%] =head1 COPYRIGHT
[% perl_copyright or copyright %]
[% END -%]