File: cd_fetch

package info (click to toggle)
libnet-amazon-perl 0.35-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 908 kB
  • ctags: 160
  • sloc: xml: 4,821; perl: 2,055; makefile: 46
file content (30 lines) | stat: -rwxr-xr-x 926 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl
###########################################
# xx -- 
# Mike Schilli, 2003 (m@perlmeister.com)
###########################################
use warnings;
use strict;

use Net::Amazon;

my $ua = Net::Amazon->new(token => 'YOUR_AMZN_TOKEN');

    # Get a request object
my $resp = $ua->search(asin => 'B000000WA4');

if($resp->is_success()) {
    my($cd) = $resp->properties();
    print "Album ....... ", $cd->album, "\n";
    print "Artist ...... ", $cd->artist, "\n";
    print "Year ........ ", $cd->year, "\n";
    print "OurPrice .... ", $cd->OurPrice, "\n";
    print "ListPrice ... ", $cd->ListPrice, "\n";
    print "UPC ......... ", $cd->upc, "\n";
    print "nummedia .... ", $cd->nummedia, "\n";
    print "label ....... ", $cd->label, "\n";
    print "media ....... ", $cd->media, "\n";
    print "tracks ...... ", join("\n              ", $cd->tracks()), "\n";
} else {
    print $resp->message();
}