WWW::Search::Ebay::Category - backend for returning entire categories on www.ebay.com


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

Index


Code Index:

NAME

Top

WWW::Search::Ebay::Category - backend for returning entire categories on www.ebay.com

SYNOPSIS

Top

  use WWW::Search;
  my $oSearch = new WWW::Search('Ebay::Category');
  # Category 1381 is Disney Modern Premiums:
  $oSearch->native_query(1381);
  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

Returns the "first" 200 *auction* items in the given category. I'm not sure what exactly "first" means in this case; YMMV.

It is up to you to determine the number of the category you want.

See the NOTES section of WWW::Search::Ebay for a description of the results.

METHODS

Top

SEE ALSO

Top

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

CAVEATS

Top

BUGS

Top

Please tell the author if you find any!

AUTHOR

Top

Maintained by Martin Thurn, mthurn@cpan.org, http://www.sandcrawler.com/SWB/cpan-modules.html.

LEGALESE

Top

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

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


WWW-Search-Ebay documentation Contained in the WWW-Search-Ebay distribution.
# $Id: Category.pm,v 2.4 2009/05/02 13:28:09 Martin Exp $

#####################################################################

package WWW::Search::Ebay::Category;

use strict;
use warnings;

use Carp;
use Date::Manip;
use base 'WWW::Search::Ebay';

our
$VERSION = do { my @r = (q$Revision: 2.4 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };

our $MAINTAINER = 'Martin Thurn <mthurn@cpan.org>';

use constant DEBUG_FUNC => 0;

sub _native_setup_search
  {
  my ($self, $native_query, $rhOptsArg) = @_;
  $rhOptsArg ||= {};
  unless (ref($rhOptsArg) eq 'HASH')
    {
    carp " --- second argument to _native_setup_search should be hashref, not arrayref";
    return undef;
    } # unless
  # As of Jan. 2009:
  # http://collectibles.shop.ebay.com/items/__W0QQLHQ5fAuctionZ1?_sacat=35845
  $self->{'search_host'} = 'http://collectibles.shop.ebay.com';
  $self->{search_path} = q{/items/__W0QQLHQ5fAuctionZ1};
  $self->{_options} = {
                       _ipg => 200,
                       _sacat => $native_query,
                      };
  return $self->SUPER::_native_setup_search($native_query, $rhOptsArg);
  } # _native_setup_search


sub _preprocess_results_page_OFF
  {
  my $self = shift;
  my $sPage = shift;
  # For debugging:
  print STDERR $sPage;
  exit 88;
  } # preprocess_results_page

sub _columns_use_SUPER
  {
  my $self = shift;
  # This is for basic USA eBay:
  return qw( paypal bids price shipping enddate );
  } # _columns


1;

__END__