NAME
eBay::API::Simple::Finding
SYNPOSIS
my $call = eBay::API::Simple::Finding->new(
{ appid => '<your app id here>' }
);
$call->execute( 'findItemsByKeywords', { keywords => '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( 'totalEntries' );
my @nodes = $dom->findnodes(
'//item'
);
foreach my $n ( @nodes ) {
print $n->findvalue('title/text()') . "\n";
}
new
Constructor for the Shopping API call
my $call = eBay::API::Simple::Finding->new(
{ appid => '<your app id here>' }
);
my $call = eBay::API::Simple::Finding->new( {
siteid => 'EBAY-US', # custom site id
domain => 'svcs.ebay.com', # custom domain
uri => '/services/search/FindingService/v1', # custom uri
appid => '<your appid>', # custom appid
version => '1.0.0', # custom version
https => 0, # 0 or 1
} );
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
_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
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( 'findItemsByKeywords', { keywords => 'shoe' } );
_get_request_object
This method creates the request object and returns to the parent class
AUTHOR
Tim Keefer <tim@timkeefer.com>