Net::Am...Request(3)

πŸ“¦
version 0.62 Β· 2 versions
, in fedora 43

πŸ’– Net::Amazon::Request β€” the base class glow-up πŸ’–

okay bestie, so this page is from the User Contributed Perl Documentation collection, and it's all about Net::Amazon::Request β€” the baseclass for requests to Amazon's web service. Think of it as the mother of all request types, the blueprint, the vibe template πŸŽ€


✨ NAME ✨

Net::Amazon::Request β€” the baseclass for requests to Amazon's web service. she's the blueprint, the origin story, the main character πŸ’…


🌸 SYNOPSIS 🌸

my $req = Net::Amazon::Request::XXX->new(
                 [ type  => 'Large', ]
                 [ page  => $start_page, ]
                 [ mode  => $mode, ]
                 [ offer => 'All', ]
                 [ sort => $sort_type, ]
);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so do NOT use this class directly, bestie. i'm so serious 😭 use the derived classes instead β€” like Net::Amazon::Request::ASIN, etc. β€” because those are the ones that actually specify the type of request and its parameters. this one is the base, she's behind the scenes, she's the glue.

but!!! the thing is, there's a whole bunch of parameters to the constructor that every single request type has in common ✨ and here they all are, no gatekeeping:

πŸ’œ type

Defaults to Large, but can also be set to Medium, or Small. pick your fighter:

  • Large β€” the Large type provides everything in Medium as well as music track information, customer reviews, similar products, offers, and accessory data, i.e. the kitchen sink. she ate and left no crumbs, honestly πŸ”₯
  • Medium β€” the Medium type provides everything in Small as well as sales rank, editorial reviews, and image URLs. solid, respectable, mid in the best way πŸ’…
  • Small β€” the Small type provides ASIN, product title, creator (author, artist, etc.), product group, URL, and manufacturer. tiny but mighty πŸ“

πŸ’œ mode

Defaults to books, but can be set to other catalog values. yes, other catalogs exist, go explore bestie 🌈

πŸ’œ page

Defaults to 1, but can be set to a different number to start with a different result page. it gets used in conjunction with the max_pages parameter of the Net::Amazon object. lowkey important to get this straight: page is the offset, and max_pages is the maximum number of pages pulled in starting at page. they're a duo, they work together 🫢

πŸ’œ sort

Defaults to salesrank, but search results can be sorted in various ways, depending on the type of product returned by the search. the search results may be sorted by the following criteria:

  • Featured Items
  • Bestselling
  • Alphabetical (A-Z and Z-A)
  • Price (High to Low and Low to High)
  • Publication or Release Date
  • Manufacturer
  • Average Customer Review
  • Artist Name

Consult Net::Amazon::Request::Sort for details β€” that's where the full lore lives πŸ“–βœ¨

πŸ’œ offer

okay so if you want to receive values for the fields CollectibleCount, NumberOfOfferings, UsedCount, you gotta specify offer => "All". that's the whole trick. no cap πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Mike Schilli, <m@perlmeister.com> β€” the icon who wrote this πŸ’–


Copyright 2003 by Mike Schilli <m@perlmeister.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


so yeah bestie, that's the whole page. don't use the base class directly, use the derived ones, know your type/mode/page/sort/offer, and go slay πŸ’…βœ¨

this little cutie is from perl v5.42.0, dated 2025-07-25, and she's Net::Am...Request(3) β€” yeah the title got truncated, but she's full of personality, ok?? 🫢 bye bestie, mwah πŸ’–

πŸ“¦ where this page comes from