line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Recruit::Aikento::SmallCategory; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1096
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
101
|
|
4
|
3
|
|
|
3
|
|
14
|
use base qw( WebService::Recruit::Aikento::Base ); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
214
|
|
5
|
3
|
|
|
3
|
|
15
|
use vars qw( $VERSION ); |
|
3
|
|
|
|
|
36
|
|
|
3
|
|
|
|
|
117
|
|
6
|
3
|
|
|
3
|
|
14
|
use Class::Accessor::Fast; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
18
|
|
7
|
3
|
|
|
3
|
|
85
|
use Class::Accessor::Children::Fast; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
18
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$VERSION = '0.0.1'; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
1
|
0
|
sub http_method { 'GET'; } |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
0
|
1
|
0
|
sub url { 'http://webservice.recruit.co.jp/aikento/small_category/v1/'; } |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
1
|
30
|
sub query_class { 'WebService::Recruit::Aikento::SmallCategory::Query'; } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub query_fields { [ |
18
|
3
|
|
|
3
|
0
|
40
|
'key', 'large_code', 'small_code', 'keyword' |
19
|
|
|
|
|
|
|
]; } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub default_param { { |
22
|
1
|
|
|
1
|
1
|
412
|
'format' => 'xml' |
23
|
|
|
|
|
|
|
}; } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub notnull_param { [ |
26
|
0
|
|
|
0
|
1
|
0
|
'key' |
27
|
|
|
|
|
|
|
]; } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
0
|
sub elem_class { 'WebService::Recruit::Aikento::SmallCategory::Element'; } |
30
|
|
|
|
|
|
|
|
31
|
3
|
|
|
3
|
1
|
169
|
sub root_elem { 'results'; } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub elem_fields { { |
34
|
3
|
|
|
3
|
0
|
51
|
'error' => ['message'], |
35
|
|
|
|
|
|
|
'large_category' => ['code', 'name'], |
36
|
|
|
|
|
|
|
'results' => ['api_version', 'results_available', 'results_returned', 'results_start', 'small_category', 'api_version', 'error'], |
37
|
|
|
|
|
|
|
'small_category' => ['code', 'name', 'large_category'], |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
}; } |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub force_array { [ |
42
|
0
|
|
|
0
|
1
|
|
'small_category' |
43
|
|
|
|
|
|
|
]; } |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# __PACKAGE__->mk_query_accessors(); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
@WebService::Recruit::Aikento::SmallCategory::Query::ISA = qw( Class::Accessor::Fast ); |
48
|
|
|
|
|
|
|
WebService::Recruit::Aikento::SmallCategory::Query->mk_accessors( @{query_fields()} ); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# __PACKAGE__->mk_elem_accessors(); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
@WebService::Recruit::Aikento::SmallCategory::Element::ISA = qw( Class::Accessor::Children::Fast ); |
53
|
|
|
|
|
|
|
WebService::Recruit::Aikento::SmallCategory::Element->mk_ro_accessors( root_elem() ); |
54
|
|
|
|
|
|
|
WebService::Recruit::Aikento::SmallCategory::Element->mk_child_ro_accessors( %{elem_fields()} ); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
WebService::Recruit::Aikento::SmallCategory - Aikento Web Service "small_category" API |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SYNOPSIS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use WebService::Recruit::Aikento; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my $service = WebService::Recruit::Aikento->new(); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my $param = { |
67
|
|
|
|
|
|
|
'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'}, |
68
|
|
|
|
|
|
|
}; |
69
|
|
|
|
|
|
|
my $res = $service->small_category( %$param ); |
70
|
|
|
|
|
|
|
my $data = $res->root; |
71
|
|
|
|
|
|
|
print "api_version: $data->api_version\n"; |
72
|
|
|
|
|
|
|
print "results_available: $data->results_available\n"; |
73
|
|
|
|
|
|
|
print "results_returned: $data->results_returned\n"; |
74
|
|
|
|
|
|
|
print "results_start: $data->results_start\n"; |
75
|
|
|
|
|
|
|
print "small_category: $data->small_category\n"; |
76
|
|
|
|
|
|
|
print "...\n"; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 DESCRIPTION |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This module is a interface for the C API. |
81
|
|
|
|
|
|
|
It accepts following query parameters to make an request. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $param = { |
84
|
|
|
|
|
|
|
'key' => 'XXXXXXXX', |
85
|
|
|
|
|
|
|
'large_code' => '201', |
86
|
|
|
|
|
|
|
'small_code' => '201001', |
87
|
|
|
|
|
|
|
'keyword' => 'ベビー', |
88
|
|
|
|
|
|
|
}; |
89
|
|
|
|
|
|
|
my $res = $service->small_category( %$param ); |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
C<$service> above is an instance of L. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 METHODS |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 root |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
This returns the root element of the response. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
my $root = $res->root; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
You can retrieve each element by the following accessors. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
$root->api_version |
104
|
|
|
|
|
|
|
$root->results_available |
105
|
|
|
|
|
|
|
$root->results_returned |
106
|
|
|
|
|
|
|
$root->results_start |
107
|
|
|
|
|
|
|
$root->small_category |
108
|
|
|
|
|
|
|
$root->small_category->[0]->code |
109
|
|
|
|
|
|
|
$root->small_category->[0]->name |
110
|
|
|
|
|
|
|
$root->small_category->[0]->large_category |
111
|
|
|
|
|
|
|
$root->small_category->[0]->large_category->code |
112
|
|
|
|
|
|
|
$root->small_category->[0]->large_category->name |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 xml |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This returns the raw response context itself. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
print $res->xml, "\n"; |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 code |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
This returns the response status code. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
my $code = $res->code; # usually "200" when succeeded |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 is_error |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
This returns true value when the response has an error. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
die 'error!' if $res->is_error; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 SEE ALSO |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
L |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 AUTHOR |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
RECRUIT Media Technology Labs |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 COPYRIGHT |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Copyright 2008 RECRUIT Media Technology Labs |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=cut |
146
|
|
|
|
|
|
|
1; |