WWW::Search::Ebay::BuyItNow - backend for searching eBay Buy-It-Now items


WWW-Search-Ebay documentation Contained in the WWW-Search-Ebay distribution.

Index


Code Index:

NAME

Top

WWW::Search::Ebay::BuyItNow - backend for searching eBay Buy-It-Now items

SYNOPSIS

Top

  use WWW::Search;
  my $oSearch = new WWW::Search('Ebay::BuyItNow');
  my $sQuery = WWW::Search::escape_query("jawa");
  $oSearch->native_query($sQuery);
  while (my $oResult = $oSearch->next_result())
    { print $oResult->url, "\n"; }

DESCRIPTION

Top

This class is a Ebay specialization of WWW::Search. It handles making and interpreting Ebay searches http://www.ebay.com.

This class exports no public interface; all interaction should be done through WWW::Search objects.

NOTES

Top

The search is done against eBay Buy-It-Now items only.

The query is applied to TITLES only.

In the resulting WWW::Search::Result objects, the description field consists of a human-readable combination (joined with semicolon-space) of the Item Number; number of bids; and high bid amount (or starting bid amount).

SEE ALSO

Top

To make new back-ends, see WWW::Search.

BUGS

Top

Please tell the author if you find any!

AUTHOR

Top

Martin 'Kingpin' Thurn, mthurn at cpan.org, http://tinyurl.com/nn67z.

LICENSE

Top

Copyright (C) 1998-2009 Martin 'Kingpin' Thurn


WWW-Search-Ebay documentation Contained in the WWW-Search-Ebay distribution.

# $Id: BuyItNow.pm,v 1.14 2010-04-25 00:03:25 Martin Exp $

package WWW::Search::Ebay::BuyItNow;

use strict;
use warnings;

use WWW::Search::Ebay;
use base 'WWW::Search::Ebay';
our
$VERSION = do { my @r = (q$Revision: 1.14 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };

sub _native_setup_search
  {
  my ($self, $sQuery, $rh) = @_;
  # http://shop.ebay.com/items/_W0QQLHQ5fBINZ1QQLHQ5fIncludeSIFZ1?_nkw=Burkina+Faso+flag&_sacat=0&_fromfsb=&_trksid=m270.l1313&_odkw=Burkina+Faso&_osacat=0
  # http://shop.ebay.com/items/_W0QQLHQ5fBINZ1QQLHQ5fIncludeSIFZ1?_nkw=Burkina+Faso+flag
  $self->{search_host} = q{http://shop.ebay.com};
  $self->{search_path} = q{/items/_W0QQLHQ5fBINZ1};
  $self->{'_options'} = {
                         '_nkw' => $sQuery,
                        };
  return $self->SUPER::_native_setup_search($sQuery, $rh);
  } # _native_setup_search

sub _columns
  {
  my $self = shift;
  return qw( paypal buyitnowlogo price enddate );
  } # _columns

1;

__END__