RECRUIT Media Technology Labs > WebService-Recruit-HotPepperBeauty-0.0.1 > WebService::Recruit::HotPepperBeauty::HairImage

Download:
WebService-Recruit-HotPepperBeauty-0.0.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0.1   Source  

NAME ^

WebService::Recruit::HotPepperBeauty::HairImage - HotPepperBeauty Web Service "hair_image" API

SYNOPSIS ^

    use WebService::Recruit::HotPepperBeauty;
    
    my $service = WebService::Recruit::HotPepperBeauty->new();
    
    my $param = {
        'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
    };
    my $res = $service->hair_image( %$param );
    my $data = $res->root;
    print "api_version: $data->api_version\n";
    print "results_available: $data->results_available\n";
    print "results_returned: $data->results_returned\n";
    print "results_start: $data->results_start\n";
    print "hair_image: $data->hair_image\n";
    print "...\n";

DESCRIPTION ^

This module is a interface for the hair_image API. It accepts following query parameters to make an request.

    my $param = {
        'key' => 'XXXXXXXX',
        'start' => 'XXXXXXXX',
        'count' => 'XXXXXXXX',
    };
    my $res = $service->hair_image( %$param );

$service above is an instance of WebService::Recruit::HotPepperBeauty.

METHODS ^

root

This returns the root element of the response.

    my $root = $res->root;

You can retrieve each element by the following accessors.

    $root->api_version
    $root->results_available
    $root->results_returned
    $root->results_start
    $root->hair_image
    $root->hair_image->[0]->code
    $root->hair_image->[0]->name

xml

This returns the raw response context itself.

    print $res->xml, "\n";

code

This returns the response status code.

    my $code = $res->code; # usually "200" when succeeded

is_error

This returns true value when the response has an error.

    die 'error!' if $res->is_error;

SEE ALSO ^

WebService::Recruit::HotPepperBeauty

AUTHOR ^

RECRUIT Media Technology Labs <mtl@cpan.org>

COPYRIGHT ^

Copyright 2008 RECRUIT Media Technology Labs

syntax highlighting: