RECRUIT Media Technology Labs > WebService-Recruit-Eyeco-0.0.1 > WebService::Recruit::Eyeco::Item

Download:
WebService-Recruit-Eyeco-0.0.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0.1   Source  

NAME ^

WebService::Recruit::Eyeco::Item - Eyeco Web Service "item" API

SYNOPSIS ^

    use WebService::Recruit::Eyeco;
    
    my $service = WebService::Recruit::Eyeco->new();
    
    my $param = {
        'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
        'large_category' => '101',
        'order' => '1',
        'price_max' => '5000',
    };
    my $res = $service->item( %$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 "item: $data->item\n";
    print "...\n";

DESCRIPTION ^

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

    my $param = {
        'key' => 'XXXXXXXX',
        'code' => '99999',
        'name' => 'トレー',
        'large_category' => '101',
        'small_category' => '210001',
        'keyword' => 'お手入れ',
        'price_min' => '2000',
        'price_max' => '5400',
        'order' => 'XXXXXXXX',
        'start' => 'XXXXXXXX',
        'count' => 'XXXXXXXX',
    };
    my $res = $service->item( %$param );

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

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->item
    $root->item->[0]->code
    $root->item->[0]->shop_code
    $root->item->[0]->name
    $root->item->[0]->price
    $root->item->[0]->catch_copy
    $root->item->[0]->desc
    $root->item->[0]->image
    $root->item->[0]->large_category
    $root->item->[0]->small_category
    $root->item->[0]->start_date
    $root->item->[0]->end_date
    $root->item->[0]->urls
    $root->item->[0]->image->pc
    $root->item->[0]->image->mobile
    $root->item->[0]->large_category->code
    $root->item->[0]->large_category->name
    $root->item->[0]->small_category->code
    $root->item->[0]->small_category->name
    $root->item->[0]->urls->mobile
    $root->item->[0]->urls->pc
    $root->item->[0]->urls->qr

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

AUTHOR ^

RECRUIT Media Technology Labs <mtl@cpan.org>

COPYRIGHT ^

Copyright 2008 RECRUIT Media Technology Labs

syntax highlighting: