The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::Recruit::HotPepperBeauty::Salon - HotPepperBeauty Web Service "salon" API

SYNOPSIS

    use WebService::Recruit::HotPepperBeauty;
    
    my $service = WebService::Recruit::HotPepperBeauty->new();
    
    my $param = {
        'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
        'name' => 'サロン',
        'order' => '3',
    };
    my $res = $service->salon( %$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 "salon: $data->salon\n";
    print "...\n";

DESCRIPTION

This module is a interface for the salon API. It accepts following query parameters to make an request.

    my $param = {
        'key' => 'XXXXXXXX',
        'id' => 'H0123456789',
        'name' => 'XXXXXXXX',
        'name_kana' => 'XXXXXXXX',
        'address' => 'XXXXXXXX',
        'service_area' => 'SA',
        'middle_area' => 'AAAA',
        'small_area' => 'X001',
        'keyword' => 'XXXXXXXX',
        'lat' => '35.669220',
        'lng' => '139.761457',
        'range' => 'XXXXXXXX',
        'datum' => 'world',
        'hair_image' => '2',
        'hair_length' => '5',
        'hair_ryou' => 'XXXXXXXX',
        'hair_shitsu' => 'XXXXXXXX',
        'hair_futosa' => 'XXXXXXXX',
        'hair_kuse' => 'XXXXXXXX',
        'hair_kaogata' => 'XXXXXXXX',
        'kodawari' => '4',
        'kodawari_setsubi' => '2',
        'kodawari_menu' => '3',
        'order' => 'XXXXXXXX',
        'start' => 'XXXXXXXX',
        'count' => 'XXXXXXXX',
    };
    my $res = $service->salon( %$param );

$service above is an instance of WebService::Recruit::HotPepperBeauty.

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->salon
    $root->salon->[0]->id
    $root->salon->[0]->last_update
    $root->salon->[0]->name
    $root->salon->[0]->name_kana
    $root->salon->[0]->urls
    $root->salon->[0]->coupon_urls
    $root->salon->[0]->address
    $root->salon->[0]->service_area
    $root->salon->[0]->middle_area
    $root->salon->[0]->small_area
    $root->salon->[0]->open
    $root->salon->[0]->close
    $root->salon->[0]->credit_card
    $root->salon->[0]->price
    $root->salon->[0]->stylist_num
    $root->salon->[0]->capacity
    $root->salon->[0]->parking
    $root->salon->[0]->note
    $root->salon->[0]->kodawari
    $root->salon->[0]->lat
    $root->salon->[0]->lng
    $root->salon->[0]->catch_copy
    $root->salon->[0]->description
    $root->salon->[0]->main
    $root->salon->[0]->mood
    $root->salon->[0]->feature
    $root->salon->[0]->urls->pc
    $root->salon->[0]->coupon_urls->pc
    $root->salon->[0]->service_area->code
    $root->salon->[0]->service_area->name
    $root->salon->[0]->middle_area->code
    $root->salon->[0]->middle_area->name
    $root->salon->[0]->small_area->code
    $root->salon->[0]->small_area->name
    $root->salon->[0]->main->photo
    $root->salon->[0]->main->caption
    $root->salon->[0]->mood->[0]->photo
    $root->salon->[0]->mood->[0]->caption
    $root->salon->[0]->feature->[0]->name
    $root->salon->[0]->feature->[0]->caption
    $root->salon->[0]->feature->[0]->description
    $root->salon->[0]->main->photo->s
    $root->salon->[0]->main->photo->m
    $root->salon->[0]->main->photo->l

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

WebService::Recruit::HotPepperBeauty

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 76:

Non-ASCII character seen before =encoding in ''サロン','. Assuming CP1252