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