| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::Recruit::FromA::JobSearch; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
961
|
use strict; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
113
|
|
|
4
|
3
|
|
|
3
|
|
18
|
use base qw( WebService::Recruit::FromA::Base ); |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
1746
|
|
|
5
|
3
|
|
|
3
|
|
19
|
use vars qw( $VERSION ); |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
104
|
|
|
6
|
3
|
|
|
3
|
|
15
|
use Class::Accessor::Fast; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
27
|
|
|
7
|
3
|
|
|
3
|
|
69
|
use Class::Accessor::Children::Fast; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
12
|
|
|
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://xml.froma.yahoo.co.jp/s/r/jobSearch.jsp'; } |
|
14
|
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
1
|
40
|
sub query_class { 'WebService::Recruit::FromA::JobSearch::Query'; } |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub query_fields { [ |
|
18
|
3
|
|
|
3
|
0
|
64
|
'api_key', 'ksjcd', 'edition_cd', 'xml_block', 'm_area_cd', 's_area_cd', 'nv_jb_type_cd', 'shrt_indx_cd', 'wrk_dy_num_ctgry_cd', 'hours_ctgry_cd', 'regu_indx_s_class_cd', 'emp_ed_m_area_cd', 'employ_frm_ctgry_cd', 'pull_sal_cd', 'no_exp_ok_f' |
|
19
|
|
|
|
|
|
|
]; } |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub default_param { { |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
1
|
432
|
}; } |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub notnull_param { [ |
|
26
|
0
|
|
|
0
|
1
|
0
|
'api_key', 'ksjcd' |
|
27
|
|
|
|
|
|
|
]; } |
|
28
|
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
0
|
sub elem_class { 'WebService::Recruit::FromA::JobSearch::Element'; } |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub root_elem_list { [ |
|
32
|
3
|
|
|
3
|
0
|
37
|
'OfferList', |
|
33
|
|
|
|
|
|
|
'Error', |
|
34
|
|
|
|
|
|
|
]; } |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub elem_fields { { |
|
37
|
3
|
|
|
3
|
0
|
70
|
'Error' => ['Code', 'Message'], |
|
38
|
|
|
|
|
|
|
'GeoPointList' => ['GeoPoint'], |
|
39
|
|
|
|
|
|
|
'Offer' => ['Catch', 'OfferId', 'Url', 'OfferStartDate', 'OfferEndDate', 'Zipcode', 'Prefecture', 'City', 'VisualIndices', 'TimeIndices', 'MinimumWorkDays', 'ShortIndex', 'CorporateName', 'TransPortation', 'JobTypeDetail', 'PayText', 'OfferConditionList', 'GeoPointList'], |
|
40
|
|
|
|
|
|
|
'OfferCondition' => ['TypeOfEmployment'], |
|
41
|
|
|
|
|
|
|
'OfferConditionList' => ['OfferCondition'], |
|
42
|
|
|
|
|
|
|
'OfferList' => ['Code', 'TotalOfferAvailable', 'TotalOfferReturned', 'PageNumber', 'EditionName', 'Offer'], |
|
43
|
|
|
|
|
|
|
'TimeIndices' => ['TimeIndex'], |
|
44
|
|
|
|
|
|
|
'VisualIndex' => ['VisualSize', 'VisualName', 'VisualImageUrl'], |
|
45
|
|
|
|
|
|
|
'VisualIndices' => ['VisualIndex'], |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
}; } |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub force_array { [ |
|
50
|
0
|
|
|
0
|
1
|
|
'GeoPoint', 'Offer', 'OfferCondition', 'TimeIndex', 'VisualIndex' |
|
51
|
|
|
|
|
|
|
]; } |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# __PACKAGE__->mk_query_accessors(); |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
@WebService::Recruit::FromA::JobSearch::Query::ISA = qw( Class::Accessor::Fast ); |
|
56
|
|
|
|
|
|
|
WebService::Recruit::FromA::JobSearch::Query->mk_accessors( @{query_fields()} ); |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# __PACKAGE__->mk_elem_accessors(); |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
@WebService::Recruit::FromA::JobSearch::Element::ISA = qw( Class::Accessor::Children::Fast ); |
|
61
|
|
|
|
|
|
|
WebService::Recruit::FromA::JobSearch::Element->mk_ro_accessors( @{root_elem_list()} ); |
|
62
|
|
|
|
|
|
|
WebService::Recruit::FromA::JobSearch::Element->mk_child_ro_accessors( %{elem_fields()} ); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
WebService::Recruit::FromA::JobSearch - FromA Navi Web Service "jobSearch" API |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
use WebService::Recruit::FromA; |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $service = WebService::Recruit::FromA->new(); |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $param = { |
|
75
|
|
|
|
|
|
|
'api_key' => $ENV{'WEBSERVICE_RECRUIT_FROMA_KEY'}, |
|
76
|
|
|
|
|
|
|
'ksjcd' => '04', |
|
77
|
|
|
|
|
|
|
'shrt_indx_cd' => '1001', |
|
78
|
|
|
|
|
|
|
}; |
|
79
|
|
|
|
|
|
|
my $res = $service->jobSearch( %$param ); |
|
80
|
|
|
|
|
|
|
my $data = $res->root; |
|
81
|
|
|
|
|
|
|
print "Code: $data->Code\n"; |
|
82
|
|
|
|
|
|
|
print "TotalOfferAvailable: $data->TotalOfferAvailable\n"; |
|
83
|
|
|
|
|
|
|
print "TotalOfferReturned: $data->TotalOfferReturned\n"; |
|
84
|
|
|
|
|
|
|
print "PageNumber: $data->PageNumber\n"; |
|
85
|
|
|
|
|
|
|
print "EditionName: $data->EditionName\n"; |
|
86
|
|
|
|
|
|
|
print "...\n"; |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This module is a interface for the C API. |
|
91
|
|
|
|
|
|
|
It accepts following query parameters to make an request. |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
my $param = { |
|
94
|
|
|
|
|
|
|
'api_key' => 'XXXXXXXX', |
|
95
|
|
|
|
|
|
|
'ksjcd' => '04', |
|
96
|
|
|
|
|
|
|
'edition_cd' => '1', |
|
97
|
|
|
|
|
|
|
'xml_block' => '1', |
|
98
|
|
|
|
|
|
|
'm_area_cd' => 'i1', |
|
99
|
|
|
|
|
|
|
's_area_cd' => '1i1001', |
|
100
|
|
|
|
|
|
|
'nv_jb_type_cd' => '101', |
|
101
|
|
|
|
|
|
|
'shrt_indx_cd' => '1001', |
|
102
|
|
|
|
|
|
|
'wrk_dy_num_ctgry_cd' => '01', |
|
103
|
|
|
|
|
|
|
'hours_ctgry_cd' => '01', |
|
104
|
|
|
|
|
|
|
'regu_indx_s_class_cd' => '1101', |
|
105
|
|
|
|
|
|
|
'emp_ed_m_area_cd' => 'i1', |
|
106
|
|
|
|
|
|
|
'employ_frm_ctgry_cd' => '01', |
|
107
|
|
|
|
|
|
|
'pull_sal_cd' => '01', |
|
108
|
|
|
|
|
|
|
'no_exp_ok_f' => '1', |
|
109
|
|
|
|
|
|
|
}; |
|
110
|
|
|
|
|
|
|
my $res = $service->jobSearch( %$param ); |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
C<$service> above is an instance of L. |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 METHODS |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 root |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
This returns the root element of the response. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
my $root = $res->root; |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
You can retrieve each element by the following accessors. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
$root->Code |
|
125
|
|
|
|
|
|
|
$root->TotalOfferAvailable |
|
126
|
|
|
|
|
|
|
$root->TotalOfferReturned |
|
127
|
|
|
|
|
|
|
$root->PageNumber |
|
128
|
|
|
|
|
|
|
$root->EditionName |
|
129
|
|
|
|
|
|
|
$root->Offer |
|
130
|
|
|
|
|
|
|
$root->Offer->[0]->Catch |
|
131
|
|
|
|
|
|
|
$root->Offer->[0]->OfferId |
|
132
|
|
|
|
|
|
|
$root->Offer->[0]->Url |
|
133
|
|
|
|
|
|
|
$root->Offer->[0]->OfferStartDate |
|
134
|
|
|
|
|
|
|
$root->Offer->[0]->OfferEndDate |
|
135
|
|
|
|
|
|
|
$root->Offer->[0]->Zipcode |
|
136
|
|
|
|
|
|
|
$root->Offer->[0]->Prefecture |
|
137
|
|
|
|
|
|
|
$root->Offer->[0]->City |
|
138
|
|
|
|
|
|
|
$root->Offer->[0]->VisualIndices |
|
139
|
|
|
|
|
|
|
$root->Offer->[0]->TimeIndices |
|
140
|
|
|
|
|
|
|
$root->Offer->[0]->MinimumWorkDays |
|
141
|
|
|
|
|
|
|
$root->Offer->[0]->ShortIndex |
|
142
|
|
|
|
|
|
|
$root->Offer->[0]->CorporateName |
|
143
|
|
|
|
|
|
|
$root->Offer->[0]->TransPortation |
|
144
|
|
|
|
|
|
|
$root->Offer->[0]->JobTypeDetail |
|
145
|
|
|
|
|
|
|
$root->Offer->[0]->PayText |
|
146
|
|
|
|
|
|
|
$root->Offer->[0]->OfferConditionList |
|
147
|
|
|
|
|
|
|
$root->Offer->[0]->GeoPointList |
|
148
|
|
|
|
|
|
|
$root->Offer->[0]->VisualIndices->VisualIndex |
|
149
|
|
|
|
|
|
|
$root->Offer->[0]->TimeIndices->TimeIndex |
|
150
|
|
|
|
|
|
|
$root->Offer->[0]->OfferConditionList->OfferCondition |
|
151
|
|
|
|
|
|
|
$root->Offer->[0]->GeoPointList->GeoPoint |
|
152
|
|
|
|
|
|
|
$root->Offer->[0]->VisualIndices->VisualIndex->[0]->VisualSize |
|
153
|
|
|
|
|
|
|
$root->Offer->[0]->VisualIndices->VisualIndex->[0]->VisualName |
|
154
|
|
|
|
|
|
|
$root->Offer->[0]->VisualIndices->VisualIndex->[0]->VisualImageUrl |
|
155
|
|
|
|
|
|
|
$root->Offer->[0]->OfferConditionList->OfferCondition->[0]->TypeOfEmployment |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head2 xml |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
This returns the raw response context itself. |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
print $res->xml, "\n"; |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 code |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
This returns the response status code. |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
my $code = $res->code; # usually "200" when succeeded |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head2 is_error |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
This returns true value when the response has an error. |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
die 'error!' if $res->is_error; |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
L |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head1 AUTHOR |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
RECRUIT Media Technology Labs |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
Copyright 2008 RECRUIT Media Technology Labs |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=cut |
|
189
|
|
|
|
|
|
|
1; |