1

All i'm trying to get the items reviews from amazon using Net::Amazon::Attribute::Review I have tried everything in my low knowledge of perl to try to get it to work but I can't seem to get it. Any help would be appreciated.

DESCRIPTION Net::Amazon::Attribute::Review holds customer reviews.

Net::Amazon::Attribute::Review - Customer Review Class

SYNOPSIS

use Net::Amazon::Attribute::Review;
my $rev = Net::Amazon::Attribute::Review->new(
             'rating'        => $rating,
             'summary'       => $summary,
             'content'       => $content,
             'asin'          => $asin,
             'customer_id'   => $customer_id,
             'date'          => $date,
             'helpful_votes' => $helpful_votes,
             'total_votes'   => $total_votes,
);
Jason Doe
  • 25
  • 3
  • Please provide a complete script, see [mcve] for more information – Håkon Hægland Oct 11 '20 at 18:10
  • From the test script [004Reviews.t](https://metacpan.org/source/BOUMENOT/Net-Amazon-0.62/t/004Reviews.t) it looks like there should be a method `review_set()` that gives access to the review data – Håkon Hægland Oct 11 '20 at 18:16

1 Answers1

2

It looks like you are pointing to a sub-package being part of Net-Amazon-0.62.

Reading the README, you can find some request example and Net::Amazon::Attribute::Review is one of the attributes of the response.

Digging into the source code of the Response serialization, the object Review is parsed from xml here https://metacpan.org/source/BOUMENOT/Net-Amazon-0.62/lib/Net/Amazon/Response.pm#L123-129 .

If you want to debug the content of the response, you can call the method as_string.

You can find a full example of fetching reviews inside the library in this file:

https://metacpan.org/source/BOUMENOT/Net-Amazon-0.62/eg/reviews

mabe02
  • 2,676
  • 2
  • 20
  • 35
  • @jason-doe I did not copy paste the snippet due to copyright, but the last link points exactly to what you need – mabe02 Oct 11 '20 at 18:19