NAME

WebService::Recruit::AkasuguUchiiwai::Item - AkasuguUchiiwai Web Service "item" API

SYNOPSIS

use WebService::Recruit::AkasuguUchiiwai;

my $service = WebService::Recruit::AkasuguUchiiwai->new();

my $param = {
    'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
    'target' => '1',
};
my $res = $service->item( %$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 "item: $data->item\n";
print "...\n";

DESCRIPTION

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

my $param = {
    'key' => 'XXXXXXXX',
    'code' => '9999-999',
    'name' => 'ガーゼケット りす',
    'category' => '3695',
    'price_min' => '2000',
    'price_max' => '5400',
    'keyword' => '赤すぐオリジナル',
    'target' => '1',
    'feature' => '1',
    'order' => 'XXXXXXXX',
    'start' => 'XXXXXXXX',
    'count' => 'XXXXXXXX',
};
my $res = $service->item( %$param );

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

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->item
$root->item->[0]->code
$root->item->[0]->brand
$root->item->[0]->name
$root->item->[0]->price
$root->item->[0]->desc
$root->item->[0]->spec
$root->item->[0]->image
$root->item->[0]->category
$root->item->[0]->target
$root->item->[0]->feature
$root->item->[0]->start_date
$root->item->[0]->end_date
$root->item->[0]->urls
$root->item->[0]->image->pc_l
$root->item->[0]->image->pc_m
$root->item->[0]->image->pc_s
$root->item->[0]->image->mobile_l
$root->item->[0]->image->mobile_s
$root->item->[0]->category->code
$root->item->[0]->category->name
$root->item->[0]->target->code
$root->item->[0]->target->name
$root->item->[0]->feature->code
$root->item->[0]->feature->name
$root->item->[0]->urls->mobile
$root->item->[0]->urls->pc
$root->item->[0]->urls->qr

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::AkasuguUchiiwai

AUTHOR

RECRUIT Media Technology Labs <mtl@cpan.org>

COPYRIGHT

Copyright 2008 RECRUIT Media Technology Labs

1 POD Error

The following errors were encountered while parsing the POD:

Around line 91:

Non-ASCII character seen before =encoding in ''ガーゼケット りす','. Assuming UTF-8