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