NAME

eBay::API::SimpleBase - Flexible SDK supporting all eBay web services

DESCRIPTION

This is the base class for the eBay::API::Simple::* libraries that provide support for all of eBay's web services. This base class does nothing by itself and must be subclassed to provide the complete web service support.

eBay::API::Simple::Merchandising
eBay::API::Simple::Finding
eBay::API::Simple::Shopping
eBay::API::Simple::Trading
eBay::API::Simple::HTML
eBay::API::Simple::RSS

GET THE SOURCE

http://code.google.com/p/ebay-api-simple

PUBLIC METHODS

eBay::API::Simple::{subclass}->new()

see subclass for more docs.

eBay::API::Simple::Merchandising
eBay::API::Simple::Finding
eBay::API::Simple::Shopping
eBay::API::Simple::Trading
eBay::API::Simple::HTML
eBay::API::Simple::RSS

execute( $verb, $call_data )

This method should be supplied by the subclass. This one is only here to provide an example. See actual subclass for docs.

Calling this method will make build and execute the api request.

$verb (required)

call verb, i.e. FindItems

$call_data (required)

hashref of call_data that will be turned into xml.

request_agent

Accessor for the LWP::UserAgent request agent

request_object

Accessor for the HTTP::Request request object

request_content

Accessor for the complete request body from the HTTP::Request object

response_content

Accessor for the HTTP response body content

response_object

Accessor for the HTTP::Request response object

response_dom

Accessor for the LibXML response DOM

response_hash

Accessor for the hashified response content

response_json

Not implemented yet.

nodeContent( $tag, [ $dom ] )

Helper for LibXML that retrieves node content

$tag (required)

This is the name of the xml element

$dom (optional)

optionally a DOM object can be passed in. If no DOM object is passed then the main response DOM object is used.

errors

Accessor to the hashref of errors

has_error

Returns true if the call contains errors

errors_as_string

Returns a string of API errors if there are any.

INTERNAL METHODS

api_config

Accessor to a hashref of api config data that will be used to execute the api call.

siteid,domain,uri,etc.

api_config_append( $hashref )

This method is used to merge config into the config_api hash

api_config_dump()

This method is used for debugging

errors_append

This method lets you append errors to the errors stack

PRIVATE METHODS

_execute_http_request

This method performs the http request and should be used by each subclass.

_reset

Upon execute() we need to undef any data from a previous call. This method will clear all call data and is usually done before each execute

_build_url( $base_url, $%params )

Constructs a URL based on the supplied args

_get_request_body

The request body should be provided by the subclass

_get_request_headers

The request headers should be provided by the subclass

_get_request_agent

The request request agent should be used by all subclasses

_get_request_object

The request object should be provided by the subclass

_load_yaml_defaults

This method will search for the ebay.yaml file and load configuration defaults for each service endpoint

YAML files can be placed at the below locations. The first file found will be loaded.

./ebay.yaml, ~/ebay.yaml, /etc/ebay.yaml 

Sample YAML:

# Trading - External
api.ebay.com:
  appid: <your appid>
  certid: <your certid>
  devid: <your devid>
  token: <token>
  
# Shopping
open.api.ebay.com:
  appid: <your appid>
  certid: <your certid>
  devid: <your devid>
  version: 671

# Finding/Merchandising
svcs.ebay.com:
  appid: <your appid>
  version: 1.0.0

AUTHOR

Tim Keefer <tim@timkeefer.com>

CONTRIBUTOR

Andrew Dittes <adittes@gmail.com>

8 POD Errors

The following errors were encountered while parsing the POD:

Around line 33:

'=item' outside of any '=over'

Around line 45:

You forgot a '=back' before '=head1'

Around line 55:

'=item' outside of any '=over'

Around line 91:

You forgot a '=back' before '=head2'

Around line 98:

'=item' outside of any '=over'

Around line 130:

You forgot a '=back' before '=head2'

Around line 247:

'=item' outside of any '=over'

Around line 278:

You forgot a '=back' before '=head2'