[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Amazon.pm [dev_week]
From: |
Cindy Murdock |
Subject: |
[Koha-cvs] koha/C4 Amazon.pm [dev_week] |
Date: |
Wed, 16 Apr 2008 19:26:31 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Cindy Murdock <clm> 08/04/16 19:26:31
Modified files:
C4 : Amazon.pm
Log message:
Applying Jesse's Amazon patches to dev_week.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Amazon.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.4.2.2&r2=1.3.2.4.2.3
Patches:
Index: Amazon.pm
===================================================================
RCS file: /sources/koha/koha/C4/Amazon.pm,v
retrieving revision 1.3.2.4.2.2
retrieving revision 1.3.2.4.2.3
diff -u -b -r1.3.2.4.2.2 -r1.3.2.4.2.3
--- Amazon.pm 13 Dec 2006 03:17:27 -0000 1.3.2.4.2.2
+++ Amazon.pm 16 Apr 2008 19:26:31 -0000 1.3.2.4.2.3
@@ -56,6 +56,7 @@
#get rid of MARC cataloger's nonsense
$isbn =~ s/(p|-)//g;
+ $isbn =~ s/[^0-9X]//g;
# grab the developer's key: mine is 'ektostoukadou-20'
my $dev_key=C4::Context->preference('AmazonDevKey');
@@ -63,14 +64,14 @@
#grab the associates tag: mine is '0ZRY7YASKJS280T7YB02'
my $af_tag=C4::Context->preference('AmazonAssocTag');
- my $asin=$isbn;
- my $url =
"http://xml.amazon.com/onca/xml3?t=$af_tag&dev-t=$dev_key&type=heavy&f=xml&AsinSearch="
. $asin;
+ my $url =
"http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Version=2005-03-23&Operation=ItemLookup&ContentType=text%2Fxml&SubscriptionId=$dev_key&AssociateTag=$af_tag&ItemId=$isbn&ResponseGroup=Images,ItemAttributes,Reviews,Similarities";
+ #my $url =
"http://xml.amazon.com/onca/xml3?t=$af_tag&dev-t=$dev_key&type=heavy&f=xml&AsinSearch="
. $asin;
my $content = get($url);
#warn $content;
warn "could not retrieve $url" unless $content;
my $xmlsimple = XML::Simple->new();
my $response = $xmlsimple->XMLin($content,
- forcearray => [ qw(Details Product AvgCustomerRating CustomerReview) ],
+ forcearray => [ qw(Item SimilarProduct Review) ],
);
return $response;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/C4 Amazon.pm [dev_week],
Cindy Murdock <=