From 8c0398aaba7d19497dc49b2182d651f1fcc63704 Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Fri, 11 Apr 2014 11:33:14 +0100 Subject: [PATCH 1/5] Update Amazon.pm - add associate_tag Add associate_tag. Amazon require an associate tag, Net::Amazon addressed this in v0.61: rt 71937; Amazon now requires an Associate Tag, so enforce usage. --- lib/Music/Tag/Amazon.pm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/Music/Tag/Amazon.pm b/lib/Music/Tag/Amazon.pm index 791a394..a97f6a0 100644 --- a/lib/Music/Tag/Amazon.pm +++ b/lib/Music/Tag/Amazon.pm @@ -21,6 +21,7 @@ sub default_options { coveroverwrite => 0, token => "YOURTOKEN", secret_key => "SECRET", + associate_tag => "YOURTAG", min_album_points => 10, ignore_asin => 0, max_pages => 10, @@ -254,13 +255,14 @@ sub amazon_ua { } else { $self->{amazon_ua} = Net::Amazon->new( - token => $self->options->{token}, - secret_key => $self->options->{secret_key}, - cache => $self->amazon_cache, - max_pages => $self->options->{max_pages}, - locale => $self->options->{locale}, - strict => 1, - rate_limit => 1, + token => $self->options->{token}, + secret_key => $self->options->{secret_key}, + associate_tag => $self->options->{associate_tag}, + cache => $self->amazon_cache, + max_pages => $self->options->{max_pages}, + locale => $self->options->{locale}, + strict => 1, + rate_limit => 1, ); } } @@ -545,6 +547,10 @@ This plugin gathers additional information about a track from amazon, and update Music::Tag::Amazon objects must be created by Music::Tag. +Music::Tag::Amazon uses L and requires valid Amazon deverloper tokens: + +L + =begin readme =head1 INSTALLATION @@ -703,6 +709,10 @@ Amazon Developer token. Change to one given to you by Amazon. REQUIRED OPTION. Amazon Developer secret key. Change to one given to you by Amazon. REQUIRED OPTION. +=item B + +Amazon Developer associate tag. Change to one given to you by Amazon. REQUIRED OPTION. + =item B Default 10. Minimum number of points an album must have to win election. From 356c9aa5ee9257a5423b0559ee34b0ca1291c5bc Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Fri, 11 Apr 2014 11:36:47 +0100 Subject: [PATCH 2/5] Update 1-amazon.t - add required associate_tag Add associate_tag to test, now required by Amazon/Net::Amazon. --- t/1-amazon.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/1-amazon.t b/t/1-amazon.t index 5541d46..79b0930 100644 --- a/t/1-amazon.t +++ b/t/1-amazon.t @@ -19,7 +19,8 @@ BEGIN { use_ok('Net::Amazon') } my $ua = Net::Amazon->new( token => 'YOUR_AMZN_TOKEN', - secret_key => 'YOUR_AMZN_SECRET_KEY', + secret_key => 'YOUR_AMZN_SECRET_KEY', + associate_tab => 'YOUR_AMZN_ASSOCIATE_TAG' # response_dump => 1, ); From 44bd6fd16e6c1b2843a7b906fde3d1f98d67aad7 Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Fri, 11 Apr 2014 11:54:45 +0100 Subject: [PATCH 3/5] Update Makefile.PL - Bump Net::Amazon version Bump Net::Amazon version requirement to v0.62. This is part of the over all change here to supply associate_tag --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 47adb74..3d287b3 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,7 +9,7 @@ WriteMakefile( NAME => "Music::Tag::Amazon", 'Data::Dumper' => 2.0, 'Digest::SHA1' => 2.11, 'LWP' => 5.805, - 'Net::Amazon' => 0.59, + 'Net::Amazon' => 0.62, 'Test::More' => 0, 'File::Copy' => 0, }, From ca03714e49a381c0ab8606ec49a16823934d11df Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Fri, 11 Apr 2014 12:04:29 +0100 Subject: [PATCH 4/5] Update README Add note about Net::Amazon and Amazon developer tokens. --- README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README b/README index e8a3a91..d36d92d 100644 --- a/README +++ b/README @@ -7,6 +7,10 @@ DESCRIPTION and updates the Music::Tag object. Music::Tag::Amazon objects must be created by Music::Tag. + + Music::Tag::Amazon uses Net::Amazon and requires valid Amazon developer tokens: + + http://www.amazon.com/soap INSTALLATION To install this module type the following: From ae182f285a4d94b28dfd0ba5f93f688216777e67 Mon Sep 17 00:00:00 2001 From: Martin McGrath Date: Fri, 11 Apr 2014 13:49:04 +0100 Subject: [PATCH 5/5] Update 1-amazon.t - Fix typo fix tyop associate_tab/associate_tag --- t/1-amazon.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/1-amazon.t b/t/1-amazon.t index 79b0930..8563700 100644 --- a/t/1-amazon.t +++ b/t/1-amazon.t @@ -20,7 +20,7 @@ BEGIN { use_ok('Net::Amazon') } my $ua = Net::Amazon->new( token => 'YOUR_AMZN_TOKEN', secret_key => 'YOUR_AMZN_SECRET_KEY', - associate_tab => 'YOUR_AMZN_ASSOCIATE_TAG' + associate_tag => 'YOUR_AMZN_ASSOCIATE_TAG' # response_dump => 1, );