NAME

eBay::API::Simple::RSS - Support for grabbing an RSS feed via API call

USAGE

my $call = eBay::API::Simple::RSS->new();
$call->execute(
  'http://sfbay.craigslist.org/search/sss',
  {
      query  => 'shirt',
      format => 'rss',
  }
);

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();

# collect all item nodes
my @items = $dom->getElementsByTagName('item');

foreach my $n ( @items ) {
  print $n->findvalue('title/text()') . "\n";
}

PUBLIC METHODS

new( { %options } }

my $call = ebay::API::Simple::RSS->new();

execute( $url, $%args )

$call->execute( 
  'http://sfbay.craigslist.org/search/sss',
  { query  => 'shirt', format => 'rss', } 
);

This method will construct the API request the supplied URL.

Options

$url (required)

Feed URL to fetch

%$args (optional)

The supplied args will be encoded and appended to the URL

BASECLASS METHODS

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

nodeContent( $tag, [ $dom ] )

Helper for LibXML that retrieves node content

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.

PRIVATE METHODS

_get_request_body

This method supplies the XML body for the web service request

_get_request_headers

This methods supplies the headers for the RSS API call

_get_request_object

This method creates the request object and returns to the parent class

AUTHOR

Tim Keefer <tim@timkeefer.com>

COPYRIGHT

Tim Keefer 2009