NAME
eBay::API::Docs::Cookbook - The How Tos
INTRO
This document is set up like a cookbook, but all the recipes are fully implemented in Gantry::Samples. The first recipe explains how to run the samples.
The Questions
How do I execute an API call using custom raw XML?
use strict;
use eBay::API::XML::Call::FetchToken;
my $call = new eBay::API::XML::Call::FetchToken(
site_id => 0,
proxy => 'https://api.ebay.com/ws/api.dll',
dev_id => __DEVELOPER_ID__,
app_id => __APPLICATION_ID__,
cert_id => __CERT_ID__,
user_auth_token => __AUTH_TOKEN__,
);
$call->setRequestRawXml('<?xml version="1.0" encoding="UTF-8"?>
<FetchTokenRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<SecretID>R2n6MQr@LDMAABeDFY8.1025449191.1198127665.563330</SecretID>
<RequesterCredentials><Username></Username></RequesterCredentials>
</FetchTokenRequest>'
);
$call->execute();
print $call->getEBayAuthToken();
print $call->dumpObject();
How do I retrieve the eBay official time?
use eBay::API::XML::Call::GeteBayOfficialTime;
my $call = eBay::API::XML::Call::GeteBayOfficialTime->new(
site_id => 0,
proxy => 'https://api.ebay.com/ws/api.dll',
dev_id => __DEVELOPER_ID__,
app_id => __APPLICATION_ID__,
cert_id => __CERT_ID__,
user_auth_token => __AUTH_TOKEN__,
);
$call->execute();
print $call->getEBayOfficialTime();
AUTHOR
Tim Keefer <tim@timkeefer.com>
COPYRIGHT and LICENSE
Copyright (c) 2008, Tim Keefer.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.