NAME
eBay::API::Simple::Shopping
SYNPOSIS
my $call = eBay::API::Simple::Shopping->new();
$call->execute( 'FindItemsAdvanced', { QueryKeywords => 'shoe' } );
if ( $call->has_error() ) {
die "Call Failed:" . $call->errors_as_string();
}
# getters for the response DOM or Hash
my $dom = $call->response_dom();
my $hash = $call->response_hash();
print $call->nodeContent( 'Timestamp' );
print $call->nodeContent( 'TotalItems' );
my @nodes = $dom->findnodes(
'/FindItemsAdvancedResponse/SearchResult/ItemArray/Item'
);
foreach my $n ( @nodes ) {
print $n->findvalue('Title/text()') . "\n";
}
new
Constructor for the Shopping API call
my $call = ebay::API::Simple::Shopping->new();
$call->execute( 'FindItems', { QueryKeywords => 'shoe' } );
my $call = ebay::API::Simple::Shopping->new( {
siteid => 0, # custom site id
uri => '/shopping', # custom uri
appid => 'myappid', # custom appid
version => '518', # custom version
https => 0, # 0 or 1
} );
Defaults:
siteid = 0
uri = /shopping
domain = open.api.ebay.com
version = 527
https = 0
appid = undef
ebay.ini
The constructor will fallback to the ebay.ini file to get any missing credentials. The following files will be checked, ./ebay.ini, ~/ebay.ini, /etc/ebay.ini which are in the order of precedence.
# your application key
ApplicationKey=LJKGHKLJGKJHG
execute( $verb, $call_data )
Calling this method will make build and execute the api request.
$verb = call verb, i.e. FindItems
$call_data = hashref of call_data that will be turned into xml.
$call->execute( 'FindItemsAdvanced', { QueryKeywords => 'shoe' } );
_get_request_body
This method supplies the request body for the Shopping API call
_get_request_headers
This method supplies the headers for the Shopping API call
_get_request_object
This method creates the request object and returns to the parent class
AUTHOR
Tim Keefer <tim@timkeefer.com>