NAME
WebService::Recruit::Akasugu::Item - Akasugu.net Web Service "item" API
SYNOPSIS
use WebService::Recruit::Akasugu;
my $service = WebService::Recruit::Akasugu->new();
my $param = {
'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
'large_category_cd' => '2',
};
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',
'company' => 'リクルート',
'brand' => 'リクルート',
'name' => 'トレー',
'large_category_cd' => '2',
'middle_category_cd' => '210',
'small_category_cd' => '210001',
'age_cd' => 'a01',
'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::Akasugu.
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]->company
$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]->middle_category
$root->item->[0]->small_category
$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]->middle_category->code
$root->item->[0]->middle_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 91:
Non-ASCII character seen before =encoding in ''リクルート','. Assuming CP1252