NAME
WebService::Recruit::Aikento::Item - Aikento Web Service "item" API
SYNOPSIS
use WebService::Recruit::Aikento;
my $service = WebService::Recruit::Aikento->new();
my $param = {
'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
'large_category' => '202',
};
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' => '99999',
'name' => 'トレー',
'large_category' => '101',
'small_category' => '210001',
'keyword' => '�手入れ',
'price_min' => '2000',
'price_max' => '5400',
'order' => 'XXXXXXXX',
'start' => 'XXXXXXXX',
'count' => 'XXXXXXXX',
};
my $res = $service->item( %$param );
$service
above is an instance of WebService::Recruit::Aikento.
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]->shop_code
$root->item->[0]->brand
$root->item->[0]->name
$root->item->[0]->price
$root->item->[0]->catch_copy
$root->item->[0]->desc
$root->item->[0]->image
$root->item->[0]->large_category
$root->item->[0]->small_category
$root->item->[0]->page
$root->item->[0]->start_date
$root->item->[0]->end_date
$root->item->[0]->urls
$root->item->[0]->image->pc
$root->item->[0]->image->mobile
$root->item->[0]->large_category->code
$root->item->[0]->large_category->name
$root->item->[0]->small_category->code
$root->item->[0]->small_category->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
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 90:
Non-ASCII character seen before =encoding in ''トレー','. Assuming CP1252